diff --git a/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md b/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md index 1857bbf4..2773e4ab 100644 --- a/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md +++ b/dashboards/tracker-web/docs/roadmaps/UX_INTEGRATION_BYTELYST.md @@ -215,8 +215,11 @@ pnpm build # final gate ## UX-12 — Detail & board richness (Tabs · Tooltip · Drawer · Timeline · rich-text) -- [ ] **12.1** `/dashboard` board↔list: use `SegmentedControl` (or `Tabs`) for the view toggle +- [x] **12.1** `/dashboard` board↔list: use `SegmentedControl` (or `Tabs`) for the view toggle instead of bespoke buttons; `Tooltip` on truncated titles / status dots. + (SegmentedControl now drives the roadmap board/list toggle — the app's only board↔list + toggle — replacing the bespoke `blue-600` buttons; `Tooltip` wraps the truncated board + card titles. e2e toggle selector updated button→radio. UX-12.1 verified: tc/lint/test 162 ✓/build/e2e 18 ✓) - [ ] **12.2** Item detail: move row/item actions into an `ActionMenu`, and render the item's activity/comment history with `Timeline`. - [ ] **12.3** _(stretch — needs HTML-capable description/comment storage)_ Swap the plain diff --git a/dashboards/tracker-web/e2e/tracker.spec.ts b/dashboards/tracker-web/e2e/tracker.spec.ts index ba30bc48..91621e87 100644 --- a/dashboards/tracker-web/e2e/tracker.spec.ts +++ b/dashboards/tracker-web/e2e/tracker.spec.ts @@ -309,7 +309,8 @@ test.describe('Tracker — Public Roadmap', () => { test('can toggle between board and list view', async ({ page }) => { await page.goto('/roadmap'); await expect(page.getByRole('heading', { name: 'Dark mode toggle' })).toBeVisible(); - await page.getByRole('button', { name: 'List', exact: true }).click(); + // The view toggle is a shared SegmentedControl (role=radio), UX-12.1. + await page.getByRole('radio', { name: 'List', exact: true }).click(); // List view still shows the items (rendered as rows, not a ) await expect(page.getByRole('heading', { name: 'Dark mode toggle' })).toBeVisible(); await expect(page.getByRole('heading', { name: 'Export to CSV' })).toBeVisible(); diff --git a/dashboards/tracker-web/src/app/dashboard/board/page.tsx b/dashboards/tracker-web/src/app/dashboard/board/page.tsx index b7ea9be9..44552f12 100644 --- a/dashboards/tracker-web/src/app/dashboard/board/page.tsx +++ b/dashboards/tracker-web/src/app/dashboard/board/page.tsx @@ -3,6 +3,12 @@ import { useEffect, useState, useCallback } from 'react'; import Link from 'next/link'; import { PageHeader } from '@bytelyst/dashboard-components'; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from '@/components/ui/Primitives'; import { useAuth } from '@/lib/auth-context'; import { listItems, updateItemStatus, type TrackerItem } from '@/lib/tracker-client'; @@ -56,88 +62,95 @@ export default function BoardPage() { }; return ( -
- -

Kanban view of all items

+ +
+ +

Kanban view of all items

- {error && ( -
- {error} -
- )} + {error && ( +
+ {error} +
+ )} -
- {COLUMNS.map(col => { - const colItems = items.filter(i => i.status === col.key); - return ( -
-
-

{col.label}

- - {colItems.length} - -
+
+ {COLUMNS.map(col => { + const colItems = items.filter(i => i.status === col.key); + return ( +
+
+

{col.label}

+ + {colItems.length} + +
-
- {colItems.map(item => ( -
-
- - {item.type} - - {item.priority} - -
- - + {colItems.map(item => ( +
- {item.title} - - -
- {item.voteCount > 0 && {item.voteCount} votes} - {item.commentCount > 0 && {item.commentCount} comments} -
- - {/* Quick status move */} -
- {COLUMNS.filter(c => c.key !== item.status).map(c => ( - - ))} -
-
- ))} + {item.priority} + +
- {colItems.length === 0 && ( -
No items
- )} + + + + {item.title} + + + {item.title} + + +
+ {item.voteCount > 0 && {item.voteCount} votes} + {item.commentCount > 0 && {item.commentCount} comments} +
+ + {/* Quick status move */} +
+ {COLUMNS.filter(c => c.key !== item.status).map(c => ( + + ))} +
+
+ ))} + + {colItems.length === 0 && ( +
No items
+ )} +
-
- ); - })} + ); + })} +
-
+ ); } diff --git a/dashboards/tracker-web/src/app/roadmap/page.tsx b/dashboards/tracker-web/src/app/roadmap/page.tsx index 042a53a2..4d7b469c 100644 --- a/dashboards/tracker-web/src/app/roadmap/page.tsx +++ b/dashboards/tracker-web/src/app/roadmap/page.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect, useState, useCallback } from 'react'; +import { SegmentedControl } from '@/components/ui/Primitives'; import { getRoadmapItems, getRoadmapStats, @@ -264,20 +265,15 @@ export default function RoadmapPage() { -
- - -
+ setView(v as 'board' | 'list')} + options={[ + { value: 'board', label: 'Board' }, + { value: 'list', label: 'List' }, + ]} + /> {loading ? (