Skip to content

refactor(ui): redesign compliance page layout and components#10767

Merged
alejandrobailo merged 6 commits into
masterfrom
refactor/improve-compliance-ui
Apr 21, 2026
Merged

refactor(ui): redesign compliance page layout and components#10767
alejandrobailo merged 6 commits into
masterfrom
refactor/improve-compliance-ui

Conversation

@alejandrobailo
Copy link
Copy Markdown
Contributor

Context

Split from #10734 — this PR contains the Compliance UI refactor; the fixes for muted findings and filter/selector UX remain in #10734 as a backport.

Redesigns the Compliance page layout, migrates the Progress component from HeroUI to shadcn, adds a horizontal ThreatScore card with always-visible pillar breakdown, client-side search for compliance frameworks, a compact scan selector trigger, and improved download UX.

Description

  • New shadcn Progress component replacing HeroUI's <Progress>, backed by @radix-ui/react-progress with semantic design tokens (bg-bg-pass, bg-bg-fail, bg-bg-warning)
  • Redesigned compliance page layout — 3-row structure: filters → horizontal ThreatScore card (always-visible pillar breakdown + ActionDropdown) → compliance grid with client-side search
  • Client-side compliance search — new ComplianceOverviewGrid client component with controlled DataTableSearch, since the backend does not support compliance search filtering
  • Compact scan selector trigger — replaced full ComplianceScanInfo with a Badge showing Scan: <name>; full info kept in dropdown items
  • Responsive compliance filters — each filter takes a full row on mobile (w-full), inline layout at sm: breakpoint
  • Download-started toast — CSV and PDF downloads now show an immediate "Download Started" toast before the server action runs
  • Enhanced compliance cards — single-line truncated title with Tooltip, mobile-first action layout, ComplianceDownloadContainer with dropdown/icon-only modes
  • Alert-based empty/error states replacing ComplianceOverviewPanel wrappers
  • Adds optional width to FilterOption (consumed by ComplianceHeader) — note: same 1-line type addition also lives in fix(ui): exclude muted findings and polish filter selectors #10734 so the branch compiles standalone; the hunk is identical and resolves cleanly on rebase

Steps to review

  1. Scan selector triggerui/components/compliance/compliance-header/scan-selector.tsx: trigger shows Scan: label + Badge with scan name; dropdown items still render full ComplianceScanInfo
  2. Responsive filtersui/components/compliance/compliance-header/compliance-filters.tsx
  3. Download toastsui/lib/helper.ts downloadComplianceCsv and downloadComplianceReportPdf both call toast() before the server action
  4. Compliance page layoutui/app/(prowler)/compliance/page.tsx for the 3-row layout and Alert empty states
  5. Client-side searchui/components/compliance/compliance-overview-grid.tsx
  6. ThreatScore horizontal cardui/components/compliance/threatscore-badge.tsx
  7. Compliance cardui/components/compliance/compliance-card.tsx
  8. Download containercompliance-download-container.tsx
  9. Tests — new test files under ui/components/compliance/ and ui/app/(prowler)/compliance/page.test.tsx
  10. Changelogui/CHANGELOG.md entry under 1.25.0

Checklist

  • Review if the code is being covered by tests.
  • Review if backport is needed.

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alejandrobailo alejandrobailo requested a review from a team as a code owner April 17, 2026 08:16
- Horizontal ThreatScore card with always-visible pillar breakdown and ActionDropdown
- Client-side search for compliance frameworks via ComplianceOverviewGrid
- Compact scan selector Badge trigger, full info kept in dropdown items
- Responsive compliance filters: full-width on mobile, inline on sm+
- Download-started toast for CSV/PDF exports in downloadCompliance helpers
- Enhanced compliance cards: truncated title with Tooltip and mobile-first buttons
- Replace HeroUI Progress with shadcn Progress (radix-ui)
- Alert-based empty/error states replacing ComplianceOverviewPanel wrappers
- Add optional width field to FilterOption type (consumed by ComplianceHeader)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@alejandrobailo alejandrobailo force-pushed the refactor/improve-compliance-ui branch from 75db3f0 to 9b42fb7 Compare April 17, 2026 08:16
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

🔒 Container Security Scan

Image: prowler-ui:115a2c1
Last scan: 2026-04-21 07:28:59 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

Copy link
Copy Markdown
Contributor

@pfe-nazaries pfe-nazaries left a comment

Choose a reason for hiding this comment

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

Inline review comments on the compliance UI refactor.

Comment thread ui/components/compliance/compliance-header/compliance-filters.tsx Outdated
Comment thread ui/components/compliance/compliance-card.tsx
pfe-nazaries
pfe-nazaries previously approved these changes Apr 17, 2026
Copy link
Copy Markdown
Contributor

@pfe-nazaries pfe-nazaries left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@pfe-nazaries pfe-nazaries left a comment

Choose a reason for hiding this comment

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

LGTM

@alejandrobailo alejandrobailo merged commit fc3066b into master Apr 21, 2026
37 checks passed
@alejandrobailo alejandrobailo deleted the refactor/improve-compliance-ui branch April 21, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants