-
Notifications
You must be signed in to change notification settings - Fork 84
Enabled data stewards field with searchable multiselect in system information form #6993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabled data stewards field with searchable multiselect in system information form #6993
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Greptile Summary
Confidence Score: 4/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
clients/admin-ui/src/features/system/SystemInformationForm.tsx, line 286 (link)logic:
toast.closeAll()will hide warning toasts from steward assignment/removal failures that occur beforehandleResultis called. Move this call to happen before the steward operations (after line 314), or wait for all steward operations to complete before deciding which toasts to display.Context Used: Rule from
dashboard- When handling multiple async operations that can fail independently, avoid usingtoast.closeAll()... (source)
6 files reviewed, 1 comment
Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format
…s-not-work-for-systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with 2 very minor comments. Overall FE code looks great! Looks like there are some Cypress tests that need cleaning up though.
Co-authored-by: Jason Gill <jason.gill@ethyca.com>
…s-not-work-for-systems
…s-not-work-for-systems
…manually-updating-data-stewards-does-not-work-for-systems
…s-not-work-for-systems
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (50.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6993 +/- ##
==========================================
- Coverage 87.01% 87.00% -0.02%
==========================================
Files 528 528
Lines 34674 34678 +4
Branches 4008 4010 +2
==========================================
Hits 30172 30172
- Misses 3628 3629 +1
- Partials 874 877 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ormation form (#6993) Co-authored-by: Jason Gill <jason.gill@ethyca.com>
Ticket ENG-1739
Description Of Changes
This PR enables the Data stewards field in the System Information form and ensures that only eligible users (excluding approvers and external respondents) can be assigned as data stewards. The field is now a searchable, multiselect dropdown that allows users to select multiple data stewards directly in the form.
Previously, the Data stewards field was disabled and data stewards could only be assigned through the "Assign data steward" action menu. This change provides a more intuitive way to manage data stewards directly in the system form.
Key improvements:
Backend changes:
exclude_approversquery parameter to theget_usersendpointexclude_approvers=trueis passed@>) to efficiently filter by roleCode Changes
Backend:
src/fides/api/api/v1/endpoints/user_endpoints.py:exclude_approversparameter toget_usersendpointINNER JOINwithFidesUserPermissionsand PostgreSQL@>operator to exclude approversFrontend:
clients/admin-ui/src/features/system/form.ts:data_stewardstype fromstringtostring[]inFormValues[]transformSystemToFormValuesto extract usernames as an array from system responseclients/admin-ui/src/features/system/SystemInformationForm.tsx:useGetAllUsersQueryhook withexclude_approvers: trueandinclude_external: falsedataStewardOptionsusinguseMemoto transform eligible users into select optionsCustomTextInputwithControlledSelectcomponent (multiselect, searchable)useBulkAssignStewardMutationanduseRemoveUserManagedSystemMutationhookshandleSubmitto:bulkAssignStewardremoveUserManagedSystem(with proper user ID mapping)option?.labelwithString()infilterOptionclients/admin-ui/src/features/system/SystemActionsMenu.tsx:useGetAllUsersQueryto includeexclude_approvers: trueparameterclients/admin-ui/src/features/user-management/types.ts:exclude_approvers?: booleantoUsersListParamsinterfaceclients/admin-ui/src/features/user-management/user-management.slice.ts:"System"toinvalidatesTagsforremoveUserManagedSystemmutation to refresh system cache after steward removalSteps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works