-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
#35715 workspace member details page #37715
#35715 workspace member details page #37715
Conversation
9a95303
to
35f5618
Compare
@luacmartins @Expensify/design One question on the design below: In the the header we have "Alberto Cela" which, I assume, is |
@abdulrahuman5196 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@burczu It should be the workspace name. |
@abdulrahuman5196 Ahhh... makes sense ;) I'll address this then. |
@abdulrahuman5196 done |
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.
@burczu Could you kindly check on the above?
src/pages/workspace/members/WorkspaceMemberDetailsRoleSelectionPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/members/WorkspaceMemberDetailsRoleSelectionPage.tsx
Outdated
Show resolved
Hide resolved
sections={[{data: items, indexOffset: 0}]} | ||
ListItem={RadioListItem} | ||
onSelectRow={changeRole} | ||
initiallyFocusedOptionKey={items.find((item) => item.isSelected)?.keyForList} |
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.
I don't see the tick mark for the very first time i open a member with the new changes
Screen.Recording.2024-03-06.at.5.26.50.PM.mov
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.
is this a member that was invited right before? there is known issue that we need to address regarding this... the same problem is with bulk actions and "Make admin" option for freshly invited members (before refreshing the page) - I think there was some bug for it
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.
this is related comment: #37748 (comment) - we agreed to fix this while working on inviting new members here: #37199 (comment)
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.
Got it.
|
||
return ( | ||
<ScreenWrapper testID={WorkspaceMemberDetailsPage.displayName}> | ||
<FullPageNotFoundView> |
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.
I think we need to block these views if the user is not an admin. We can reuse AdminPolicyAccessOrNotFoundWrapper
and PaidPolicyAccessOrNotFoundWrapper
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.
Added, but are you sure this feature should be available only for Paid Workspaces? I must have missed this requirement...
Should I also disable showing RHN when pressing on the member item if its non Paid Workspace?
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.
@luacmartins ok, I think disabling RHN for non Paid Workspace is most reasonable - I've made this change, so now:
- for Paid Workspaces, when user presses the checkbox, the item is selected and when user presses the whole item it shows the Member Details modal
- for Non Paid Workspaces, pressing the whole item, as well as pressing the checkbox just selects the item
Please see the recording:
Screen.Recording.2024-03-07.at.14.30.22.mov
What do you think?
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.
for Non Paid Workspaces, pressing the whole item, as well as pressing the checkbox just selects the item
Personally I don't like that there would be variability in pressing the whole item triggering the select action or not. I think we should limit selecting a row to just engaging with the checkbox, no matter what the case is. Curious if @Expensify/design agrees here.
So basically, let's not try to get tricky with using the whole row as a trigger action for the select box. Just make it so that you can only ever use the select box to select a row. For non-paid workspaces, just make the rest of the row non-tappable.
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.
@shawnborton makes sense to me - I'll change it
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.
done
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.
Totally agree @shawnborton.
src/pages/workspace/members/WorkspaceMemberDetailsRoleSelectionPage.tsx
Outdated
Show resolved
Hide resolved
@abdulrahuman5196 Good catch - thanks. Fixed. |
Thank you. Will check again in 30 mins. |
@burczu For workspaces where I haven't visited. It shows skeleton view and doesn't load data. Screen.Recording.2024-03-07.at.8.54.11.PM.mov |
@abdulrahuman5196 I think that might need a backend issue to create a new API command we can call to load member data. I'll work on one. Leet's not block this PR on that though |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-08.at.12.47.34.AM.mp4Android: mWeb ChromeScreen.Recording.2024-03-08.at.12.35.05.AM.mp4iOS: NativeScreen.Recording.2024-03-08.at.12.29.39.AM.mp4iOS: mWeb SafariScreen.Recording.2024-03-08.at.12.28.00.AM.mp4MacOS: Chrome / SafariScreen.Recording.2024-03-08.at.12.19.16.AM.mp4MacOS: DesktopScreen.Recording.2024-03-08.at.12.24.49.AM.mp4 |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @luacmartins
🎀 👀 🎀
C+ Reviewed
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.
I've also spotted the issues below, but we can address them in a follow up:
-
Can't see owner's profile. We should probably just navigate to the global profile here.
https://github.com/Expensify/App/assets/22219519/00dcfb85-dbb2-45f7-b8b9-6fc21f5c2a55 -
Info icon has active green color by default. We need to fix this.
} | ||
|
||
if (!PolicyUtils.isPaidGroupPolicy(policy)) { | ||
return; |
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.
I think we just wanna navigate to the regular profile here too
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.
I won't block on this, but we should follow up with a fix.
Created issue here for the follow up - #37927 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.49-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.50-5 🚀
|
const openRoleSelectionModal = useCallback(() => { | ||
Navigation.navigate(ROUTES.WORKSPACE_MEMBER_ROLE_SELECTION.getRoute(route.params.policyID, accountID, Navigation.getActiveRoute())); | ||
}, [accountID, route.params.policyID]); | ||
|
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.
We are not checking if user is workspace member or not, ref: #41492
Details
In this PR we implement the member details page where the user can remove the member from workspace, change it role in the workspace and open its user profile. The PR does not cover changing the ownership of the workspace which will be handled in a separate PR.
Design reference used in this PR:
Fixed Issues
$ #35715
PROPOSAL: https://docs.google.com/document/d/1gk3xqOs7epMbUrSSiX8K7YcqfPLVgqEos0sf-D-GMDA/edit?pli=1#heading=h.qjcht79r25s1
Tests
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-03-06.at.12.08.53.mov
Android: mWeb Chrome
Screen.Recording.2024-03-06.at.12.01.19.mov
iOS: Native
Screen.Recording.2024-03-06.at.11.58.13.mov
iOS: mWeb Safari
Screen.Recording.2024-03-06.at.11.59.34.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-06.at.11.48.21.mov
MacOS: Desktop
Screen.Recording.2024-03-06.at.11.50.25.mov