From c5664902a2e5977e44cf2e3df2b4031e9bc5158d Mon Sep 17 00:00:00 2001 From: Dizhan Xue Date: Fri, 20 Nov 2026 07:00:26 +0000 Subject: [PATCH 1/2] feat(ui-web): show task board ignore as an icon button Draw Ignore as a 22px cross box in both places it appears, keeping the accessible name and the whole square as the target. --- ui-web/src/features/tasks/BoardList.test.tsx | 23 ++++++++++ ui-web/src/features/tasks/BoardList.tsx | 44 +++++++++++++------- ui-web/src/features/tasks/styles.css | 30 +++++++++---- 3 files changed, 74 insertions(+), 23 deletions(-) diff --git a/ui-web/src/features/tasks/BoardList.test.tsx b/ui-web/src/features/tasks/BoardList.test.tsx index 37dbe14203..82d0284990 100644 --- a/ui-web/src/features/tasks/BoardList.test.tsx +++ b/ui-web/src/features/tasks/BoardList.test.tsx @@ -291,6 +291,29 @@ describe('the task board', () => { .toEqual([['Which fix?', 1], ['Clear it too?', 1]]) }) + it('draws a question s Ignore as an icon button, keeping its accessible name', async () => { + board.groups = [asking(group('a', NOW - 3e6, 'needs_you'), ['Which fix?'])] + await draw() + + const label = 'gui.tasks.board.ignore_question {"n":1}' + const ignore = document.querySelector('.tkq .tkqignore') as HTMLButtonElement + expect(ignore.textContent).toBe('') + expect(ignore.querySelector('svg')).not.toBeNull() + expect(ignore.getAttribute('aria-label')).toBe(label) + expect(ignore.getAttribute('title')).toBe(label) + }) + + it('draws the whole-group Ignore as the same icon button', async () => { + board.groups = [group('a', NOW - 3e6, 'needs_you')] + await draw() + + const ignore = document.querySelector('.tkaskbtn[data-kind="ignore"]') as HTMLButtonElement + expect(ignore.textContent).toBe('') + expect(ignore.querySelector('svg')).not.toBeNull() + expect(ignore.getAttribute('aria-label')).toBe('gui.tasks.board.ignore') + expect(ignore.getAttribute('title')).toBe('gui.tasks.board.ignore') + }) + it('an Ignore sets its one question aside, and the answer draft drops it too', async () => { board.groups = [asking(group('a', NOW - 3e6, 'needs_you'), ['Which fix?', 'Clear it too?'])] await draw() diff --git a/ui-web/src/features/tasks/BoardList.tsx b/ui-web/src/features/tasks/BoardList.tsx index 535cf0159d..f29c4363ae 100644 --- a/ui-web/src/features/tasks/BoardList.tsx +++ b/ui-web/src/features/tasks/BoardList.tsx @@ -10,7 +10,7 @@ * desk's to perform. */ -import { ArrowRight01Icon, ArrowRight02Icon, ArrowTurnBackwardIcon, Tick02Icon } from '@hugeicons/core-free-icons' +import { ArrowRight01Icon, ArrowRight02Icon, ArrowTurnBackwardIcon, Cancel01Icon, Tick02Icon } from '@hugeicons/core-free-icons' import { useEffect, useRef, useState, useSyncExternalStore } from 'react' import { Icon } from '../../components/Icon' @@ -175,30 +175,42 @@ function Questions({ group, verbs }: { group: TaskGroup; verbs: ThreadVerbs }): if (!step || !questions.length) return null return (
    - {questions.map((q, n) => ( -
  1. - {q} - -
  2. - ))} + {questions.map((q, n) => { + const label = t('gui.tasks.board.ignore_question', { n: n + 1 }) + return ( +
  3. + {q} + +
  4. + ) + })}
) } function AskButtons({ group, verbs }: { group: TaskGroup; verbs: ThreadVerbs }): JSX.Element { const named = (group.steps[group.steps.length - 1]?.questions ?? []).length > 0 + const ignoreLabel = t('gui.tasks.board.ignore') return ( <> {named ? null : ( - )}