You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-02-20] [$500] iOS - Login - Background image moves downward when an error appears #34529
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
Version Number: 1.4.25-1 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: Applause - Internal Team Slack conversation:
Action Performed:
Open New Expensify app.
Enter an email and tap on "Continue".
Enter 6 random numbers (to trigger incorrect magic code error).
Expected Result:
When the error appears, the background image should remain static.
Actual Result:
The background image moves downward.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]iOS - Login - Background image moves downward when an error appears[/-][+][$500] iOS - Login - Background image moves downward when an error appears[/+]on Jan 15, 2024
📣 @Ykumar1415! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
The background image moves downward.
What is the root cause of that problem?
The signInContentMinHeight value that we currently set is too low (800). So initially the height will be set to that, then when the error appears, the total height of the content now is more than 800, so it will cause the background image to shift downwards because the background image occupies the area of the content container.
What changes do you think we should make in order to solve the problem?
Set the signInContentMinHeight to a more reasonable amount (850 or 900) that takes into account the case where an error text must be displayed. This won't affect the UI, it will just make sure the background image is static in all cases of the sign in page.
What alternative solutions did you explore? (Optional)
We can rethink how BackgroundImage works, to me background image can be considered as something that's background and will always cover the full height and width of the parent element that's foreground. But the background image in our case is using an SVG, which has fixed size, while the foreground element will have dynamic size. To solve this, we can make the BackgroundImage have a fill color, that fill color can be understood as the general color of the SVG and will be used to fill in any gaps between the SVG and the size of the background image.
(That's for iOS, but for other platforms it's similar change)
2. Remove this, since the background image is always full size of foreground element now so no need for position.
3. Then we can pass fillColor={theme.signInPage}here to specify the fillColor of the background image.
Please re-state the problem that we are trying to solve in this issue.
iOS - Login - Background image moves downward when an error appears
What is the root cause of that problem?
The background image has position: "absolute", bottom: 0 style, and its height is less than the height of the parent container. When the error message appears, the height of the parent container is increased and the image is moved down due to the bottom: 0 style.
What changes do you think we should make in order to solve the problem?
Set the backgroundColor of the resizable container to the same as the Footer component. Then wrap the image in a new container whose height will be equal to windowHeight and place the image at the bottom of that container. Set this containers backgroundColor the sam as current background color of screen and position to absolute to cover current resizable container .
Add StyleUtils.getBackgroundColorStyle(theme.signInPage) in this array of styles
Wrap the Image in new container which will have following styles.
{
// To cover a resizable container with the screen size
position: 'absolute',
height: <windowHeight>
top: 0,
left: 0,
// To keep the current background color of screen
backgroundColor: colors.productDark200,
// So that the image is always at the bottom.
justifyContent: "flex-end",
}
Remove all image styles as they have been moved to the new container besides minHeight: 700.
Please re-state the problem that we are trying to solve in this issue.
iOS - Login - Background image moves downward when an error appears
What changes do you think we should make in order to solve the problem?
The styles in SignInPageContent() include excessive mb and mt properties, causing the content to extend beyond the parent container and pushing the image downward. To resolve this issue, I removed one mb when the screen its small to create additional space.
Original Line here. <View style={[styles.flexGrow2, styles.mb8]}>
Replacing that line with this: <View style={[styles.flexGrow2, !isSmallScreenWidth ? styles.mb8 : null]}>
And effectively resolving the problem.
What alternative solutions did you explore? (Optional)
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@s77rt] The PR that introduced the bug has been identified. Link to the PR:
[@s77rt] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@s77rt] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@s77rt] Determine if we should create a regression test for this bug.
[@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@zanyrenney] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review
Activity
[-]iOS - Login - Background image moves downward when an error appears[/-][+][$500] iOS - Login - Background image moves downward when an error appears[/+]melvin-bot commentedon Jan 15, 2024
Job added to Upwork: https://www.upwork.com/jobs/~011bb5ec1c98737926
melvin-bot commentedon Jan 15, 2024
Triggered auto assignment to @zanyrenney (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 15, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)Ykumar1415 commentedon Jan 15, 2024
I tried this issue and able to reproduce this issue .
melvin-bot commentedon Jan 15, 2024
📣 @Ykumar1415! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
tienifr commentedon Jan 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The background image moves downward.
What is the root cause of that problem?
The
signInContentMinHeightvalue that we currently set is too low (800). So initially the height will be set to that, then when the error appears, the total height of the content now is more than 800, so it will cause the background image to shift downwards because the background image occupies the area of the content container.What changes do you think we should make in order to solve the problem?
Set the
signInContentMinHeightto a more reasonable amount (850 or 900) that takes into account the case where an error text must be displayed. This won't affect the UI, it will just make sure the background image is static in all cases of the sign in page.What alternative solutions did you explore? (Optional)
We can rethink how
BackgroundImageworks, to me background image can be considered as something that'sbackgroundand will always cover the full height and width of the parent element that'sforeground. But the background image in our case is using anSVG, which has fixed size, while the foreground element will have dynamic size. To solve this, we can make theBackgroundImagehave afill color, that fill color can be understood as the general color of the SVG and will be used to fill in any gaps between the SVG and the size of the background image.(That's for iOS, but for other platforms it's similar change)
2. Remove this, since the background image is always full size of
foregroundelement now so no need for position.3. Then we can pass
fillColor={theme.signInPage}here to specify the fillColor of the background image.shahinyan11 commentedon Jan 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
iOS - Login - Background image moves downward when an error appears
What is the root cause of that problem?
The background image has
position: "absolute", bottom: 0style, and its height is less than the height of the parent container. When the error message appears, the height of the parent container is increased and the image is moved down due to thebottom: 0style.What changes do you think we should make in order to solve the problem?
Set the
backgroundColorof the resizable container to the same as the Footer component. Then wrap the image in a new container whose height will be equal towindowHeightand place the image at the bottom of that container. Set this containersbackgroundColorthe sam as current background color of screen and position toabsoluteto cover current resizable container .StyleUtils.getBackgroundColorStyle(theme.signInPage)in this array of stylesminHeight: 700.Here is the PR where you can see all change
What alternative solutions did you explore? (Optional)
pipolodev commentedon Jan 16, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
iOS - Login - Background image moves downward when an error appears
What changes do you think we should make in order to solve the problem?
The styles in SignInPageContent() include excessive
mbandmtproperties, causing the content to extend beyond the parent container and pushing the image downward. To resolve this issue, I removed onembwhen the screen its small to create additional space.Original Line here.
<View style={[styles.flexGrow2, styles.mb8]}>Replacing that line with this:
<View style={[styles.flexGrow2, !isSmallScreenWidth ? styles.mb8 : null]}>And effectively resolving the problem.
What alternative solutions did you explore? (Optional)
N/A
84 remaining items
melvin-bot commentedon Feb 13, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 13, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.40-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-02-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 13, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
s77rt commentedon Feb 13, 2024
shahinyan11 commentedon Feb 20, 2024
@zanyrenney Hi. When sending payment do not forget to leave feedback please
zanyrenney commentedon Feb 20, 2024
payment summary
@s77rt requires payment automatic offer (Reviewer) - paid $500
@shahinyan11 requires payment automatic offer (Contributor) - paid $500