Skip to content

Conversation

@jpople
Copy link
Contributor

@jpople jpople commented Nov 6, 2025

Description Of Changes

Adds messageContext to the FidesUIProvider so toasts are appropriately themed globally and the useMessage hook can be called more nicely.

Screenshot 2025-11-06 at 16 44 37

Steps to Confirm

  1. Test messages using Ant POC page or, for example, by modifying the groups on one or more systems on the system inventory
  2. Messages should have Fides brand colors as in screenshot above

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:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link

vercel bot commented Nov 6, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Nov 18, 2025 5:24pm
fides-privacy-center Ignored Ignored Nov 18, 2025 5:24pm

@jpople jpople marked this pull request as ready for review November 13, 2025 23:19
@jpople jpople requested a review from a team as a code owner November 13, 2025 23:19
@jpople jpople requested review from lucanovera and removed request for a team November 13, 2025 23:19
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 13, 2025

Greptile Overview

Greptile Summary

This PR refactors the Ant Design message API to use a centralized context provider pattern. The message.useMessage() hook is now called once in FidesUIProvider and the resulting messageApi is made available via a new useMessage() hook through React context.

Key changes:

  • Added messageContext to FidesUIProvider with a custom useMessage hook for global toast theming
  • Removed AntMessage export from fidesui package
  • Refactored 40+ components to use the new useMessage() hook instead of local message.useMessage() calls
  • Eliminated duplicate messageContext holders throughout the codebase
  • Updated hook signatures to remove messageApi parameters (now accessed internally via useMessage())

Benefits:

  • Consistent toast theming across the entire application
  • Cleaner component code with fewer context holders to render
  • Single source of truth for message API configuration
  • Improved developer experience with simpler hook usage

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • This is a well-executed refactoring that follows React best practices. The changes are systematic and consistent across all files. The author fixed type errors and linting issues in follow-up commits. The pattern properly implements context with error handling, and all components correctly use the new hook. No breaking changes to functionality, just improved architecture.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
clients/fidesui/src/FidesUIProvider.tsx 5/5 Adds message context to provider with proper error handling and hook export
clients/fidesui/src/index.ts 5/5 Removes AntMessage export as it's replaced by useMessage hook
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/useFieldActions.tsx 5/5 Moved useMessage call inside hook, removed from function parameters
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/useBulkActions.tsx 5/5 Moved useMessage call inside hook, removed from function parameters
clients/admin-ui/src/features/data-discovery-and-detection/action-center/fields/page.tsx 5/5 Removed local message context and API, cleaned up hook parameters

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

42 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

Thanks for adding this developer improvements and updating the code everywhere. Code changes look good and the toasts work! I'll leave the approve and ask you just some small updates to make the PR complete: add DX entry in the changelog, update steps to reproduce with a way to test at least one of the toasts that was updated.

@jpople jpople enabled auto-merge November 17, 2025 19:39
@jpople jpople disabled auto-merge November 17, 2025 19:45
@jpople jpople added this pull request to the merge queue Nov 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 18, 2025
@jpople jpople added this pull request to the merge queue Nov 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 18, 2025
@jpople jpople added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit 6415125 Nov 18, 2025
46 of 47 checks passed
@jpople jpople deleted the jpople/2025-11-06/toasts branch November 18, 2025 19:08
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.

4 participants