Skip to content

Improve display of multiple taxonomies values in policy builder UI#8234

Merged
lucanovera merged 6 commits into
mainfrom
ENG-3783-FE-Improve-UI-UX-for-multiple-categories-in-a-policy-block
May 19, 2026
Merged

Improve display of multiple taxonomies values in policy builder UI#8234
lucanovera merged 6 commits into
mainfrom
ENG-3783-FE-Improve-UI-UX-for-multiple-categories-in-a-policy-block

Conversation

@lucanovera
Copy link
Copy Markdown
Contributor

@lucanovera lucanovera commented May 19, 2026

Ticket ENG-3783

Description Of Changes

Reworks the values input on a match condition (the "Match" node in the access-policy editor canvas) so users can comfortably select and review many taxonomy values at once. Previously the field used an antd multi-select with maxTagCount={1}, which collapsed every selection past the first into a +N indicator — making it effectively impossible to see what was selected when matching against 5–10+ data categories.

The field now follows the chip + add pattern used by the data-discovery TaxonomySelectCell: each selected value renders as its own closable chip and a + "addable" tag opens a full multi-select in place. Closing the editor (click outside) collapses back to the chip list. Because the chip list can grow vertically, the React Flow canvas now sizes condition nodes from their real measured DOM height instead of a hard-coded 310px — so a tall match node pushes its siblings down instead of overlapping them.

Code Changes

  • New ConditionValuesField.tsx in features/access-policies/:
    • Displays selected values as wrapping closable chips with a + add tag.
    • On +, swaps to the appropriate taxonomy multi-select (DataCategorySelect / DataUseSelect / DataSubjectSelect / SystemGroupSelect / CustomTaxonomySelect) opened in mode="multiple", returning to the chip list on blur.
    • Resolves chip labels via useTaxonomies (built-in taxonomies); falls back to the raw fides_key for system groups and custom taxonomies.
  • MatchNode.tsx: removed the inline renderValuesSelect helper and its five taxonomy-select imports; the form field now renders <ConditionValuesField />.
  • AccessPolicyEditor.tsx: nodeSizes memo reads node.measured?.height (populated by React Flow after the node mounts) and feeds it into the dagre layout. The previous hard-coded 310 (condition) / 380 (constraint) values remain as fallbacks for the first paint before measurement is available. As soon as a measurement is available — or whenever a chip is added/removed and the node re-measures — dagre re-runs and positions update.

Steps to Confirm

  1. Open an access policy in the editor (e.g. /access-policies/new or any existing policy).
  2. Add an action and a Match condition; choose Data categories as the taxonomy.
  3. Click the + tag in the values field and select 8–10 categories. Confirm:
    • Each selection renders as its own chip with an ×, all of them visible.
    • Clicking an × removes that single value.
    • Clicking outside the dropdown collapses the editor back to the chip list.
    • Already-selected items do not appear in the dropdown options.
  4. With the long chip list rendered, confirm the Match node does not overlap the next match node below — the canvas should re-flow so spacing between siblings respects the actual height of the taller node.
  5. Repeat with Data uses, Data subjects, System groups, and a custom taxonomy to confirm all five wrapper variants render correctly.
  6. Save the policy and reopen it; confirm the chip list reflects the persisted values.

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:
    • 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.

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment May 19, 2026 4:26pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored May 19, 2026 4:26pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 9%
6.96% (3187/45779) 6.35% (1683/26499) 4.83% (655/13553)
fides-js Coverage: 78%
79.17% (1977/2497) 66.25% (1249/1885) 73.31% (349/476)
privacy-center Coverage: 85%
82.53% (364/441) 79.74% (189/237) 74.07% (60/81)

…ve-UI-UX-for-multiple-categories-in-a-policy-block
@lucanovera lucanovera marked this pull request as ready for review May 19, 2026 16:13
@lucanovera lucanovera requested a review from a team as a code owner May 19, 2026 16:13
@lucanovera lucanovera requested review from kruulik and speaker-ender and removed request for a team and speaker-ender May 19, 2026 16:13
Copy link
Copy Markdown
Contributor

@kruulik kruulik left a comment

Choose a reason for hiding this comment

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

Works great! Tested on nightly, couldn't find any issues.

@lucanovera lucanovera added this pull request to the merge queue May 19, 2026
Merged via the queue into main with commit 44e8bbc May 19, 2026
51 checks passed
@lucanovera lucanovera deleted the ENG-3783-FE-Improve-UI-UX-for-multiple-categories-in-a-policy-block branch May 19, 2026 16:40
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