Skip to content

Migrate consent reporting tables to Ant Design#7295

Merged
gilluminate merged 5 commits intomainfrom
gill/ENG-2276/migrate-consent-preference-lookup-result-tables-ant
Feb 10, 2026
Merged

Migrate consent reporting tables to Ant Design#7295
gilluminate merged 5 commits intomainfrom
gill/ENG-2276/migrate-consent-preference-lookup-result-tables-ant

Conversation

@gilluminate
Copy link
Contributor

@gilluminate gilluminate commented Feb 2, 2026

Ticket ENG-2276

Description Of Changes

Migrated both tables in the consent reporting feature.

  • Migrated TCF consent table to Ant Design with shared TcfConsentTable component
  • Migrated privacy notice preferences table to Ant Design
  • Created useTcfConsentTable hook with exported utility functions for data transformation
  • Created useConsentLookupTable hook for privacy notice table logic
  • Removed deprecated useTcfConsentColumns and useConsentLookupTableColumns hooks
  • Updated Cypress tests to work with new Ant table structure
  • Implemented client-side pagination with URL state disabled for modal contexts

Both tables use useTableState with disableUrlState: true for modal-only data. Exported mapTcfPreferencesToRowColumns and filterTcfConsentPreferences as pure functions for reusability. Maintained existing filtering logic that excludes system/vendor TCF preferences.

Code Changes

  • Created clients/admin-ui/src/features/consent-reporting/TcfConsentTable.tsx - Shared TCF table component
  • Created clients/admin-ui/src/features/consent-reporting/hooks/useTcfConsentTable.tsx - TCF table hook with utility functions
  • Created clients/admin-ui/src/features/consent-reporting/hooks/useConsentLookupTable.tsx - Privacy notice table hook
  • Updated clients/admin-ui/src/features/consent-reporting/ConsentLookupModal.tsx - Uses new Ant tables
  • Updated clients/admin-ui/src/features/consent-reporting/ConsentTcfDetailModal.tsx - Uses new Ant table component
  • Updated clients/admin-ui/cypress/e2e/consent-reporting.cy.ts - Updated test selectors for Ant tables
  • Deleted clients/admin-ui/src/features/consent-reporting/hooks/useTcfConsentColumns.tsx - Replaced by new hook
  • Deleted clients/admin-ui/src/features/consent-reporting/hooks/useConsentLookupTableColumns.tsx - Replaced by new hook

Steps to Confirm

  1. Navigate to Consent Reporting page
  2. Click kebab menu and select "Consent preference lookup"
  3. Search for a user (e.g., test@example.com)
  4. Verify privacy notice preferences table displays correctly with pagination
  5. Verify TCF consent details table displays (if TCF data exists) with pagination
  6. Click on a consent record row and open TCF detail modal
  7. Verify TCF table in modal displays correctly
  8. Confirm all tables show proper styling, badges, and empty states

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

@vercel
Copy link
Contributor

vercel bot commented Feb 2, 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 Feb 3, 2026 4:48pm
fides-privacy-center Ignored Ignored Feb 3, 2026 4:48pm

Request Review

@gilluminate gilluminate force-pushed the gill/ENG-2276/migrate-consent-preference-lookup-result-tables-ant branch 4 times, most recently from 66a1982 to 6915b18 Compare February 3, 2026 16:10
@gilluminate gilluminate marked this pull request as ready for review February 3, 2026 16:21
@gilluminate gilluminate requested a review from a team as a code owner February 3, 2026 16:21
@gilluminate gilluminate requested review from jpople and removed request for a team February 3, 2026 16:21
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 3, 2026

Greptile Overview

Greptile Summary

Migrated all consent reporting tables from TanStack Table (FidesTableV2) to Ant Design, completing the table migration effort for this feature.

Key Changes

  • Created shared TcfConsentTable component for reuse across modals
  • Extracted table logic into useTcfConsentTable and useConsentLookupTable hooks
  • Exported pure utility functions (mapTcfPreferencesToRowColumns, filterTcfConsentPreferences) for reusability
  • Used useTableState with disableUrlState: true for modal-only data
  • Updated Cypress tests to work with Ant Design table structure
  • Removed deprecated TanStack Table column hooks

Implementation Quality

  • Clean separation of concerns with dedicated hooks
  • Proper use of existing useTableState hook for state management
  • Maintained all existing filtering logic (excludes system/vendor TCF preferences)
  • Client-side pagination without URL state for modal contexts
  • Test coverage updated appropriately

Confidence Score: 5/5

  • This PR is safe to merge with no issues found
  • Clean refactoring that replaces TanStack Table with Ant Design while maintaining all existing functionality. Code is well-structured with proper separation of concerns, uses existing hooks correctly, and includes updated test coverage. No logical errors, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

Filename Overview
clients/admin-ui/src/features/consent-reporting/hooks/useTcfConsentTable.tsx Created new hook for TCF table logic with exported utility functions for data transformation
clients/admin-ui/src/features/consent-reporting/hooks/useConsentLookupTable.tsx Created new hook for privacy notice preferences table with Ant Design integration
clients/admin-ui/src/features/consent-reporting/ConsentLookupModal.tsx Migrated from TanStack Table to Ant Design, using new hooks and table components
clients/admin-ui/src/features/consent-reporting/ConsentTcfDetailModal.tsx Simplified modal by using shared TcfConsentTable component instead of inline table logic

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.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@jpople jpople left a comment

Choose a reason for hiding this comment

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

Tested locally, looking good to me, nice refactor.

@gilluminate gilluminate added this pull request to the merge queue Feb 10, 2026
Merged via the queue into main with commit 498adf8 Feb 10, 2026
49 checks passed
@gilluminate gilluminate deleted the gill/ENG-2276/migrate-consent-preference-lookup-result-tables-ant branch February 10, 2026 22:15
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