Skip to content

Add CommandBar and DashboardDrawer to dashboard#7660

Merged
kruulik merged 35 commits intomainfrom
dashboard-command-bar-pr
Mar 17, 2026
Merged

Add CommandBar and DashboardDrawer to dashboard#7660
kruulik merged 35 commits intomainfrom
dashboard-command-bar-pr

Conversation

@kruulik
Copy link
Copy Markdown
Contributor

@kruulik kruulik commented Mar 16, 2026

Ticket ENG-2895

Stack: #7628#7659this PR

Description Of Changes

Add the CommandBar header, DashboardDrawer side panel, and PostureBreakdownContent to the new alpha dashboard. The CommandBar displays an animated posture score badge with trend indicator, stat pills (DSRs pending, overdue, systems, violations), and a dark mode toggle. Clicking the posture score (in both CommandBar and PostureCard) opens the DashboardDrawer with a posture breakdown. This PR also restores the clickable score interaction on PostureCard that connects it to the drawer.

Code Changes

  • clients/admin-ui/src/home/CommandBar.tsx - New component: header bar with posture score badge (animated via useCountUp), diff indicator, stat pills derived from priority actions, and optional dark mode toggle
  • clients/admin-ui/src/home/DashboardDrawer.tsx - New component: Ant Design Drawer wrapper consuming the useDashboardDrawer global store
  • clients/admin-ui/src/home/PostureBreakdownContent.tsx - New component: drawer content showing posture dimension scores with band indicators
  • clients/admin-ui/src/home/PostureBreakdownContent.module.scss - Styles for posture breakdown layout
  • clients/admin-ui/src/home/PostureCard.tsx - Restore clickable score wrapper and openPostureDrawer callback connecting to DashboardDrawer
  • clients/admin-ui/src/home/PostureCard.module.scss - Add .clickableScore style
  • clients/admin-ui/src/home/HomeContainer.tsx - Import and render <CommandBar /> in the alphaDashboard layout header
  • clients/admin-ui/src/home/HomeDashboard.tsx - Add <DashboardDrawer /> to the dashboard layout
  • changelog/7660-dashboard-command-bar.yaml - Changelog entry

Steps to Confirm

  1. Enable the alphaDashboard feature flag
  2. Navigate to the Home page — verify the CommandBar appears at the top with a posture score, trend arrow, and stat pills
  3. Click the posture score badge in the CommandBar — verify the DashboardDrawer opens from the right with a posture breakdown
  4. Click the posture score in the PostureCard — verify the same drawer opens
  5. Close the drawer — verify it closes cleanly
  6. If alphaDarkMode is also enabled, verify the theme toggle appears in the CommandBar

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

… data

Add the plumbing for the new Ant Design dashboard behind the
alphaDashboard feature flag. Includes RTK Query API slice with all
dashboard endpoints, MSW mock handlers with seed data, RadarChart
and ChartText fidesui enhancements, and the HomeContainer flag gate.

The actual Posture and Priority Actions cards will be added in a
follow-up PR on top of this branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Mar 17, 2026 8:28pm
fides-privacy-center Ignored Ignored Mar 17, 2026 8:28pm

Request Review

kruulik and others added 4 commits March 16, 2026 11:38
Move all type definitions from dashboard.slice.ts to a dedicated
types.ts file per frontend guidelines. Convert union types (PostureBand,
DiffDirection, ActionType, ActionSeverity, ActionStatus) to TypeScript
enums. Update mock data and handlers to use enum values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the Posture score card with animated count-up, radar chart with
dimension click-through, and agent annotation alert. Add the Priority
Actions card with per-action routing, urgency grouping, and dimension
filter support. Includes shared hooks and fidesui chart enhancements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, and RadarChart

- Consolidate posture-constants.ts into features/dashboard/constants.ts
- Replace router.push() with NextLink for proper a11y and prefetching
- Add Spin loading wrapper to PostureCard
- Move inline styles to SCSS modules (PostureBreakdownContent, PostureCard tooltip)
- Extract RadarTooltipContent to its own exported component with themed bg
- Use classNames package instead of manual class joining in RadarChart
- Extract magic numbers as named constants in RadarChart
- Add named export alongside default in HomeDashboard
- Rename "this_week" urgency group to "scheduled"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kruulik and others added 2 commits March 16, 2026 13:30
Remove openPostureDrawer, PostureBreakdownContent import, and clickable
score wrapper from PostureCard — these are re-added in the subsequent
dashboard-command-bar-pr branch where DashboardDrawer is rendered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kruulik and others added 6 commits March 16, 2026 13:45
Moved to dashboard-command-bar-pr where the drawer is introduced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the CommandBar header with live posture score, diff indicator, and
summary stat pills. Add the DashboardDrawer for posture breakdown
details triggered from PostureCard and CommandBar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace string literals with enum values (DiffDirection, PostureBand,
ActionType, ActionSeverity, ActionStatus) and update posture-constants
import to use the new features/dashboard/constants path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…Card

Move PostureBreakdownContent from posture-actions PR into this PR since
it's only used for the drawer, which is introduced here. Re-add the
clickable score wrapper and openPostureDrawer callback to PostureCard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This hook was removed from dashboard-posture-actions since the drawer
is introduced in this PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kruulik kruulik force-pushed the dashboard-command-bar-pr branch from e6b5ff9 to 69deb9c Compare March 16, 2026 17:45
kruulik and others added 2 commits March 16, 2026 13:48
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kruulik and others added 5 commits March 16, 2026 14:45
- Add fallback routes for POLICY_VIOLATION, PIA_UPDATE, and DSR_ACTION when IDs are missing
- Remove unused ACTION_TYPE_ICON_NAME constant

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
openPostureDrawer();
}
}}
>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK solution for accessibility, but still possibly missing an aria-label (not sure what Statistic component provides)

Copy link
Copy Markdown
Contributor Author

@kruulik kruulik Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, Ant's Statistic doesn't provide an aria label - this could be a good addition to our CustomStatistic HOC to improve accessibility.

- Refactor drawer to use discriminated union instead of ReactNode to prevent stale data
- PostureBreakdownContent now subscribes to RTK Query directly
- Use Ant Design token names for Flex gaps (large, small)
- Add aria-label to clickable posture score
- Extract BAND_COLOR_TOKEN to shared constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Base automatically changed from dashboard-posture-actions to main March 17, 2026 20:23
@kruulik kruulik enabled auto-merge March 17, 2026 20:28
@kruulik kruulik added this pull request to the merge queue Mar 17, 2026
Merged via the queue into main with commit d5252f7 Mar 17, 2026
46 checks passed
@kruulik kruulik deleted the dashboard-command-bar-pr branch March 17, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants