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
[$500] IOU - Padding below total increases for unread messages on mobile devices #30360
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
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?
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,},
Amend the code snippet at MoneyReportView.js to conditionally render the SpacerView component as follows:
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)
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
@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?
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.
Activity
[-]IOU - Padding below total increases for unread messages on mobile devices[/-][+][$500] IOU - Padding below total increases for unread messages on mobile devices[/+]melvin-bot commentedon Oct 25, 2023
Triggered auto assignment to @alexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 25, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0158fbfd6d89166dba
melvin-bot commentedon Oct 25, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 25, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ArekChr (
External)Nathan-Mulugeta commentedon 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
The size of the
CONTAINER_MINHEIGHTforSMALL_SCREENis the same as the size ofCONTAINER_MINHEIGHTforWIDE_SCREEN.Furthermore, a discrepancy on the web arises when
props.shouldShowHorizontalRuleis set tofalse. TheSpacerViewcomponent persists within the DOM, causing an undue gap between theunreadIndicatorand the total amount.What changes do you think we should make in order to solve the problem?
CONTAINER_MINHEIGHTfrom280to260forSMALL_SCREENsizes. Which fixes the issue on small screens as we are adjusting the min height accordingly.The changes should look like this:
Implementing these changes will address the excessive padding issue on both mobile devices and web interfaces by adjusting CONTAINER_MINHEIGHT appropriately and rendering the
SpacerViewcomponent 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 commentedon 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:
getReportWelcomeContainerStyleto get the styleApp/src/components/ReportActionItem/MoneyRequestView.js
Line 163 in cd851f5
And we fix the minHeight, in this case, it's 280px
App/src/styles/StyleUtils.ts
Line 944 in cd851f5
but, if we show the unread marker, the
SpacerViewwill be hidden, so the minHeight at that time should be 260px-10pxApp/src/pages/home/report/ReportActionItem.js
Line 610 in 414d591
What changes do you think we should make in order to solve the problem?
Solution 1:
Solution 2:
We can show the
SpacerViewno matter the shouldShowHorizontalRule is to preserve the space, and remove borderColor (divider) if shouldShowHorizontalRule is falseThen remove the marginBottom logic here
Update
top: -20ofUnreadActionIndicatorwhen shouldShowHorizontalRule is true, otherwisetop:-10I 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 commentedon 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 commentedon Oct 26, 2023
What are your thoughts on my proposal? @ArekChr
235 remaining items
alexpensify commentedon Apr 30, 2024
Weekly Update: Looks like the PR is going through a final review.
melvin-bot commentedon May 2, 2024
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.
alexpensify commentedon May 7, 2024
@DylanDylann - can we get an update if this Deploy Blocker is accurate or an error? Thanks!
DylanDylann commentedon May 8, 2024
@alexpensify Yeah, It is a regression
dragnoir commentedon 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 commentedon May 14, 2024
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 commentedon May 14, 2024
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 commentedon May 15, 2024
@alexpensify applied, thank you
alexpensify commentedon 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 commentedon May 15, 2024
@dragnoir - I sent you an offer in Upwork. Please accept, and I can complete the payment process.
dragnoir commentedon May 16, 2024
@alexpensify offer accepted, thank you
alexpensify commentedon May 17, 2024
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!