ENG-3386: system-template badge + sectioned popover for standard reports#7910
Draft
adamsachs wants to merge 2 commits intoENG-3386-custom-field-system-managedfrom
Draft
ENG-3386: system-template badge + sectioned popover for standard reports#7910adamsachs wants to merge 2 commits intoENG-3386-custom-field-system-managedfrom
adamsachs wants to merge 2 commits intoENG-3386-custom-field-system-managedfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
2 tasks
5 tasks
fcf399b to
a79f5b2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ENG-3386-custom-field-system-managed #7910 +/- ##
=====================================================================
Coverage 84.98% 84.98%
=====================================================================
Files 631 631
Lines 41245 41245
Branches 4787 4787
=====================================================================
Hits 35050 35050
Misses 5110 5110
Partials 1085 1085 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1e20083 to
3f4eb00
Compare
1982008 to
7f14089
Compare
3f4eb00 to
26aaefc
Compare
Splits the datamap custom-reports popover into 'Standard templates' and 'Your reports' sections when ICO/DPC/CNIL (or any future system-seeded) templates are present, with a 'Standard' tag and a suppressed delete affordance on system-owned rows. Falls back to the prior flat layout when only user reports exist. Extends the generated CustomReportResponseMinimal/CustomReportResponse types with the new optional system_template_key field surfaced by fidesplus. Hand-edited here pending a scheduled type regeneration after the fidesplus PR merges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7f14089 to
703d2ad
Compare
Surfaces the new system_managed flag on CustomFieldDefinition (fides#7999) so admins can tell apart fields created by the regulatory reporting templates reconciler from their own fields, and prevents accidental edits / deactivation. Custom fields table - Renders a "System" Tag + Tooltip next to the name for system_managed rows, matching the "Standard" tag pattern on the reports popover. - Disables the Enabled toggle via isDisabled for system_managed rows — deactivating a template-backing field breaks the template silently. - Hides the Edit button for system_managed rows (navigation to the detail page via the name link still works for read access). Custom field form - Shows an info Alert at the top of the form explaining the field is template-managed and cannot be edited here. - Disables the whole Form via its `disabled` prop (antd cascades to every control). - Hides Save and Delete buttons entirely. The FE contract (`system_managed` optional boolean) is hand-edited into the three generated TS types pending a full regeneration after the OSS schema PR (fides#7999) lands. Tests - New Cypress describe block `System-managed custom fields` with three cases: tag presence, Edit-button suppression, form alert + disabled controls. Fixtures added for a list containing one system row and the corresponding detail response. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
703d2ad to
7a78f4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket ENG-3386
Description Of Changes
Admin UI surface for the regulatory reporting templates backend. Two surfaces are updated:
Custom reports popover — when the backend materialises a system-owned ICO/DPC/CNIL datamap report (driven by the tenant's selected fides locations — UK → ICO, Ireland → DPC, France → CNIL), this PR surfaces them:
info-coloured Tag with a tooltip explaining they're out-of-the-box and cannot be deleted.Custom-fields management UI — the gap
CustomFieldDefinitions seeded by the reconciler (e.g. Controller's Representative, DPA 2018 Schedule 1 Condition) carrysystem_managed=trueand are distinguished in the admin UI so they can't be accidentally edited or disabled:Locked, size 14, muted gray) rendered inline after the field name in the table, with a tooltip: "This field is built into Fides to support a reporting template. It's added and removed automatically based on your Fides location settings."infoAlert at the top ("Managed by Fides"), disables every control via antdForm.disabled, and hides Save + Delete entirely.Code Changes
clients/admin-ui/src/types/api/models/CustomReportResponseMinimal.ts/CustomReportResponse.ts— addssystem_template_key?: string | null(hand-edited pending type regeneration)clients/admin-ui/src/types/api/models/CustomFieldDefinition*.ts(×3) — addssystem_managed?: booleanclients/admin-ui/src/features/common/custom-reports/CustomReportTemplates.tsx— sections + "Standard" tag + delete suppressionclients/admin-ui/src/features/custom-fields/useCustomFieldsTable.tsx— lock icon next to managed row names, disabled toggle, hidden Edit buttonclients/admin-ui/src/features/custom-fields/CustomFieldForm.tsx— Alert + full-form disable + hidden Save/Delete for managed rowsclients/admin-ui/cypress/e2e/datamap-report.cy.ts— two new popover testsclients/admin-ui/cypress/e2e/custom-fields.cy.ts— newSystem-managed custom fieldsdescribe block: lock presence, Edit suppression, edit-form guardclients/admin-ui/cypress/fixtures/custom-reports/minimal-with-system-template.json— new fixtureclients/admin-ui/cypress/fixtures/custom-fields/list-with-system-field.json+detail-system-managed.json— new fixturesSteps to Confirm
/settings/custom-fields; confirm the Fides-seeded gap fields (e.g. Controller's Representative) show a lock icon next to the name, the Enabled toggle is disabled, and no Edit button appears.Pre-Merge Checklist
CHANGELOG.mdupdated🤖 Generated with Claude Code