Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Greptile OverviewGreptile SummaryFixes duplicate action type tags in the request manager UI by introducing a Changes:
Observations:
Confidence Score: 5/5
Important Files Changed
|
clients/admin-ui/src/features/privacy-requests/dashboard/utils.ts
Outdated
Show resolved
Hide resolved
speaker-ender
left a comment
There was a problem hiding this comment.
Looks good and functions as intended.
Optional suggestion to reduce specialized code that needs to be tested.
| const uniqueActionTypes = privacyRequest.policy.rules | ||
| ? getUniqueActionTypes(privacyRequest.policy.rules) | ||
| : []; |
There was a problem hiding this comment.
Instead of creating a one-off function, wouldn't uniq_by from lodash accomplish this generically with something like this:
| const uniqueActionTypes = privacyRequest.policy.rules | |
| ? getUniqueActionTypes(privacyRequest.policy.rules) | |
| : []; | |
| const uniqueActionTypes = uniqBy(privacyRequest.policy.rules ?? [], 'action_type'); |
There was a problem hiding this comment.
thanks for the quick review and the suggestion. I've just updated the implementation to use the lodash util, it's way simpler :)
Ticket ENG-2431
Description Of Changes
Fixes duplicate request type tags showing in the new request manager when a policy has 2 rules with the same request type.
Code Changes
Steps to Confirm
default_access_policyand this body:This adds 2 rules to the access type of request
3. Go to request manager and confirm only one "Access" tag is being displayed instead of 2
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works