Skip to content

[HOLD for payment 2024-02-20] [$500] iOS - Login - Background image moves downward when an error appears #34529

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

  1. Open New Expensify app.
  2. Enter an email and tap on "Continue".
  3. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

image

Bug6343355_1705344453709.Aoje2064_1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011bb5ec1c98737926
  • Upwork Job ID: 1746986846306430976
  • Last Price Increase: 2024-01-15
  • Automatic offers:
    • s77rt | Reviewer | 28130620
    • shahinyan11 | Contributor | 28130621

Activity

  1. added
    External
    Daily
    Bug
    on Jan 15, 2024
  2. 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
  3. melvin-bot commented on Jan 15, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 15, 2024

    @melvin-bot

    Triggered auto assignment to @zanyrenney (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help Wanted
    on Jan 15, 2024
  6. melvin-bot commented on Jan 15, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)

  7. Ykumar1415 commented on Jan 15, 2024

    @Ykumar1415

    I tried this issue and able to reproduce this issue .

  8. melvin-bot commented on Jan 15, 2024

    @melvin-bot

    📣 @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:

    1. Make sure you've read and understood the contributing guidelines.
    2. 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.
    3. 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.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  9. tienifr commented on Jan 16, 2024

    @tienifr
    Contributor

    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 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.

    1. To do that we can update this to something like:
    <View
        style={[
            styles.signInBackground,
            {
                width: '100%',
                height: '100%',
                backgroundColor: props.fillColor,
            }
        ]}
    >
        <Image
            source={src}
            style={[styles.signInBackground, StyleUtils.getWidthStyle(props.width)]}
        />
    </View>
    

    (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.

  10. shahinyan11 commented on Jan 16, 2024

    @shahinyan11
    Contributor

    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: 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 .

    1. Add StyleUtils.getBackgroundColorStyle(theme.signInPage) in this array of styles
    2. 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",  
    }
    
    1. Remove all image styles as they have been moved to the new container besides minHeight: 700.

    Here is the PR where you can see all change

    What alternative solutions did you explore? (Optional)

  11. pipolodev commented on Jan 16, 2024

    @pipolodev

    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 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)

    N/A

  12. 84 remaining items

  13. removed
    Reviewing
    on Feb 13, 2024
  14. melvin-bot commented on Feb 13, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. melvin-bot commented on Feb 13, 2024

    @melvin-bot

    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:

  16. melvin-bot commented on Feb 13, 2024

    @melvin-bot

    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:
  17. s77rt commented on Feb 13, 2024

    @s77rt
    Member
    • The PR that introduced the bug has been identified: n/a. This is more like a feature request
    • The offending PR has been commented on: n/a
    • A discussion in #expensify-bugs has been started: n/a
    • Determine if we should create a regression test for this bug: No
  18. added
    Reviewing
    Weekly
    and removed
    Weekly
    on Feb 15, 2024
  19. added
    Daily
    and removed
    Weekly
    on Feb 19, 2024
  20. shahinyan11 commented on Feb 20, 2024

    @shahinyan11
    Contributor

    @zanyrenney Hi. When sending payment do not forget to leave feedback please

  21. added
    Daily
    and removed
    Daily
    on Feb 20, 2024
  22. zanyrenney commented on Feb 20, 2024

    @zanyrenney
    Contributor

    payment summary

    @s77rt requires payment automatic offer (Reviewer) - paid $500
    @shahinyan11 requires payment automatic offer (Contributor) - paid $500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternalReviewing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions