ENG-2597: FE condition builder location updates#7495
Merged
gilluminate merged 6 commits intomainfrom Feb 26, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
c430e42 to
b2adf2a
Compare
Contributor
Greptile SummaryThis PR enhances the policy condition builder with multiselect support for location fields and refactors field constants for better maintainability. Key improvements:
Code quality:
Minor note:
Confidence Score: 5/5
Important Files Changed
Last reviewed commit: b2adf2a |
clients/admin-ui/src/features/policies/conditions/PolicyConditionForm.tsx
Show resolved
Hide resolved
jpople
approved these changes
Feb 26, 2026
Contributor
jpople
left a comment
There was a problem hiding this comment.
Functionality looks good, tested in Vercel and didn't run into any issues. Non-blocking UX feedback, but "List contains" rules are a bit confusing to parse in the list view IMO. If it's possible to render in the opposite order (e.g. "GB, US" "contains" "country") I think that'd be clearer, and I think using the same "Country/Territory" labels we do in the select would be better as well.
gilluminate
added a commit
that referenced
this pull request
Feb 26, 2026
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-2597
Description Of Changes
Enhance the policy condition builder with multiselect support for location and country fields, refactor field address constants into a centralized enum, and polish the policy conditions UI.
Key changes:
locationandlocation_countryfields when operator isLIST_CONTAINS(single-select remains forlocation_groupsandlocation_regulationssince their operator is always fixed)PrivacyRequestFieldconstant object to replace hardcoded field address strings throughout the codebaseFieldValuetype into sharedtypes.tsto resolve import cycle betweenConditionValueSelectorandutilsEmptycomponent for empty states in conditions/rules listsCode Changes
clients/admin-ui/src/features/integrations/configure-tasks/utils.ts- Refactored field address strings intoPrivacyRequestFieldconst, replaced if/else chain withFIELD_TYPE_MAPlookup, updatedparseConditionValue/parseStoredValueForFormto support array valuesclients/admin-ui/src/features/integrations/configure-tasks/types.ts- AddedFieldValuetype (moved from ConditionValueSelector to break import cycle)clients/admin-ui/src/features/integrations/configure-tasks/components/ConditionValueSelector.tsx- Added multiselect support forlocationandlocation_countryfields, keptlocation_groups/location_regulationsas single-selectclients/admin-ui/src/features/integrations/configure-tasks/AddConditionForm.tsx- Added operator-change value reset, pass operator prop to ConditionValueSelector, support string[] in form valuesclients/admin-ui/src/features/integrations/configure-tasks/components/PrivacyRequestFieldPicker.tsx- UsePrivacyRequestField.CUSTOM_FIELDS_PREFIXconstantclients/admin-ui/src/features/integrations/configure-tasks/hooks/useCustomFieldMetadata.ts- UsePrivacyRequestField.CUSTOM_FIELDS_PREFIXconstantclients/admin-ui/src/features/policies/conditions/PolicyConditionForm.tsx- Updated field labels, added operator-change value reset, disable operator when no field selected, pass operator to ConditionValueSelectorclients/admin-ui/src/features/policies/conditions/PolicyConditionsTab.tsx- Use AntEmptycomponent for empty state, re-throw save errorsclients/admin-ui/src/features/policies/rules/RulesTab.tsx- UseEmpty.PRESENTED_IMAGE_SIMPLEclients/admin-ui/cypress/e2e/policies/policy-detail.cy.ts- Update test to use new "Country/Territory" labelSteps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and worksMade with Cursor