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
[C+ Checklist Needs Completion] [$500] Android - Task - Background image in task report appears cropped after cancelling the task #33922
Version Number: 1.4.21-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: Applause - Internal Team Slack conversation:
Action Performed:
Go to 1:1 DM > + > Assign task
Create a task
Open the task report
Tap 3-dot menu > Cancel
Cancel the task
Expected Result:
The background image in task report will not appear cropped after cancelling the task
Actual Result:
The background image in task report appears cropped after cancelling the task
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Android - Task - Background image in task report appears cropped after cancelling the task[/-][+][$500] Android - Task - Background image in task report appears cropped after cancelling the task[/+]on Jan 4, 2024
Please re-state the problem that we are trying to solve in this issue.
The EmptyStateBackground image on deleted task page looks clipped
What is the root cause of that problem?
Animated background image used to be an SVG image. Recently that was replaced with a PNG. Earlier we used to set the container width to 200% to make the SVG image appear covering the screen on small screens.
Now this is not required as PNG images properly apply the resizeMode within the container.
The PNG image height is set to 300px for small screen devices and it is positioned 'absolutely' with in it's parent container. Parent container of the AnimatedBackground image has a much smaller height. Being the first item in the inverted Flatlist the absolutely positioned image goes out of the contentContainer bounds. On Android anything outside the content container of Flatlist gets clipped even if we provide overflow:'visible'. That's why the image gets clipped only on Android.
Below image shows contentContainer with red border applied around it on iOS and Android.
What changes do you think we should make in order to solve the problem?
The height is around 70 and we have a margin-top style from getReportWelcomeTopMarginStyle. It's defined by VIEW_HEIGHT above and the value is 185. So, the total height is around 255 and it's smaller than 300.
What changes do you think we should make in order to solve the problem?
Update the min-height (defined by CONTAINER_MINHEIGHT) at least to 300.
Then, we will update the task view in ReportActionItem by wrapping it with a View following the same pattern in ReportActionItemParentAction
Please re-state the problem that we are trying to solve in this issue.
For android, an empty state image in the task report clipped and doesn't looks correct
What is the root cause of that problem?
Currently, Parent of the absolute image have flex-direction: column-reverse; and due to that absolute position starting points will be incorrect. Due to that it overflows in the empty area which will be the unalloted area and in android it clipped to the boundary which creates this issue.
Activity
[-]Android - Task - Background image in task report appears cropped after cancelling the task[/-][+][$500] Android - Task - Background image in task report appears cropped after cancelling the task[/+]melvin-bot commentedon Jan 4, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01f32de82628d0256b
melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to @greg-schroeder (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 4, 2024
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jan 4, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov (
External)aswin-s commentedon Jan 4, 2024
Withdrawing my first proposal as it seems to break on web.
aswin-s commentedon Jan 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The EmptyStateBackground image on deleted task page looks clipped
What is the root cause of that problem?
Animated background image used to be an SVG image. Recently that was replaced with a PNG. Earlier we used to set the container width to
200%to make the SVG image appear covering the screen on small screens.App/src/styles/utils/index.ts
Line 704 in d4c3e63
Now this is not required as PNG images properly apply the resizeMode within the container.
The PNG image height is set to 300px for small screen devices and it is positioned 'absolutely' with in it's parent container. Parent container of the AnimatedBackground image has a much smaller height. Being the first item in the inverted Flatlist the absolutely positioned image goes out of the contentContainer bounds. On Android anything outside the content container of Flatlist gets clipped even if we provide overflow:'visible'. That's why the image gets clipped only on Android.
Below image shows contentContainer with red border applied around it on iOS and Android.
What changes do you think we should make in order to solve the problem?
Set BackgroundImage container width to 100%
Now the image translation logic needs to be adjusted as width is now set to 100%
App/src/pages/home/report/AnimatedEmptyStateBackground.tsx
Line 16 in d4c3e63
to
Also replace the fragment wrapper here with a
ViewApp/src/pages/home/report/ReportActionItem.js
Lines 586 to 598 in d4c3e63
Result
What alternative solutions did you explore? (Optional)
None (edited)
bernhardoj commentedon Jan 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The report background image is cut off on a canceled task report.
What is the root cause of that problem?
In short, the view container height is smaller than the background height.
The image height is defined by
IMAGE_HEIGHT.App/src/CONST.ts
Lines 134 to 143 in d800d60
On a small screen, the height is
300. When the task is canceled, we render a simple [Deleted task] message.App/src/pages/home/report/ReportActionItem.js
Lines 584 to 599 in d800d60
The height is around 70 and we have a margin-top style from
getReportWelcomeTopMarginStyle. It's defined byVIEW_HEIGHTabove and the value is185. So, the total height is around 255 and it's smaller than 300.What changes do you think we should make in order to solve the problem?
CONTAINER_MINHEIGHT) at least to 300.App/src/pages/home/report/ReportActionItemParentAction.js
Lines 65 to 69 in 6e5a5a2
(do the same for non-canceled task)
Pujan92 commentedon Jan 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
For android, an empty state image in the task report clipped and doesn't looks correct
What is the root cause of that problem?
Currently, Parent of the absolute image have
flex-direction: column-reverse;and due to that absolute position starting points will be incorrect. Due to that it overflows in the empty area which will be the unalloted area and in android it clipped to the boundary which creates this issue.Problem arises after this PR where the parent
Viewgets removed which we had earlier here.https://github.com/Expensify/App/pull/30815/files#diff-e6bee90bf18ae0cad1bb445ed9a9c0d989476874f1005810c0f8e93f1f39b99cL635
Issue
Screen.Recording.2024-01-04.at.23.51.59.mp4
What changes do you think we should make in order to solve the problem?
We should re-add parent by replacing fragment with
Viewbelow places which corrects the starting position of an absolute image.App/src/pages/home/report/ReportActionItem.js
Lines 586 to 587 in 1752bc5
App/src/pages/home/report/ReportActionItem.js
Lines 602 to 603 in 1752bc5
81 remaining items
deetergp commentedon Apr 15, 2024
Bump @aimane-chnaif
greg-schroeder commentedon Apr 18, 2024
Friendly bump to get this checklist done @aimane-chnaif!
greg-schroeder commentedon Apr 26, 2024
@aimane-chnaif any chance we can knock this out?
greg-schroeder commentedon May 7, 2024
@aimane-chnaif please jump on this one so we can close it, thank you!
greg-schroeder commentedon May 9, 2024
Oh, Aimane is OOO. @aswin-s any chance you could step in for the checklist?
greg-schroeder commentedon May 15, 2024
Bump @aimane-chnaif or @aswin-s
aimane-chnaif commentedon May 21, 2024
Sorry I am back.
aimane-chnaif commentedon May 21, 2024
This bug happened after we add background image in cancelled task report. No specific PR which caused regression.
Regression Test Proposal
greg-schroeder commentedon May 22, 2024
No sweat! Thanks @aimane-chnaif