-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] Web - Split bill icons are aligned to the left #22993
Comments
Triggered auto assignment to @jliexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
The issue is due to the flexbox property which was aligning the items to the right. |
Hello, from last 2 days I've been working on some of the issues but no matter how quickly I resolve them or send the proposal. Somehow, I've never assigned the issue formally. |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want the multiple avatars of IOUPreview to be right-aligned What is the root cause of that problem?Currently we are not apply align styles to the MultipleAvatars container view What changes do you think we should make in order to solve the problem?We need to apply align styles to What alternative solutions did you explore? (Optional)n/a |
The same root cause as this #22632 issue cc: @jliexpensify |
@jayeshmangwani does this mean the issue is closed and don't need any work? |
📣 @aditya-ragi! 📣
|
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 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Split bill icons are not aligned properly 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
|
I've already made proposals in issue #22632 and #22685 which also has the same exact root cause as this one, implementing any one of the proposals would solve all these 3 issues. Also, I've made a proposal above just in case. @puneetlath please have a look here also. |
Job added to Upwork: https://www.upwork.com/jobs/~016faf5a12cb59c166 |
Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Hi @Santhosh-Sellavel - we've had a few comments stating that this issue has the same root cause as a few others. Could you check this out, and let us know if this is the case? If so, should we wait on a PR from another issue to resolve this one? |
Bump @Santhosh-Sellavel ! |
Missed this one somehow! |
@jliexpensify This seems like a dupe of #22632 & the same RC. We can close this one straightaway, and nothing is due here! |
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:
Split bill icons are aligned to the right
Actual Result:
Split bill icons are aligned to the left
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.40-5
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689299771028809
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: