Skip to content
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

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

Closed
4 of 6 tasks
kbecciv opened this issue Oct 25, 2023 · 172 comments
Closed
4 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Oct 25, 2023

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
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 25, 2023
@melvin-bot melvin-bot bot 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 Oct 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0158fbfd6d89166dba

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

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

@Nathan-Mulugeta
Copy link

Nathan-Mulugeta commented Oct 25, 2023

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)

@tienifr
Copy link
Contributor

tienifr commented Oct 26, 2023

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

@ArekChr
Copy link
Contributor

ArekChr commented Oct 26, 2023

@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?

@Nathan-Mulugeta
Copy link

What are your thoughts on my proposal? @ArekChr

@tienifr
Copy link
Contributor

tienifr commented Oct 27, 2023

@ArekChr you mean the top: -20 of UnreadActionIndicator? I think we have 2 cases that apply UnreadActionIndicator. The first one is below the created action, in this case, we should hide the horizontal rule -> top: -20
The second one is below the chat action -> top: -10 as what we already did here

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@alexpensify
Copy link
Contributor

@ArekChr - can you review the responses when you get a chance? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@ArekChr
Copy link
Contributor

ArekChr commented Oct 31, 2023

@garrettmknight Hello, I am wrapping up some urgent matters today, and I will be OOO from tomorrow to Monday. Can we assign another C+ here so as not to block the task?

@situchan
Copy link
Contributor

I can take over

@alexpensify alexpensify assigned situchan and unassigned ArekChr Oct 31, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 31, 2023
Copy link

melvin-bot bot commented Oct 31, 2023

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Oct 31, 2023

📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@alexpensify
Copy link
Contributor

Thank you @ArekChr for this update!

@situchan you are assigned now. Let's keep this one moving forward.

@situchan
Copy link
Contributor

@tienifr does your solution also fix web as well?

Screen.Recording.2023-10-31.at.10.19.14.PM.mov

@tienifr
Copy link
Contributor

tienifr commented Nov 1, 2023

@situchan Yes, did you test my second solution? I prefer the second one, if we apply the first solution, we need to disable animation when the minHeight change. Unfortunately, I didn't find any solutions for that edge case.

I tested the second solution and it worked well (the attached video here)

@Nathan-Mulugeta
Copy link

Hey @situchan ,have you got the chance to check my proposal. I would love to get a feedback on it please.

@alexpensify
Copy link
Contributor

Thanks! Regressions are always a priority.

@alexpensify
Copy link
Contributor

No update here

@alexpensify
Copy link
Contributor

The PR is in a draft-- making progress

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Mar 29, 2024
@dragnoir
Copy link
Contributor

PR ready #39297

@alexpensify
Copy link
Contributor

Update: The PR is waiting for @Beamanator to review it.

@alexpensify
Copy link
Contributor

Update: The PR is moving forward

@alexpensify
Copy link
Contributor

Weekly Update: The PR is going through some polish updates to help the design.

Copy link

melvin-bot bot commented Apr 23, 2024

📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@Beamanator
Copy link
Contributor

FYI I'm assigning @DylanDylann as C+ to review - but I haven't unassigned @situchan since they also did a review a bit ago.

@alexpensify
Copy link
Contributor

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

Copy link

melvin-bot bot commented May 2, 2024

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels May 2, 2024
@alexpensify
Copy link
Contributor

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

@DylanDylann
Copy link
Contributor

@alexpensify Yeah, It is a regression

@dragnoir
Copy link
Contributor

dragnoir commented May 8, 2024

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

@alexpensify
Copy link
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.

@alexpensify
Copy link
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!

@dragnoir
Copy link
Contributor

@alexpensify applied, thank you

@alexpensify
Copy link
Contributor

alexpensify commented May 15, 2024

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.

@alexpensify
Copy link
Contributor

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

@dragnoir
Copy link
Contributor

@alexpensify offer accepted, thank you

@alexpensify
Copy link
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
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests