Skip to content

ENG-3140: Onboarding flow for PBAC#7831

Merged
kruulik merged 53 commits intomainfrom
3140-pbac-onboarding-empty-state
Apr 8, 2026
Merged

ENG-3140: Onboarding flow for PBAC#7831
kruulik merged 53 commits intomainfrom
3140-pbac-onboarding-empty-state

Conversation

@kruulik
Copy link
Copy Markdown
Contributor

@kruulik kruulik commented Apr 4, 2026

Ticket ENG-3140

Description Of Changes

Add an onboarding form that appears as the empty state of the access policies list page. When no policies exist, users see a setup form where they select their industry and operating geographies, pick relevant data use categories, and optionally provide privacy policy documents. Submitting generates tailored access policies that populate the list.

Data use cards pull labels from the fideslang taxonomy via useTaxonomies() so they stay in sync with the API. Mock handlers return industry-specific data use sets (7 per industry) with geography modifiers (EEA adds cookie/consent management, US adds targeted advertising).

Also adds a "Policy config" modal accessible from the list page header for updating geographies and re-generating policies after initial setup.

Code Changes

  • OnboardingForm.tsx — New form component with industry/geography selects, data use card grid, policy URL/file upload, and generate button
  • DataUseCard.tsx — Selectable card displaying a data use with icon and label from fideslang taxonomy
  • PolicySettingsModal.tsx — Modal for updating geographies and uploading new policy docs post-setup
  • PoliciesContainer.tsx — Show loading spinner during fetch, render onboarding form when no policies exist
  • pages/access-policies/index.tsx — Always show page description, conditionally show "Policy config" and "New policy" buttons
  • access-policies.slice.ts — Add getOnboardingDataUses, getOnboardingConfig, and generatePolicies endpoints
  • constants.ts — Add INDUSTRY_OPTIONS and DATA_USE_ICON map
  • types.ts — Add OnboardingFormState, OnboardingDataUsesResponse, OnboardingConfigResponse, GeneratePoliciesResponse
  • mocks/onboarding-data.ts — Industry-to-fideslang data use mapping + geography modifiers
  • mocks/generated-policies.ts — Mock generated policies with YAML
  • mocks/handlers.ts — MSW handlers for config, data-uses, and generate endpoints; policies start empty

Steps to Confirm

  1. Navigate to /access-policies with no existing policies — onboarding form should render inside the page content
  2. Select an industry (e.g. "Fintech") and a geography (e.g. "EEA") — data use cards appear with fideslang-sourced labels
  3. Change industry — cards update to show different data uses
  4. Add EEA → "Cookie & Consent Management" card appears; add US → "Targeted Advertising" card appears
  5. Select some data uses, click "Generate policies" — policies populate and the list view replaces the form
  6. Click "Policy config" in the header — modal opens pre-populated with saved geographies

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

Base automatically changed from ENG-2956-FE-Policies-list to main April 7, 2026 16:47
@kruulik kruulik changed the title ENG-3140: Add onboarding flow as empty state for access policies ENG-3140: Onboarding flow for PBAC Apr 7, 2026
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.

Nice work! The onboarding page looks good. I left a few comments about code improvements and to consider how to demo the feature.

Comment thread clients/admin-ui/src/pages/access-policies/index.tsx Outdated
Comment thread clients/admin-ui/src/pages/access-policies/index.tsx
Comment thread clients/admin-ui/src/features/access-policies/constants.ts Outdated
Comment thread clients/admin-ui/src/features/access-policies/access-policies.slice.ts Outdated
Comment thread clients/admin-ui/src/features/access-policies/constants.ts Outdated
- Rename "Policy config" to "Policy settings" in UI
- Make onboarding page mirror main policies page layout
- Add presets/industries endpoint to fetch industry options dynamically
- Remove unused DATA_USE_ICON constant
- Add /presets/ prefix to all onboarding-related endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kruulik kruulik added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 144934f Apr 8, 2026
49 of 51 checks passed
@kruulik kruulik deleted the 3140-pbac-onboarding-empty-state branch April 8, 2026 17:27
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