Skip to content

[$500] IOU - Padding below total increases for unread messages on mobile devices #30360

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.3.90.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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698067716752699

Action Performed:

  1. Open the app and login with user A
  2. Open the app with any other device and login with user B
  3. From user B, send request money to user A
  4. Open user B request money in user A and mark message as unread
  5. Observe the padding between 'total' and 'New' line
  6. Revisit the request money untill 'New' line disappears and now observe the padding between 'total' and line below total

Expected Result:

App should have equal padding below total irrespective of presence of 'New' line

Actual Result:

On mobile devices, padding between total and 'New' line is way more then padding when there is no 'New' line

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

Android: Native
android.native.padding.below.total.mp4
Android: mWeb Chrome
android.chrome.padding.below.total.mp4
iOS: Native
ios.native.padding.below.total.mov
iOS: mWeb Safari
ios.safari.padding.below.total.mov
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0158fbfd6d89166dba
  • Upwork Job ID: 1717212733665116160
  • Last Price Increase: 2023-10-25
  • Automatic offers:
    • situchan | Contributor | 27456744
    • dhanashree-sawant | Reporter | 27456747
    • DylanDylann | Contributor | 0

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 25, 2023
  2. changed the title [-]IOU - Padding below total increases for unread messages on mobile devices[/-] [+][$500] IOU - Padding below total increases for unread messages on mobile devices[/+] on Oct 25, 2023
  3. melvin-bot commented on Oct 25, 2023

    @melvin-bot

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

  4. melvin-bot commented on Oct 25, 2023

    @melvin-bot
  5. melvin-bot commented on Oct 25, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 25, 2023
  7. melvin-bot commented on Oct 25, 2023

    @melvin-bot

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

  8. Nathan-Mulugeta commented on Oct 25, 2023

    @Nathan-Mulugeta

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Padding below total increases for unread messages on mobile devices

    What is the root cause of that problem?

    The root cause of this problem is found in here:

    App/src/CONST.ts

    Lines 126 to 131 in cc3c51c

    MONEY_REPORT: {
    SMALL_SCREEN: {
    IMAGE_HEIGHT: 300,
    CONTAINER_MINHEIGHT: 280,
    VIEW_HEIGHT: 220,
    },

    The size of the CONTAINER_MINHEIGHT for SMALL_SCREEN is the same as the size of CONTAINER_MINHEIGHT for WIDE_SCREEN.

    Furthermore, a discrepancy on the web arises when props.shouldShowHorizontalRule is set to false. The SpacerView component persists within the DOM, causing an undue gap between the unreadIndicator and the total amount.

    What changes do you think we should make in order to solve the problem?

    1. We need to decrease the size of the CONTAINER_MINHEIGHT from 280 to 260 for SMALL_SCREEN sizes. Which fixes the issue on small screens as we are adjusting the min height accordingly.
      The changes should look like this:
      SMALL_SCREEN: {
                    IMAGE_HEIGHT: 300,
                    CONTAINER_MINHEIGHT: 260, // Update this line 
                    VIEW_HEIGHT: 220,
                },
    1. Amend the code snippet at MoneyReportView.js to conditionally render the SpacerView component as follows:
    {props.shouldShowHorizontalRule && (
                        <SpacerView
                            shouldShow={props.shouldShowHorizontalRule}
                            style={[props.shouldShowHorizontalRule ? styles.reportHorizontalRule : {}]}
                        />
                    )}

    Implementing these changes will address the excessive padding issue on both mobile devices and web interfaces by adjusting CONTAINER_MINHEIGHT appropriately and rendering the SpacerView component conditionally when required.

    What alternative solutions did you explore? (Optional)

    NA

    Results

    Native
    native.mp4
    Web [web.webm](https://github.com/Expensify/App/assets/111440031/2f40b5f5-8492-47e6-9270-9321b0a4d33b)
  9. tienifr commented on Oct 26, 2023

    @tienifr
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    IOU - Padding below total increases for unread messages on mobile devices

    What is the root cause of that problem?

    We have 2 problems here:

    1. In MoneyRequestView, we're using getReportWelcomeContainerStyle to get the style

    <View style={[StyleUtils.getReportWelcomeContainerStyle(isSmallScreenWidth)]}>

    And we fix the minHeight, in this case, it's 280px

    minHeight: emptyStateBackground.SMALL_SCREEN.CONTAINER_MINHEIGHT,

    but, if we show the unread marker, the SpacerView will be hidden, so the minHeight at that time should be 260px

    1. We already have the logic to add marginBottom: 8px for the preview. But it's not correct, because we set the top of unread marker is -10px

    return <View style={[props.shouldHideThreadDividerLine && !isNormalCreatedAction && styles.mb2]}>{content}</View>;

    What changes do you think we should make in order to solve the problem?

    Solution 1:

    1. If shouldShowHorizontalRule is false, we should minus the minHeight by 20px
                minHeight: emptyStateBackground.SMALL_SCREEN.CONTAINER_MINHEIGHT - (shouldShowHorizontalRule ? 0: 20),
    
    1. Change styles.mb2 in this line to {marginBottom: 10}

    Solution 2:

    • We can show the SpacerView no matter the shouldShowHorizontalRule is to preserve the space, and remove borderColor (divider) if shouldShowHorizontalRule is false

    • Then remove the marginBottom logic here

    • Update top: -20 of UnreadActionIndicator when shouldShowHorizontalRule is true, otherwise top:-10

    I prefer the solution 2 because, it not only preserves the space between new line and total, but also the distance between new line and money preview

    Result

    Screen.Recording.2023-10-26.at.17.15.28.mov
  10. ArekChr commented on Oct 26, 2023

    @ArekChr
    Contributor

    @tienifr, I’ve gone through your proposal, and it seems good overall. Regarding the second solution, my only concern is negative spacing. Generally, avoiding such styles is a good idea as they can lead to inconsistency in the future. What are your thoughts on fixing this issue by avoiding negative spacing?

  11. Nathan-Mulugeta commented on Oct 26, 2023

    @Nathan-Mulugeta

    What are your thoughts on my proposal? @ArekChr

  12. 235 remaining items

  13. alexpensify commented on Apr 30, 2024

    @alexpensify
    Contributor

    Weekly Update: Looks like the PR is going through a final review.

  14. melvin-bot commented on May 2, 2024

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  15. alexpensify commented on May 7, 2024

    @alexpensify
    Contributor

    @DylanDylann - can we get an update if this Deploy Blocker is accurate or an error? Thanks!

  16. DylanDylann commented on May 8, 2024

    @DylanDylann
    Contributor

    @alexpensify Yeah, It is a regression

  17. dragnoir commented on May 8, 2024

    @dragnoir
    Contributor

    @alexpensify When I submitted the PR for review, the new feature "invoice" was not there. The issue happened with the invoice report.

  18. alexpensify commented on May 14, 2024

    @alexpensify
    Contributor

    Thank you for this context! It looks like the automation failed here and payment is due for this one. I'll work on that process.

  19. alexpensify commented on May 14, 2024

    @alexpensify
    Contributor

    Please disregard the last comment.

    Ok, flagging this notice: #30360 (comment)

    @dragnoir please apply here: https://www.upwork.com/jobs/~0104d969f5990f36bd

    Everyone else will be paid via this link: https://www.upwork.com/jobs/~0158fbfd6d89166dba

    After, I can carry on with the payment process. Thanks!

  20. dragnoir commented on May 15, 2024

    @dragnoir
    Contributor

    @alexpensify applied, thank you

  21. alexpensify commented on May 15, 2024

    @alexpensify
    Contributor

    Payouts due: 2024-05-13 - delayed due to automation failure

    Upwork job is here. The PR was submitted before the payment changes in April. Also, this issue was created in 2023, so that's why there is a reporter bonus.

  22. alexpensify commented on May 15, 2024

    @alexpensify
    Contributor

    @dragnoir - I sent you an offer in Upwork. Please accept, and I can complete the payment process.

  23. dragnoir commented on May 16, 2024

    @dragnoir
    Contributor

    @alexpensify offer accepted, thank you

  24. alexpensify commented on May 17, 2024

    @alexpensify
    Contributor

    All set, everyone has been paid via Upwork!

    Heads up, I will be offline until Tuesday, May 28, 2024, and will not actively watch over this GitHub during that period.

    If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions