-
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
The position of avatar image moves when error occurs in profile page. #48602
Comments
Triggered auto assignment to @miljakljajic ( |
Edited by proposal-police: This proposal was edited at 2023-10-23T00:00:00Z. ProposalPlease re-state the problem that we are trying to solve in this issue.The avatar picture position changes What is the root cause of that problem?We're self aligning the avatar center: App/src/components/AvatarWithImagePicker.tsx Line 375 in 2edeee8
What changes do you think we should make in order to solve the problem?We're using this avatar in many pages where we align it either center or left. For example in new chat confirmation page, it's center. So we can't just force it to always align start. We should leverage the
App/src/components/AvatarWithImagePicker.tsx Line 375 in 2edeee8
What alternative solutions did you explore? (Optional)I also spotted a related bug: The error message is too near the avatar in create group chat confirmation page. To fix this, add
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Avatar position changes when error message prompts What is the root cause of that problem?When avatar is without error message, it gets aligned at start from here -
but When avatar is with error message, now this element is composite and so avatar is aligned at center within composite provided by AvatarWithImagePicker
What changes do you think we should make in order to solve the problem?apply alignstart to avatar within <View style={styles.w100, styles.alignItemsStart}> App/src/components/AvatarWithImagePicker.tsx Line 329 in 8e6c8ac
|
Update Proposal
|
Update Proposal
|
ProposalPlease re-state the problem that we are trying to solve in this issue.The position of avatar image moves when error occurs in profile page What is the root cause of that problem?We don't pass the App/src/components/AvatarWithImagePicker.tsx Line 375 in 798a5cd
Here we have a layout very similar to the workspace profile page, but we don't encounter this issue there. Why? because it's type is CONST.ICON_TYPE_WORKSPACE What changes do you think we should make in order to solve the problem?First we can remove this styles.alignSelfStart Then if the avatar is from profile page we should make sure that this styles.alignSelfCenter don't get applied. There are multiple ways of doing it. Or we can pass a prop and use it along with
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issueThe position of image moves when error occurs in profile page. What is the root cause of that problem?In App/src/components/AvatarWithImagePicker.tsx Line 375 in 6760f96
When we show the error message the size of the view that contains the avatar increases which causes avatar to get centre with respect to the DotIndicator (error message). What changes do you think we should make in order to solve the problem?Remove App/src/components/AvatarWithImagePicker.tsx Line 375 in 6760f96
And add What alternative solutions did you explore? (Optional) |
This is dupe of #48244 |
@etCoderDysto Thanks for the heads up. @miljakljajic Please close this issue. |
Thank you! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.29-2
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
Expensify/Expensify Issue URL:
Issue reported by: @shubham1206agra
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1725459116516319
Action Performed:
Expected Result:
The avatar picture position remains the same
Actual Result:
The avatar picture position changes
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Large image:
https://github.com/Expensify/App/assets/16493223/57399153-d460-45aa-a41e-2103971b9a35
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: