-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat(MembersRoute): add actions dropdown to the table of organization members TASK-987 TASK-990 #5309
feat(MembersRoute): add actions dropdown to the table of organization members TASK-987 TASK-990 #5309
Conversation
β¦e-endpoints-to-handle-org-members
β¦ query for user mfa details
β¦hook more customizable and then use it in `MembersRoute`
β¦hook more customizable and then use it in `MembersRoute`
β¦x/kpi into leszek/task-980-members-table
β¦eszek/task-980-members-table
β¦omprehensive tests
β¦omprehensive tests
β¦eszek/task-980-members-table
β¦x/kpi into leszek/task-980-members-table
β¦eszek/task-980-members-table
β¦x/kpi into leszek/task-980-members-table
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.
Looks good, works good. I just left some code style comments.
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.
Left two minor comments
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.
lgtm
### π£ Summary In Members Table (from Account β Team/Organization β Members) add UI for changing member's role. ### π Description Only owner and admins can modify the role. ### π Preview steps 1. βΉοΈ have multiple different users 2. for one of the users (e.g. "joe"), use http://kf.kobo.local/admin/organizations/organization/ to add multiple users into joe's organization 3. For one of the users (e.g. "sue") set the role to "admin" 4. enable "Multi-members override" for joe's organization 5. enable feature flag `mmosEnabled` 6. navigate to `#/account/organization/members` (as "joe") 7. π’ notice that in the table there is no way to change "joe" (owner) role 8. π’ notice that in the table you can change any other user role As continuation for above steps: 1. log in as "sue" 2. navigate to `#/account/organization/members` 3. π’ notice (again) that in the table there is no way to change "joe" (owner) role (even though you're an "admin") 4. π’ notice that for "sue" you can change the role (to stop being an admin) ### π Notes Build atop #5309
### π£ Summary Improve multiple pinned columns handling. Allow pinning columns to right side. Improve pinned column styling based on table having horizontal scrollbar. Add reusable `useViewportSize` and `useWindowEvent` hooks. Add extensive story for testing the component, including left/right column pinning, the amount of columns and much more. ### π Notes Both `useViewportSize` and `useWindowEvent` hooks were copied from `@mantine/hooks`, retaining the original code as closely as possible. We most possibly will use Mantine in near future, and we should replace both with the ones from Mantine package. Pinned columns have visual shadow to distinct them from other columns (useful when scrolling table horizontally). That shadow is not being added if table has no horizontal scrollbar. @magicznyleszek this should be used in actions column added in #5309 (should be always pinned to right) ### π Preview steps Best way to test component changes: 1. run storybook locally 2. go to http://localhost:6006/?path=/docs/misc-universaltable--docs 3. π’ verify columns pinning works for all possible combinations - story allows pinning one or two columns on both sides 4. π’ verify pinned columns have shadow only if table has lots of columns (i.e. if there is horizontal scrollbar) 5. π’ verify all the other props of component work as expected Verify that Organization Members table still works: 1. βΉοΈ have multiple different users 2. for one of the users (e.g. "joe"), use http://kf.kobo.local/admin/organizations/organization/ to add multiple users into joe's organization 3. for one of the users (e.g. "sue") set the role to "admin" 4. enable "Multi-members override" for joe's organization 5. enable feature flag `mmosEnabled` 7. navigate to `#/account/organization/members` (as "joe") 8. π’ notice that the table works as previously π Verify that Recent Project Activity table still works: 1. note: this particular table displays mock data right now 2. for a deployed project go to `#/forms/<uid>/settings/activity` 3. π’ notice that the table works as previously π --------- Co-authored-by: RuthShryock <81720958+RuthShryock@users.noreply.github.com>
π£ Summary
In Members Table (from Account β Team/Organization β Members) add actions dropdown with one action. The action allows removing a member or leaving the organization.
π Description
The availability of "Remove" action is based on the role of the logged in user. When trying to remove user (or leave organization) a confirmation prompt is being shown.
π Preview steps
mmosEnabled
#/account/organization/members
As continuation for above steps:
#/account/organization/members
As continuation for above steps:
π Notes
Build atop #5281