Skip to content

ENG-706: Migrate datamap report table to Ant Design#7780

Open
gilluminate wants to merge 17 commits intomainfrom
gill/ENG-706/migrate-datamap-report-table
Open

ENG-706: Migrate datamap report table to Ant Design#7780
gilluminate wants to merge 17 commits intomainfrom
gill/ENG-706/migrate-datamap-report-table

Conversation

@gilluminate
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate commented Mar 27, 2026

Ticket ENG-706

Description Of Changes

Migrate the datamap report table from TanStack Table (via FidesTableV2) to Ant Design's Table component. This also migrates column settings from the v2 directory to a shared location and replaces Formik form handling with Ant Design Form for column renaming.

Code Changes

  • Extract useDatamapReportTable hook from DatamapReportTable.tsx to encapsulate all table state management (pagination, sorting, filtering, grouping, column configuration, custom reports)
  • Extract groupDatamapRows utility for client-side row grouping with expand/collapse support
  • Create new shared DraggableColumnList and DraggableColumnListItem components under table/column-settings/, replacing the v2 versions
  • Refactor DatamapReportTableColumns.tsx to use Ant Design column definitions with CustomColumnsType instead of TanStack column helpers
  • Update CustomTable and CustomTableHeaderCell in fidesui to support column-level dropdown menus via a menu prop
  • Update Cypress tests to use getAntDropdownOverlay command for dropdown overlay selectors
  • Fix stale closure in handleExport by checking promise result directly instead of captured boolean
  • Remove dead ItemTypes export and unused isExportReportError from hook return

Steps to Confirm

  1. Navigate to the Data Map Report page
  2. Verify the table renders with all columns and data
  3. Test column reordering via Edit Columns modal (drag and drop)
  4. Test column show/hide via Edit Columns modal (toggle switches)
  5. Test column renaming via Rename Columns
  6. Test grouping by System, Data Use, and System Group
  7. Test expand/collapse on multi-value columns (e.g., data categories)
  8. Test filtering via the filter modal
  9. Test custom report templates (load, save, reset, delete)
  10. Test CSV/XLSX export
  11. Test system preview drawer (click system name)
  12. Verify column settings persist across page reloads

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
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 Apr 1, 2026 6:42pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Apr 1, 2026 6:42pm

Request Review

@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch 2 times, most recently from cefd234 to 2b8837b Compare March 30, 2026 16:38
gilluminate added a commit that referenced this pull request Mar 30, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from 2b8837b to d3632d9 Compare March 30, 2026 16:39
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch 2 times, most recently from 7c17d24 to a0fc7c3 Compare March 30, 2026 16:57
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from 059e53a to 858dcdb Compare March 30, 2026 23:40
gilluminate added a commit that referenced this pull request Mar 30, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from 858dcdb to 9c333c6 Compare March 30, 2026 23:41
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from 598271b to b8131e2 Compare March 31, 2026 02:57
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from b8131e2 to e4fea42 Compare March 31, 2026 03:27
gilluminate added a commit that referenced this pull request Mar 31, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gilluminate gilluminate force-pushed the gill/ENG-706/migrate-datamap-report-table branch from e4fea42 to 64b0fd0 Compare March 31, 2026 17:46
Replaces TanStack Table implementation with Ant Design table for the
datamap report. Moves column settings components out of v2/ into a
dedicated column-settings/ directory, extracts row grouping logic into
groupDatamapRows.ts, and extracts table state into useDatamapReportTable hook.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gilluminate and others added 9 commits March 31, 2026 11:47
react-dnd HTML5 backend requires a DataTransfer object on drag events
to initialize a drag session. Headless Chrome in CI doesn't auto-create
one on synthetic events, so the drag was silently a no-op.

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

github-actions bot commented Mar 31, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 7%
5.67% (2393/42143) 4.57% (1094/23891) 3.8% (477/12528)
fides-js Coverage: 78%
78.98% (1962/2484) 65.55% (1214/1852) 72.57% (336/463)
privacy-center Coverage: 86%
83.18% (287/345) 77.15% (152/197) 75% (48/64)

@gilluminate gilluminate marked this pull request as ready for review March 31, 2026 17:58
@gilluminate gilluminate requested a review from a team as a code owner March 31, 2026 17:58
@gilluminate gilluminate requested review from lucanovera and removed request for a team March 31, 2026 17:58
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.

Code Review — PR 7780: Migrate datamap report table to Ant Design

Overall this is a well-structured migration. The decision to extract all table logic into useDatamapReportTable, implement grouping via flat rowKey/rowSpan metadata in groupDatamapRows, and decouple ColumnSettingsModal from TanStack's TableInstance are all clean improvements. The Cypress test updates are thorough.

Actionable issues

Bug (silent render of "null"/"undefined") — Several boolean columns (COOKIE_REFRESH, DOES_INTERNATIONAL_TRANSFERS, EXEMPT_FROM_PRIVACY_REGULATIONS, PROCESSES_PERSONAL_DATA, REQUIRES_DATA_PROTECTION_ASSESSMENTS, USES_COOKIES, USES_NON_COOKIE_ACCESS, USES_PROFILING) call String(value) without a null guard. When the API returns null for these fields the cell displays the literal text "null". Other columns in the same file already guard with value !== null && value !== undefined ? String(value) : "". See inline comment on DatamapReportTableColumns.tsx:366.

Type confusion (inverted parameter names)DraggableColumnListItem's prop type declares moveColumn: (hoverIndex, dragIndex), but the function is called as moveColumn(dragIndex, hoverIndex) and the implementation in DraggableColumnList expects (dragIndex, hoverIndex). The runtime behavior is correct because both are number, but the inverted names are a future footgun. See inline comment on DraggableColumnListItem.tsx:16.

Stale column order on custom-field changes — The useEffect at useDatamapReportTable.tsx:252 suppresses columns and setColumnOrder from its deps. If a user's custom fields change after initial render, the column order won't be updated to include the new fields until groupBy or datamapReport also changes. See inline comment.

Minor / nits

  • InteractiveTextCell: redundant ellipsis prop on the outer LinkText (inner Text already handles it). See inline.
  • groupDatamapRows rowKey: including idx in the key can cause unnecessary React reconciliation if the server returns rows in a different order on refetch. See inline.
  • sticky -top-6: hardcoded offset is fragile if the surrounding layout changes. A clarifying comment explaining what it compensates for would help. See inline.
  • CustomTable / columnKey gating: the conditional is correct but a brief comment on why columnKey is only forwarded when a menu is present would aid readability. See inline.
  • ColumnSettingsModal dep on columns: adding columns to the initialColumns memo deps is the right fix from the old version. Worth a manual smoke-test of the "apply saved report → open Edit Columns" flow to confirm no race between columns and savedCustomReportId updates. See inline.

Fix inverted moveColumn param names, add null guards for boolean column
renders, remove redundant ellipsis prop, add missing prefixColumns memo
dep, and add clarifying comment for columnKey gating.

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

vercel bot commented Mar 31, 2026

Deployment failed with the following error:

Invalid request: `attribution.gitUser` should NOT have additional property `isBot`.

@gilluminate
Copy link
Copy Markdown
Contributor Author

@claude

Copy link
Copy Markdown
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.

The new table looks great! I've tested all functionality. Only found one small bug I think we should fix: if you change the "Group by" you can't expand the +x tags anymore until you reload the page. Other than that everything else works correctly so I'll give the approve now

@gilluminate
Copy link
Copy Markdown
Contributor Author

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