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
[HOLD for payment 2024-06-06] [$500] Empty state image has too much overlap with message in attachment thread #36166
changed the title [-]Empty state image has too much overlap with message in attachment thread[/-][+][$500] Empty state image has too much overlap with message in attachment thread[/+]on Feb 8, 2024
To move the background image a little to the top and use a 60px overlap in all chat reports views,
we should modify VIEW_HEIGHThere to use 240px for small screens and 390px for wide screens.
The formula for choosing VIEW_HEIGHT is (after removing the 40px padding in thread screen):
for WIDE_SCREEN: overlap between the report message and the background image= 450px background image height - VIEW_HEIGHT value
for SMALL_SCREEN: overlap between the report message and the background image= 300px background image height - VIEW_HEIGHT value
the above values (240 and 390) gives 60px overlap.
we should get the exact overlap value from the design team.
I asked the design team here for the overlap value, and they fixed a value of 60px for both wide and small screens.
What alternative solutions did you explore? (Optional)
If we want to use a 60px overlap value in the thread screen only and keep 135px in other screens, we can do the following:
we should add here this code to make the change only for thread reports:
THREAD_REPORT: {SMALL_SCREEN: {IMAGE_HEIGHT: 300,CONTAINER_MINHEIGHT: 200,VIEW_HEIGHT: 240,//ajust the view height value here},WIDE_SCREEN: {IMAGE_HEIGHT: 450,CONTAINER_MINHEIGHT: 500,VIEW_HEIGHT: 390,//ajust the view height value here},},
functiongetReportWelcomeTopMarginStyle(isSmallScreenWidth: boolean,isMoneyOrTaskReport=false,isThreadReport=false): ViewStyle{letemptyStateBackground;if(isMoneyOrTaskReport){emptyStateBackground=CONST.EMPTY_STATE_BACKGROUND.MONEY_OR_TASK_REPORT;}elseif(isThreadReport){emptyStateBackground=CONST.EMPTY_STATE_BACKGROUND.THREAD_REPORT;}else{emptyStateBackground=CONST.EMPTY_STATE_BACKGROUND;}// rest remains the same
I think the only regression the PR caused is this one: #42760, which is now resolved. Therefore, we can complete the payment based on the payment summary and close the issue.
Whatever you all think is best works for me. Just noting that a bunch of regressions came out of this one, and it seems like we have a new one that needs to be addressed here too: #43247
I spoke with @yuwenmemon about this, and it sounds like there were two regressions within the 7-day waiting period: #42760 and #34640. Have I understood that correctly? Once I have a sense of the regressions caused, I'll update the payment summary so we can button this up.
Note that because we removed the hard-coded space for the background image, Any report action or expense that may be incorrectly displayed above the first report action that has the background image will be overlapped by the image because of zIndex values in this code:
However, this is correct behaviour because no report action should be displayed above the first report action with the background image. If a bug like this occurs, it is because there is a duplicate report action with the background image or the order of report actions is incorrect; in this case, the root cause of the bug should be fixed. If we reverse my PR, the bug will still occur.
I think the only bug that my PR may be blamed for is #42760
It would be nice if we consider that #35921 was combined with this issue, and it took too much effort with two PRs worked on: #36765#38449
@rayane-djouah Ah, I did link the wrong one. Sorry about that!
Thank you for writing that out so clearly! I've spoken to the team, and we've agreed on the payment amounts originally dictated above. I'll copy them here for ease:
Activity
[-]Empty state image has too much overlap with message in attachment thread[/-][+][$500] Empty state image has too much overlap with message in attachment thread[/+]melvin-bot commentedon Feb 8, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0180e51b2d8c0c04ec
melvin-bot commentedon Feb 8, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 (
External)melvin-bot commentedon Feb 8, 2024
Triggered auto assignment to @johncschuster (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.rayane-d commentedon Feb 8, 2024
@shawnborton could you please share mockups of the expected result ?
neonbhai commentedon Feb 8, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Empty state image has too much overlap with message in attachment thread
What is the root cause of that problem?
This happens as we have and incorrect style
justifyContentEndhere:App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 74 in e309896
This makes the
AnimatedEmptyStateBackgroundimage appear behind the content.What changes do you think we should make in order to solve the problem?
We should move the
styles.justifyContentEndfrom this View to the View just afterAnimatedEmptyStateBackground:App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 76 in e309896
Result:
Before
Screen.Recording.2024-02-09.at.12.03.48.AM.mov
After
shawnborton commentedon Feb 8, 2024
@rayane-djouah shared a rough mockup for you here
rayane-d commentedon Feb 9, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The empty state image is excessively overlapping with the message within the attachment thread
What is the root cause of that problem?
We are applying an incorrect styling attribute, specifically
justifyContentEnd, within the following component:App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 74 in 43e81a1
This particular styling causes the
AnimatedEmptyStateBackgroundimage to be positioned behind the thread content, leading to the overlap issue.What changes do you think we should make in order to solve the problem?
we should remove
, styles.justifyContentEndhere:App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 74 in 43e81a1
Result:
But a lot of overlap is still applied because the report message top margin value here is not enough:
App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 76 in 43e81a1
after removing the
justifyContentEndstyle, an overlap of135pxis still applied.the report first item top margin value is here:
App/src/CONST.ts
Line 153 in 176675b
we are also applying a padding here that adds
40px:App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 76 in 43e81a1
the background image size is
450pxhere :App/src/CONST.ts
Line 151 in 176675b
overlap value = 450px - (275px + 40px) = 135pxTo move the background image a little to the top and use a
60pxoverlap in all chat reports views,we should modify
VIEW_HEIGHThere to use 240px for small screens and 390px for wide screens.The formula for choosing
VIEW_HEIGHTis (after removing the40pxpadding in thread screen):for
WIDE_SCREEN:overlap between the report message and the background image= 450px background image height - VIEW_HEIGHT valuefor
SMALL_SCREEN:overlap between the report message and the background image= 300px background image height - VIEW_HEIGHT valuethe above values (240 and 390) gives
60pxoverlap.we should get the exact overlap value from the design team.I asked the design team here for the overlap value, and they fixed a value of 60px for both wide and small screens.
and here:
App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 76 in 43e81a1
remove
styles.p5that we don't need (it adds40pxpadding that get added as a top margin to the message).Result with
VIEW_HEIGHT: 390for wide screens:Result for wide screens:
Dimensions details
AnimatedEmptyStateBackgroundimage size:report message top margin view size:
Result for small screens:
Dimensions details
AnimatedEmptyStateBackgroundimage size:report message top margin view size:
What alternative solutions did you explore? (Optional)
If we want to use a
60pxoverlap value in the thread screen only and keep135pxin other screens, we can do the following:we should add here this code to make the change only for thread reports:
and here:
App/src/styles/utils/index.ts
Lines 724 to 725 in 43e81a1
add
isThreadReport:and here:
App/src/pages/home/report/ReportActionItemParentAction.tsx
Line 76 in 43e81a1
pass true for
isThreadReportand removestyles.p5that we don't need (it adds40pxpadding that get added as a top margin to the message).jakub-trzebiatowski commentedon Feb 9, 2024
@shawnborton Does this require any extra approval, as it's a user-observable change? Or is your approval enough?
120 remaining items
shawnborton commentedon Jun 19, 2024
Sorry - what is the exact question you need me to answer?
johncschuster commentedon Jun 19, 2024
@rayane-djouah, bump on the above
rayane-d commentedon Jun 20, 2024
I think this one: #36166 (comment)
I think the only regression the PR caused is this one: #42760, which is now resolved. Therefore, we can complete the payment based on the payment summary and close the issue.
johncschuster commentedon Jun 24, 2024
@shawnborton ^^
shawnborton commentedon Jun 24, 2024
Whatever you all think is best works for me. Just noting that a bunch of regressions came out of this one, and it seems like we have a new one that needs to be addressed here too: #43247
johncschuster commentedon Jun 25, 2024
Discussing payment. Will update the issue shortly.
johncschuster commentedon Jun 25, 2024
I spoke with @yuwenmemon about this, and it sounds like there were two regressions within the 7-day waiting period: #42760 and #34640. Have I understood that correctly? Once I have a sense of the regressions caused, I'll update the payment summary so we can button this up.
Thanks for your patience everyone!
rayane-d commentedon Jun 26, 2024
Sorry - did you link the wrong issue (#34640)?
I'll try to drive clarity here.
The bugs that blame this PR are:
Searchpage RHP is duplicated and has unnecessary empty space #43247 This is not reproducible, and we can close it.Note that because we removed the hard-coded space for the background image, Any report action or expense that may be incorrectly displayed above the first report action that has the background image will be overlapped by the image because of
zIndexvalues in this code:App/src/components/InvertedFlatList/CellRendererComponent.tsx
Lines 10 to 28 in 5f45b4c
However, this is correct behaviour because no report action should be displayed above the first report action with the background image. If a bug like this occurs, it is because there is a duplicate report action with the background image or the order of report actions is incorrect; in this case, the root cause of the bug should be fixed. If we reverse my PR, the bug will still occur.
I think the only bug that my PR may be blamed for is #42760
It would be nice if we consider that #35921 was combined with this issue, and it took too much effort with two PRs worked on: #36765 #38449
But I'm okay with whatever you find fair.
johncschuster commentedon Jun 28, 2024
@rayane-djouah Ah, I did link the wrong one. Sorry about that!
Thank you for writing that out so clearly! I've spoken to the team, and we've agreed on the payment amounts originally dictated above. I'll copy them here for ease:
Payment Summary:
Contributor: @rayane-djouah - $250 - paid via Upwork - PAID
Contributor+: @eh2077 - $250 - paid via Upwork - PAID