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
[Due for payment 2025-05-28] [$250] Reports > Trips empty state illustration is too large #60963
Version Number: 9.1.32-7 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 (hyperlinked to channel name): #Expensify Bugs
🚨 Edited by proposal-police: This proposal was edited at 2025-05-08 05:56:45 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Trips empty state illustration in Reports > Trips appears too large.
What is the root cause of that problem?
There are two problems here
We're setting min-width: 400 and width: '100%' in emptyStateFolderWebStyles, but no height is defined. As a result, the Lottie animation appears too large and doesn't maintain the intended dimensions.
The Lottie container width is smaller than the parent width, which is max-width: 400, so it shows like a square view without a top border radius.
What changes do you think we should make in order to solve the problem?
Set the height of the Lottie webStyle to '100%' to ensure it scales proportionally and renders as intended. This will correctly scale the Lottie animation within its container while preserving its aspect ratio. You can find the relevant code here.
2.We should use fixed width and height values for small screens, as they work well. For larger screens, setting the container's width and height to '100%' ensures the height scales with the container's width. This prevents oversized Lotties and ensures the top border radius is applied correctly — it doesn't render as a square. here
Is there any way we can track down the regression? If we find out when/how this changed, we'll have the exact value that it used to be when it was implemented correctly.
After looking into more, it seems previously the StyleUtils.getWidthAndHeightStyle(variables.w191, variables.h172) was used but later during some other PR it was updated to the new StyleUtils.getWidthAndHeightStyle(375, 240) :
@trjExpensify Couldn’t find the exact PR that introduced this - I’ve reviewed the past 6 months of code but still can’t pinpoint the root cause. I’m adding a regression test proposal below.
@trjExpensify , just wondering - what’s the issue with the above Regression Test Proposal? I saw you gave it a thumbs down. Is there something wrong with it, or do you think it’s not needed?
@trjExpensify , just wondering - what’s the issue with the above Regression Test Proposal? I saw you gave it a thumbs down. Is there something wrong with it, or do you think it’s not needed?
Ah, refreshed and saw this. I don't think it's needed to check on each regression test as a visual design bug. 👍
Activity
melvin-bot commentedon Apr 28, 2025
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Shahidullah-Muffakir commentedon Apr 28, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-28 14:54:18 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Trips empty state illustration is too large
What is the root cause of that problem?
App/src/pages/Search/EmptySearchView.tsx
Line 128 in e7658a6
App/src/styles/index.ts
Lines 5544 to 5545 in e7658a6
What changes do you think we should make in order to solve the problem?
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
trjExpensify commentedon Apr 28, 2025
@Expensify/design can we get the spec we expect here, so I can update the OP?
nabi-ebrahimi commentedon Apr 28, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-05-08 05:56:45 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Trips empty state illustration in Reports > Trips appears too large.
What is the root cause of that problem?
There are two problems here
We're setting
min-width: 400andwidth: '100%'inemptyStateFolderWebStyles, but no height is defined. As a result, the Lottie animation appears too large and doesn't maintain the intended dimensions.The Lottie container width is smaller than the parent width, which is
max-width: 400, so it shows like a square view without a top border radius.What changes do you think we should make in order to solve the problem?
heightof the Lottie webStyle to'100%'to ensure it scales proportionally and renders as intended. This will correctly scale the Lottie animation within its container while preserving its aspect ratio. You can find the relevant code here.2.We should use fixed
widthandheightvalues for small screens, as they work well. For larger screens, setting the container'swidthandheightto'100%'ensures the height scales with the container's width. This prevents oversized Lotties and ensures the top border radius is applied correctly — it doesn't render as a square. hereWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
nyomanjyotisa commentedon Apr 28, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-28 15:10:59 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Trips empty state illustration is too large
What is the root cause of that problem?
We use
styles.emptyStateFolderWebStyleshere, which set the minWidth to 400 and we don't set the height and it automatically follow the aspect ratioApp/src/pages/Search/EmptySearchView.tsx
Line 128 in e7658a6
What changes do you think we should make in order to solve the problem?
explicitly set the height or maxHeight to 240 or 220 or any other value to match the design doc
or
or
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
add
sizing.h100to the styling to make the height 100% of the container heightor here
shawnborton commentedon Apr 28, 2025
Is there any way we can track down the regression? If we find out when/how this changed, we'll have the exact value that it used to be when it was implemented correctly.
Shahidullah-Muffakir commentedon Apr 28, 2025
After looking into more, it seems previously the
StyleUtils.getWidthAndHeightStyle(variables.w191, variables.h172)was used but later during some other PR it was updated to the newStyleUtils.getWidthAndHeightStyle(375, 240):App/src/pages/Search/EmptySearchView.tsx
Line 124 in cd58d89
we can update it to the original width and height
shawnborton commentedon Apr 28, 2025
Awesome, can you point me to the PR where it changed?
nyomanjyotisa commentedon Apr 28, 2025
trjExpensify commentedon Apr 28, 2025
Hm, that PR @nyomanjyotisa didn't change the width and height variables it doesn't look like, right?
This earlier commit changed the width variable from
335to375: 000807c in this PR: #48060I can't see those variables in the blame, myself.
Shahidullah-Muffakir commentedon Apr 28, 2025
here is the PR
#48040
76 remaining items
jayeshmangwani commentedon May 28, 2025
@trjExpensify Couldn’t find the exact PR that introduced this - I’ve reviewed the past 6 months of code but still can’t pinpoint the root cause. I’m adding a regression test proposal below.
jayeshmangwani commentedon May 28, 2025
Regression Test Proposal
Do we agree 👍 or 👎
melvin-bot commentedon May 28, 2025
Payment Summary
Upwork Job
BugZero Checklist (@trjExpensify)
trjExpensify commentedon May 28, 2025
Payment summary as follows:
jayeshmangwani commentedon May 28, 2025
@trjExpensify , just wondering - what’s the issue with the above Regression Test Proposal? I saw you gave it a thumbs down. Is there something wrong with it, or do you think it’s not needed?
nabi-ebrahimi commentedon May 28, 2025
Thanks, Accepted the offer.
trjExpensify commentedon May 28, 2025
Paid @nabi-ebrahimi, closing!
trjExpensify commentedon May 28, 2025
Ah, refreshed and saw this. I don't think it's needed to check on each regression test as a visual design bug. 👍
garrettmknight commentedon Jun 5, 2025
$250 approved for @jayeshmangwani