Skip to content

Fix AgentBriefingBanner theme-aware styling for dark/light mode#7776

Merged
kruulik merged 3 commits intomainfrom
dashboard-fixes
Mar 27, 2026
Merged

Fix AgentBriefingBanner theme-aware styling for dark/light mode#7776
kruulik merged 3 commits intomainfrom
dashboard-fixes

Conversation

@kruulik
Copy link
Copy Markdown
Contributor

@kruulik kruulik commented Mar 27, 2026

Ticket N/A

Description Of Changes

Wrap the AgentBriefingBanner Alert component in a ConfigProvider with theme-aware colors using useThemeMode and palette values. In dark mode, the banner uses FIDESUI_MINOS for background/border; in light mode, it uses FIDESUI_LIMESTONE. This replaces hardcoded theme values with dynamic ones that respond correctly to the active theme.

Also cleans up dead code: removes unused visible/setVisible state since Ant Design's closable prop handles alert dismissal internally.

Code Changes

  • clients/admin-ui/src/home/AgentBriefingBanner.tsx - Wrap Alert in ConfigProvider with theme-aware colors via useThemeMode + palette. Remove unused useState for visibility. Replace useCallback with useMemo for theme config.

Steps to Confirm

  1. Navigate to the dashboard home page
  2. Verify the AgentBriefingBanner displays with correct background color in light mode (limestone)
  3. Switch to dark mode and verify the banner uses the minos background
  4. Click the close button and verify the banner dismisses correctly

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

kruulik and others added 2 commits March 27, 2026 13:08
Wrap Alert in ConfigProvider with theme-aware colors using useThemeMode
and palette values. Uses FIDESUI_MINOS for dark mode and FIDESUI_LIMESTONE
for light mode backgrounds. Remove unused visible state since Ant Design's
closable prop handles dismissal internally.

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

vercel bot commented Mar 27, 2026

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

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Mar 27, 2026 5:17pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Mar 27, 2026 5:17pm

Request Review

@kruulik kruulik marked this pull request as ready for review March 27, 2026 17:12
@kruulik kruulik requested a review from a team as a code owner March 27, 2026 17:12
@kruulik kruulik requested review from gilluminate and lucanovera and removed request for a team and gilluminate March 27, 2026 17:12
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Overall this is a clean, well-scoped change. The approach of wrapping Alert in a nested ConfigProvider to override only the alert's color tokens is consistent with how HomeContainer.tsx and HomeBanner.tsx handle theming, and the useMemo dependency on resolvedMode is correct.

The removal of the local visible/setVisible state in favor of Ant Design's built-in closable behavior is a good simplification — the old controlled state was functionally equivalent to what Ant handles internally.

One item worth confirming before merge: The dark mode colorInfoBg uses FIDESUI_MINOS (#2b2e35) while HomeBanner.tsx uses FIDESUI_BG_MINOS (#4f525b) for dark mode backgrounds. This inconsistency may be intentional if the alert is meant to be very dark, but it's worth double-checking with a designer that the contrast/visibility is correct in practice. See inline comment for details.

Copy link
Copy Markdown
Contributor

@speaker-ender speaker-ender left a comment

Choose a reason for hiding this comment

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

Looks good!

@kruulik kruulik added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit eba172f Mar 27, 2026
48 checks passed
@kruulik kruulik deleted the dashboard-fixes branch March 27, 2026 22:02
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