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
New Permissions Pages #17328
New Permissions Pages #17328
Conversation
403df62
to
ff7f213
Compare
8b3ae3d
to
6c0a0d5
Compare
@metabase-bot run visual tests |
71b4f76
to
4e30bd3
Compare
@metabase-bot run visual tests |
4e30bd3
to
a7a7bb9
Compare
Overall looking quite solid. There are a couple things I noticed while playing with this that I'd consider tweaking.
permissions-ui-flashing.mov |
af03375
to
3ce3c35
Compare
@kdoh I've addressed all the points, thanks! |
Codecov Report
@@ Coverage Diff @@
## master #17328 +/- ##
===========================================
- Coverage 62.46% 38.15% -24.31%
===========================================
Files 1639 1240 -399
Lines 65735 33141 -32594
Branches 7258 4918 -2340
===========================================
- Hits 41061 12646 -28415
+ Misses 21507 19772 -1735
+ Partials 3167 723 -2444
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
1aa0665
to
e44177c
Compare
@metabase/frontend-developers it is a big one but I split it into granular commits to make the review a bit easier. Please tell if you'd prefer me to create multiple PRs |
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.
Just did a quick test of e44177c
- here's what I've found:
Looks really nice, but takes a while to get used to it.
- Clicking the database/schema/table links fails - they are
/admin/permissions/data/database1
instead of/admin/permissions/data/database/1
- The table search also search schema, but it's a bit strange, when there's overlaps
- I'm still seeing Weird UX around setting limited data permissions #15233
- If I redo Sandbox modal "cancel" doesn't work correctly #14669, then I can get to a state, where the table is sandboxed, without me defining anything in the sandbox (clicked cancel) and then saved permissions, but now it's not possible to edit the sandbox settings - nothing opens. This might have something to do with sandbox modal sends a GTAP request, which is separate from the overall permission Save request, so it's possible to get into a weird state (though this has always existed and doesn't expose any data incorrectly).
frontend/test/metabase/scenarios/admin/permissions/permissions.cy.spec.js
Outdated
Show resolved
Hide resolved
frontend/src/metabase/admin/permissions/selectors/collection-permissions.js
Show resolved
Hide resolved
...abase/admin/permissions/components/CollectionPermissionsModal/CollectionPermissionsModal.jsx
Outdated
Show resolved
Hide resolved
...abase/admin/permissions/components/CollectionPermissionsModal/CollectionPermissionsModal.jsx
Outdated
Show resolved
Hide resolved
Tremendous work @alxnddr 👏 Discard changes popup The popup is a little bit confusing. If I have unsaved changes and try to leave a page or change a tab, I see a popup saying "your changes will be discarded if you leave" with two options: "Cancel" and "Discard changes". I expected "Cancel" to close the popup, so I can save my changes and "Discard changes" to leave the page without saving the changes, but it works vice-versa. I guess it doesn't align with the common UX pattern for confirmations like these Video Democonfusing-discard-popup.movUpdating permissions for child collections When I change permission for a collection, the popover has a toggle to apply the changes to child collections too. The toggle is placed below the permission options, so I tend to select the permission first and then select the toggle. However:
Video Demochildren-update-ux.mov |
@metabase-bot run visual tests |
8f1ffb0
to
909e299
Compare
@flamber @daltojohnso @kulyk thank you for reviewing this PR and for your feedback, I hope it was not that painful. I addressed your comments, could you please take a look again? @kulyk yes, this toggle is really inconvenient, thanks for pointing. If you don't mind, I'll fix it in a separate PR, because it worked the same way before. @daltojohnso I added a bit of tests on selectors, but previously they contained some mutating logic. Instead, I have cypress specs for that, but the coverage can be increased. Would you mind if I add more tests in a follow-up PR? |
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.
Testing 909e299
When I try to edit a sandbox, then it show 404 and changes to URL to this:
/undefined/segmented/group/[object Object]
4ff925c
to
8b72fd5
Compare
@flamber oh, seems like I broke it during some refactoring while addressing review comments. Fixed, added a spec to prevent breaking it again. Thanks for catching it! |
Description
This PR replaces the old Permissions UI with the new one that should make viewing/editing permissions easier especially for customers with a lot of data. It should behave the same in terms of business logic, only the UI has changed.
Screenshots
Collections permissions
Before
After
Data permissions
Before
After — groups focus
After — databases focus
Collection permissions modal
Before
After
Snippet folder permissions modal
Before
After
Warnings
Closes #4186
Closes #8165
Closes #10874
Closes #10920
Closes #12489
Closes #14669
Closes #14671
Closes #17185
Closes #15233