Skip to content

ENG-3386: system-template badge + sectioned popover for standard reports#7910

Draft
adamsachs wants to merge 1 commit intomainfrom
ENG-3386-fe-system-template-badge
Draft

ENG-3386: system-template badge + sectioned popover for standard reports#7910
adamsachs wants to merge 1 commit intomainfrom
ENG-3386-fe-system-template-badge

Conversation

@adamsachs
Copy link
Copy Markdown
Contributor

Ticket ENG-3386

Dependency: Requires fidesplus#3407 to be merged first (provides the system_template_key field on CustomReportResponseMinimal).

Description Of Changes

Frontend companion to the OOTB regulatory reporting templates backend (ethyca/fidesplus#3407). When the backend seeds system-owned ICO/DPC/CNIL datamap reports, this PR surfaces them in the custom-reports popover with clear visual differentiation:

  • Sectioned layout: "Standard templates" (system-seeded) appear above "Your reports" (user-created), each with a label header. When only user reports exist the layout is unchanged (no headers).
  • "Standard" tag: system-owned reports display an info-coloured Tag with a tooltip explaining they're out-of-the-box and cannot be deleted.
  • Delete suppression: the trash-can button is hidden for system-template rows. (The backend also returns 403 on a direct DELETE call as defense in depth.)

Code Changes

  • clients/admin-ui/src/types/api/models/CustomReportResponseMinimal.ts — adds system_template_key?: string | null (hand-edited pending type regeneration after fidesplus PR merge)
  • clients/admin-ui/src/types/api/models/CustomReportResponse.ts — same field addition (inherited in the backend, hand-edited here)
  • clients/admin-ui/src/features/common/custom-reports/CustomReportTemplates.tsx:
    • Splits searchResults into systemReports / userReports via useMemo
    • Renders two labelled sections inside the existing Radio.Group
    • Adds Tag (colour info) + Tooltip on system-template rows
    • Hides the delete Button for rows with system_template_key
  • clients/admin-ui/cypress/fixtures/custom-reports/minimal-with-system-template.json — new fixture with one system and one user report
  • clients/admin-ui/cypress/e2e/datamap-report.cy.ts — two new tests inside the "Custom report templates" describe block:
    • "groups system templates above user reports with a 'Standard' tag"
    • "suppresses the delete affordance on system templates"

Steps to Confirm

  1. With fidesplus#3407 running, confirm the datamap Reports popover shows "Standard templates" and "Your reports" sections:
    • Navigate to the datamap report page
    • Click the "Reports" dropdown
    • Expected: ICO/DPC/CNIL appear under "Standard templates" with a blue "Standard" tag. Any user-created reports appear under "Your reports".
  2. Confirm system templates cannot be deleted from the UI:
    • Open the Reports popover
    • Expected: no trash-can icon next to standard-template rows; user-report rows still show the trash can.
  3. Run Cypress tests:
    npx cypress run --spec cypress/e2e/datamap-report.cy.ts
    Expected: all tests pass, including the two new system-template tests.

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Updates unreleased work already in Changelog, no new entry necessary (changelog on fidesplus side)
  • UX feedback:
    • All UX related changes have been reviewed by a designer
  • Followup issues:
    • Followup issues created — type regeneration after fidesplus#3407 merges
    • No other followups
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required (covered in fidesplus PR)

🤖 Generated with Claude Code

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>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 14, 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 14, 2026 0:44am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Apr 14, 2026 0:44am

Request Review

@github-actions
Copy link
Copy Markdown

Title Lines Statements Branches Functions
admin-ui Coverage: 7%
5.87% (2561/43618) 4.91% (1214/24708) 3.96% (512/12911)
fides-js Coverage: 78%
78.98% (1962/2484) 65.55% (1214/1852) 72.57% (336/463)
privacy-center Coverage: 88%
85.93% (330/384) 81.1% (176/217) 78.87% (56/71)

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