-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-06-06] [$500] Empty state image has too much overlap with message in attachment thread #36166
Comments
Job added to Upwork: https://www.upwork.com/jobs/~0180e51b2d8c0c04ec |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @cubuspl42 ( |
Triggered auto assignment to @johncschuster ( |
@shawnborton could you please share mockups of the expected result ? |
ProposalPlease 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
This makes the What changes do you think we should make in order to solve the problem?We should move the
Result:BeforeScreen.Recording.2024-02-09.at.12.03.48.AM.mov |
@rayane-djouah shared a rough mockup for you here |
ProposalPlease 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
This particular styling causes the What changes do you think we should make in order to solve the problem?we should remove
Result: But a lot of overlap is still applied because the report message top margin value here is not enough:
after removing the Line 153 in 176675b
we are also applying a padding here that adds 40px :
the background image size is 450px here :Line 151 in 176675b
overlap value = 450px - (275px + 40px) = 135px
To move the background image a little to the top and use a SMALL_SCREEN: {
IMAGE_HEIGHT: 300,
CONTAINER_MINHEIGHT: 200,
VIEW_HEIGHT: 240,
},
WIDE_SCREEN: {
IMAGE_HEIGHT: 450,
CONTAINER_MINHEIGHT: 500,
VIEW_HEIGHT: 390,
},
MONEY_OR_TASK_REPORT: {
SMALL_SCREEN: {
IMAGE_HEIGHT: 300,
CONTAINER_MINHEIGHT: 280,
VIEW_HEIGHT: 240,
},
WIDE_SCREEN: {
IMAGE_HEIGHT: 450,
CONTAINER_MINHEIGHT: 280,
VIEW_HEIGHT: 390,
},
}, The formula for choosing the above values (240 and 390) gives
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:
remove styles.p5 that we don't need (it adds 40px padding that get added as a top margin to the message).
<View style={[StyleUtils.getReportWelcomeTopMarginStyle(isSmallScreenWidth)]} /> Result with Result for wide screens: Result for small screens: What alternative solutions did you explore? (Optional)If we want to use a 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
},
},
and here: Lines 724 to 725 in 43e81a1
add function getReportWelcomeTopMarginStyle(isSmallScreenWidth: boolean, isMoneyOrTaskReport = false, isThreadReport = false): ViewStyle {
let emptyStateBackground;
if (isMoneyOrTaskReport) {
emptyStateBackground = CONST.EMPTY_STATE_BACKGROUND.MONEY_OR_TASK_REPORT;
}
else if (isThreadReport) {
emptyStateBackground = CONST.EMPTY_STATE_BACKGROUND.THREAD_REPORT;
}
else {
emptyStateBackground = CONST.EMPTY_STATE_BACKGROUND;
}
// rest remains the same and here:
pass true for isThreadReport and remove styles.p5 that we don't need (it adds 40px padding that get added as a top margin to the message).
<View style={[StyleUtils.getReportWelcomeTopMarginStyle(isSmallScreenWidth, false, true)]} /> |
@shawnborton Does this require any extra approval, as it's a user-observable change? Or is your approval enough? |
Proposal |
@cubuspl42 I think just having approval from the @Expensify/design is enough here. @rayane-djouah was very helpful in Slack in showing us what different values might look like. One thing we might consider is how this affects ALL empty states, as in, maybe we should make this change across all room types (DM, #room, report, expense, etc) so that we get the consistent 60px overlap no matter where you are. |
The changes will apply to all thread reports, no matter from what type of chat they are created from (DM, #room, report, expense, etc), ensuring a consistent 60px overlap across all empty states. |
Here is the current situation of the app: Currently we are setting a custom top margin ( Lines 156 to 165 in 176675b
which gives a For everything else we are setting the top margin ( Lines 145 to 154 in 176675b
which gives a For thread screen, we currently place the background image behind the report first message, resulting in a 100% overlap. My proposal suggest modifying the logic for thread screen only by implementing a custom @shawnborton, if you think we should also revise the overlap values for other screen types, please let us know. Thank you! |
should we apply |
I'm mostly just thinking that we should pick a specific value, in this case 60px, for the overlap, and apply that consistently to every single chat view. No matter if it's a room, a thread, a report, a workspace chat, a task, etc. Let me know if that makes sense. Also cc @grgia to take a look at Rayane's comment above since I think you implemented some of this? |
The empty state design was implemented in this PR and the custom logic for money report screen was added in this PR. If we want to apply |
ProposalUpdated to use a |
ProposalPlease re-state the problem that we are trying to solve in this issue.Image on background not in correct position What is the root cause of that problem?We have a style applied here:
What changes do you think we should make in order to solve the problem?Just removing the - <View style={[StyleUtils.getReportWelcomeContainerStyle(isSmallScreenWidth), styles.justifyContentEnd]}>
+ <View style={[StyleUtils.getReportWelcomeContainerStyle(isSmallScreenWidth)> POC: On the other pages, the parent of
|
@rayane-djouah that feels good to me. @cubuspl42 @johncschuster I would love to have @rayane-djouah work on this as they've been super helpful in exploring solutions for this one. |
@cubuspl42, @johncschuster Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@shawnborton / @yuwenmemon I'm having a hard time understanding where your conversation has landed. @yuwenmemon, are you confirming there was a regression? |
Yes, correct. There's a regression. |
Thanks! I've updated the payment summary above to indicate that. |
As @rayane-djouah seems to be OOO, let me try to continue with the discussion. I also think the UI issue of #42795 shouldn’t be a regression from this PR if following is true From design perspective, we don't want to show two or more money requests in the This is the bug screenshot - the expense is displayed twice The normal ones look like @shawnborton Can you help to drive clarity here? It'll also be helpful for the other issue #42795 |
Correct, we definitely do not want to display the expense information twice like that. |
@shawnborton Even if they are different expenses, we also don't want to display more than one expense in this page, right? |
I see. Then clicking a preview card will only show details of an expense. If so, I think the implementation of this PR should be fine and it shouldn't be blamed for the unreasonable use case (bug) - show details of an expense twice in one page. |
This is still actively being discussed. This is just a bump for Melvin. Carry on! |
I have returned from being out of office, sorry for the delays here. @shawnborton - What do you think about @eh2077's comment ^ above?
Yes, it was fixed by #42629 |
Sorry - what is the exact question you need me to answer? |
@rayane-djouah, bump on the above |
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. |
@shawnborton ^^ |
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 |
Discussing payment. Will update the issue shortly. |
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! |
Sorry - did you link the wrong issue (#34640)? I'll try to drive clarity here. The bugs that blame this PR are:
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 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. |
@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 |
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.4.38-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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1707401686727289
Action Performed:
Expected Result:
The empty state image/background pattern should not have so much overlap with the message.
Actual Result:
The empty state pattern has a LOT of overlap with the message, almost sitting directly behind it.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
With vertical tall image
with normal image
without image
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: