-
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
WS - Members - Avatars group on final screen moves to the left if admin invites more 8 users #22685
Comments
Triggered auto assignment to @johncschuster ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Avatars group on final screen moves to the left if admin invites more 8 users. What is the root cause of that problem?Avatar group's width is calculated as below. App/src/components/MultipleAvatars.js Lines 138 to 144 in 702d8e2
App/src/components/MultipleAvatars.js Lines 91 to 93 in 702d8e2
If have more than 8 avatar, length would be greater than props.maxAvatarsInRow (4).So avatar group moves to the left. What changes do you think we should make in order to solve the problem?Avatar group's width should be equal to or less than - const length = avatarRows.length > 1 ? Math.max(avatarRows[0].length, avatarRows[1].length) : avatarRows[0].length;
+ const length = Math.min(avatarRows.length > 1 ? Math.max(avatarRows[0].length, avatarRows[1].length) : avatarRows[0].length, props.maxAvatarsInRow); What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace members avatars group on the final screen moves to the left if the admin invites more than 8 users What is the root cause of that problem?We are using Line 906 in 702d8e2
Line 923 in 702d8e2
Also, currently, we are calculating the width, as a workaround, which is also a part of the problem in this issue.
App/src/components/MultipleAvatars.js Lines 138 to 144 in 702d8e2
What changes do you think we should make in order to solve the problem?Use // in getHorizontalStackedAvatarStyle
- left: -(overlapSize * index)
+ marginLeft: index > 0 ? -overlapSize : 0
// in getHorizontalStackedOverlayAvatarStyle
- left: -(oneAvatarSize.width * 2 + oneAvatarBorderWidth * 2)
+ marginLeft: -(oneAvatarSize.width + oneAvatarBorderWidth * 2) We should also need to remove the width, as we don't need it anymore, because this proposal also removes the need for the workaround as it fixes the issue in the root, and removing it may prevent future issues like this. App/src/components/MultipleAvatars.js Lines 138 to 144 in 702d8e2
|
@johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick! |
My proposal here fixes this issue, reposting for visibility ProposalPlease re-state the problem that we are trying to solve in this issue.We want workspace icons to be aligned to right. What is the root cause of that problem?We do a different kind of width calculation when there are more than 4 icons, but at a single time we only display 4 icons. The extra width moves the icons to left. App/src/components/MultipleAvatars.js Lines 142 to 145 in 6e5b07c
What changes do you think we should make in order to solve the problem?We should update the width calculation here. Since we only display a max of 4 icons, we can remove the length calculation and use 4 directly (which comes from const length = Math.min(props.maxAvatarsInRow, props.icons.length)
width = oneAvatarSize.width + overlapSize * 2 * (length - 1) + oneAvatarBorderWidth * (length * 2); What alternative solutions did you explore? (Optional)N/A |
@johncschuster 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
If the root cause will be fixed in another issue, does this issue need to remain open? (I'm not sure, so I'm asking in Slack) |
bumping my question above |
@johncschuster Yeah can close this one in favor of #22632 |
Thanks, @Santhosh-Sellavel! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The avatar group on the final screen is always in the center
Actual Result:
The avatars group on final screen moves to the left if admin invites more 8 users
The shift to the left gets bigger with each user added
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.39.5
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug6124175_WS-Invite-users-avatars-cut.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: