Skip to content

ENG-3555: Migrate SystemDataForm (history diff) to Ant Design#8239

Open
gilluminate wants to merge 2 commits into
mainfrom
gill/eng-3555/system-data-form-antd
Open

ENG-3555: Migrate SystemDataForm (history diff) to Ant Design#8239
gilluminate wants to merge 2 commits into
mainfrom
gill/eng-3555/system-data-form-antd

Conversation

@gilluminate
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate commented May 19, 2026

Ticket ENG-3555

Description Of Changes

Migrate the read-only system history diff view from Chakra UI and Formik to Ant Design. The form is purely for display (no validation, no submit) so Formik is dropped entirely — values are read directly from SelectedHistoryContext instead of via useField.

The diff highlight styling (red "before" / green "after" with the arrow indicator) moves from inline Chakra props into a CSS module using Ant theme tokens. The card chrome is now fidesui Card with the body padding zeroed so the field cells own their own spacing.

Code Changes

  • clients/admin-ui/src/features/system/history/modal/SystemDataForm.tsx — replace the Formik wrapper with a Flex vertical and pass values via context.
  • clients/admin-ui/src/features/system/history/modal/SystemDataGroup.tsx — use fidesui Card (string title + variant="outlined"); align header padding with field cell padding; delete the per-group SCSS module.
  • clients/admin-ui/src/features/system/history/modal/fields/SystemDataTextField.tsx — replace ChakraVStack/ChakraFlex/ChakraText with antd Flex and Typography.Text; preserve the height-measurement workaround that keeps before/after rows aligned.
  • clients/admin-ui/src/features/system/history/modal/fields/SystemDataTags.tsx — same migration; replace any[] with a TagValue = string | { fides_key: string } union.
  • clients/admin-ui/src/features/system/history/modal/fields/SystemDataSwitch.tsx — same migration; show a YES/NO Tag instead of a Chakra badge.
  • clients/admin-ui/src/features/system/history/modal/fields/SystemDataField.module.scss — new module for the diff highlight classes; uses color-error-bg/color-error-border and the symmetric color-success-bg/color-success-border Ant tokens.

Steps to Confirm

  1. Navigate to Data inventory → System inventory and edit any system to generate a history entry (or pick a system that already has changes recorded).
  2. Open the History tab on that system.
  3. Click a history row — SystemHistoryModal opens with the before/after diff.
  4. Verify each field type renders correctly:
    • Text fields (System name, Description, etc.) — labels and values align; rows where before/after differ show the dashed red border on the left and dashed green border on the right with the arrow.
    • Tag fields (Data uses, Data categories, Data subjects) — tag lists render and align in height across before/after.
    • Switch fields (boolean toggles like processes_personal_data) — render as a YES/NO tag.
  5. The SystemDataGroup card header ("System details", "Privacy declarations", etc.) sits flush with the field labels (16px left padding).

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
Copy Markdown
Contributor

vercel Bot commented May 19, 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 May 20, 2026 9:13pm
fides-privacy-center Ignored Ignored May 20, 2026 9:13pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 11%
8.55% (4053/47394) 7.6% (2094/27530) 5.82% (812/13931)
fides-js Coverage: 78%
79.17% (1977/2497) 66.25% (1249/1885) 73.31% (349/476)
privacy-center Coverage: 86%
83.95% (403/480) 81.25% (208/256) 76.13% (67/88)

@gilluminate gilluminate marked this pull request as ready for review May 20, 2026 18:15
@gilluminate gilluminate requested a review from a team as a code owner May 20, 2026 18:15
@gilluminate gilluminate requested review from Kelsey-Ethyca and lucanovera and removed request for a team May 20, 2026 18:15
gilluminate and others added 2 commits May 20, 2026 15:13
Migrate the read-only system history diff view from Chakra/Formik to
antd. Drop Formik entirely (the view is read-only) and read values
directly from the SelectedHistoryContext.

- SystemDataForm: replace Formik wrapper with Flex vertical
- SystemDataGroup: use fidesui Card with aligned header padding
- SystemData{TextField,Tags,Switch}: replace Chakra layout with Flex,
  Typography, and Tag; move diff highlight styling into a CSS module
- Replace any[] in SystemDataTags with a TagValue union type
- Use symmetric Ant success bg/border tokens for highlightAfter

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gilluminate gilluminate force-pushed the gill/eng-3555/system-data-form-antd branch from c109c6b to b7a4035 Compare May 20, 2026 21:13
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.

1 participant