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
[$250] Reports - The Add expense button in the create report empty state feels unnecessarily wide #82108
Version Number: 9.3.17-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: 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):
changed the title [-]Reports - The `Add expense` button in the create report empty state feels unnecessarily wide[/-][+][$250] Reports - The `Add expense` button in the create report empty state feels unnecessarily wide[/+]on Feb 11, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-11 11:54:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - The Add expense button in the create report empty state feels unnecessarily wide
What is the root cause of that problem?
In EmptyStateComponent,
The button is styled with styles.flex1, which causes it to expand to fill the available width. This is by design to support multiple buttons in a row (where flex1 distributes space evenly), but when there's only one button, it appears unnecessarily wide
What changes do you think we should make in order to solve the problem?
Only apply flex1 when there are multiple buttons - This would make single buttons auto-sized
Add a max-width constraint for single buttons
Center align single buttons with intrinsic width instead of stretching them
What alternative solutions did you explore? (Optional)
Result:
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
In the create-report empty state, the “Add expense” button stretches to full width and looks too wide, but it should size to its content.
What is the root cause of that problem?
In this implementation, src/components/EmptyStateComponent/index.tsx assumes every empty-state button should always use styles.flex1, and this forces buttons to expand to fill available width by default in the buttons?.map() rendering logic.
What changes do you think we should make in order to solve the problem?
Place of change: src/components/EmptyStateComponent/index.tsx (owner of empty-state layout).
Behavior: Buttons size to their content unless the caller passes a style that overrides this (for example, style={styles.flex1} for full-width).
Implementation: Remove the default styles.flex1 from both button branches in the buttons?.map() callback.
Code changes:
ButtonWithDropdownMenu (around line 124): change style={[styles.flex1, style]} to style={style}.
Button (around line 134): change style={[styles.flex1, style]} to style={style}.
Rationale:
Fixing this in EmptyStateComponent keeps a single invariant for all empty states and avoids per-caller workarounds.
The parent uses styles.justifyContentCenter, so removing flex1 still centers buttons.
EmptyStateButton supports style, so callers that need full-width buttons can pass style={styles.flex1}.
Risk and regression:
Only the layout of empty-state buttons changes.
Callers needing full-width buttons can pass style={styles.flex1}.
Affected areas: all empty states that use EmptyStateComponent (Add Unreported Expense, workspace tags/categories/per diem, Expensify Card, Search, etc.). Most should benefit from content-sized buttons.
What alternative solutions did you explore? (Optional)
Fixing only in SearchMoneyRequestReportEmptyState (for example, passing style to override flex1) would be a caller-side workaround and would not improve other empty states.
Conditionally applying flex1 based on button count would add complexity without clear benefit.
Please re-state the problem that we are trying to solve in this issue.
The "Add expense" button in the empty report state appears unnecessarily wide. The expected behavior is that the button should "hug the contents" rather than stretching across available space.
What is the root cause of that problem?
File: src/components/EmptyStateComponent/index.tsx
Lines: 125 and 136
The button components use styles.flex1 which causes them to expand to fill available width. While this is correct for multiple buttons (they should share space equally), a single button stretches unnecessarily.
Current code:
ButtonWithDropdownMenu (line 125):
style={[styles.flex1,style]}
Button (line 136):
style={[styles.flex1,style]}
What changes do you think we should make in order to solve the problem?
Add styles.alignItemsCenter conditionally only for single buttons. This centers the button content while maintaining proper spacing behavior for multiple buttons.
For single button: styles.alignItemsCenter centers content within flex container, making it appear compact
For multiple buttons: No alignItemsCenter applied, so buttons expand to share available space equally
This ensures:
Single button appears compact and centered
Multiple buttons continue to fill available space proportionally
Consistent behavior across both button types
Result
Single button: Appears compact and centered (hugs contents)
Multiple buttons: Share space equally across full width
All layouts: Works on both narrow and wide screens
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Hi @shubham1206agra! I can help with this! I'm having a hard time finding the work associated with this. Can you help me? I'll get a payment summary going as soon as I've got that!
100% due to the contributor if they drafted a PR and requested a review.
100% to C+ if they filled out the Reviewer Checklist and the completed checklist has tests in it.
Activity
melvin-bot commentedon Feb 11, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra (
External)melvin-bot commentedon Feb 11, 2026
Triggered auto assignment to @johncschuster (
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.[-]Reports - The `Add expense` button in the create report empty state feels unnecessarily wide[/-][+][$250] Reports - The `Add expense` button in the create report empty state feels unnecessarily wide[/+]melvin-bot commentedon Feb 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022021547886332387735
PiyushChandra17 commentedon Feb 11, 2026
🚨 Edited by proposal-police: This proposal was edited at 2026-02-11 11:54:31 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Reports - The Add expense button in the create report empty state feels unnecessarily wide
What is the root cause of that problem?
In
EmptyStateComponent,The button is styled with styles.flex1, which causes it to expand to fill the available width. This is by design to support multiple buttons in a row (where flex1 distributes space evenly), but when there's only one button, it appears unnecessarily wide
App/src/components/MoneyRequestReportView/SearchMoneyRequestReportEmptyState.tsx
Lines 84 to 101 in 54bc913
App/src/components/EmptyStateComponent/index.tsx
Lines 115 to 140 in 54bc913
What changes do you think we should make in order to solve the problem?
flex1when there are multiple buttons - This would make single buttonsauto-sizedmax-widthconstraint forsingle buttonsintrinsic widthinstead of stretching themWhat alternative solutions did you explore? (Optional)
Result:
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
nkdengineer commentedon Feb 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Add expense button feels unnecessarily wide.
What is the root cause of that problem?
The padding is small, so the button takes the full width
App/src/components/MoneyRequestReportView/SearchMoneyRequestReportEmptyState.tsx
Line 87 in 05d6c18
App/src/components/EmptyStateComponent/index.tsx
Line 102 in 05d6c18
What changes do you think we should make in order to solve the problem?
Pass more padding to
cardContentStyles. For example,styles.p10, we can adjust based on the suggestion from design team.App/src/components/MoneyRequestReportView/SearchMoneyRequestReportEmptyState.tsx
Line 87 in 05d6c18
What alternative solutions did you explore? (Optional)
We can add more padding by passing
stylefor button array hereApp/src/components/MoneyRequestReportView/SearchMoneyRequestReportEmptyState.tsx
Line 97 in 05d6c18
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
yatin-italy commentedon Feb 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the create-report empty state, the “Add expense” button stretches to full width and looks too wide, but it should size to its content.
What is the root cause of that problem?
In this implementation,
src/components/EmptyStateComponent/index.tsxassumes every empty-state button should always usestyles.flex1, and this forces buttons to expand to fill available width by default in thebuttons?.map()rendering logic.What changes do you think we should make in order to solve the problem?
Place of change:
src/components/EmptyStateComponent/index.tsx(owner of empty-state layout).Behavior: Buttons size to their content unless the caller passes a style that overrides this (for example,
style={styles.flex1}for full-width).Implementation: Remove the default
styles.flex1from both button branches in thebuttons?.map()callback.Code changes:
ButtonWithDropdownMenu(around line 124): changestyle={[styles.flex1, style]}tostyle={style}.Button(around line 134): changestyle={[styles.flex1, style]}tostyle={style}.Rationale:
Fixing this in
EmptyStateComponentkeeps a single invariant for all empty states and avoids per-caller workarounds.The parent uses
styles.justifyContentCenter, so removingflex1still centers buttons.EmptyStateButtonsupportsstyle, so callers that need full-width buttons can passstyle={styles.flex1}.Risk and regression:
Only the layout of empty-state buttons changes.
Callers needing full-width buttons can pass
style={styles.flex1}.Affected areas: all empty states that use
EmptyStateComponent(Add Unreported Expense, workspace tags/categories/per diem, Expensify Card, Search, etc.). Most should benefit from content-sized buttons.What alternative solutions did you explore? (Optional)
Fixing only in
SearchMoneyRequestReportEmptyState(for example, passingstyleto overrideflex1) would be a caller-side workaround and would not improve other empty states.Conditionally applying
flex1based on button count would add complexity without clear benefit.webbygit commentedon Feb 11, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
The "Add expense" button in the empty report state appears unnecessarily wide. The expected behavior is that the button should "hug the contents" rather than stretching across available space.
What is the root cause of that problem?
File: src/components/EmptyStateComponent/index.tsx
Lines: 125 and 136
The button components use styles.flex1 which causes them to expand to fill available width. While this is correct for multiple buttons (they should share space equally), a single button stretches unnecessarily.
Current code:
ButtonWithDropdownMenu (line 125):
Button (line 136):
What changes do you think we should make in order to solve the problem?
Add styles.alignItemsCenter conditionally only for single buttons. This centers the button content while maintaining proper spacing behavior for multiple buttons.
Implementation
File: src/components/EmptyStateComponent/index.tsx
Change line 125:
Change line 136:
Why This Works
For single button: styles.alignItemsCenter centers content within flex container, making it appear compact
For multiple buttons: No alignItemsCenter applied, so buttons expand to share available space equally
This ensures:
Result
Single button: Appears compact and centered (hugs contents)
Multiple buttons: Share space equally across full width
All layouts: Works on both narrow and wide screens
38 remaining items
melvin-bot commentedon Apr 1, 2026
This issue has not been updated in over 15 days. @johncschuster, @Valforte, @webbygit, @shubham1206agra eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
shubham1206agra commentedon Apr 6, 2026
@mallenexpensify Can you handle payment here please? This is due immediately
johncschuster commentedon Apr 6, 2026
Hi @shubham1206agra! I can help with this! I'm having a hard time finding the work associated with this. Can you help me? I'll get a payment summary going as soon as I've got that!
shawnborton commentedon Apr 6, 2026
FWIW we ended up not having any work completed here because it was handled in an existing project/PR from another contributor.
shubham1206agra commentedon Apr 6, 2026
@johncschuster I completed review in #83290 here but PR got closed due to another refactor made the same changes.
mallenexpensify commentedon Apr 7, 2026
Payment Summary
Contributor: @webbygit paid $250 via Upwork
Contributor+: @shubham1206agra due $250 via NewDot
@webbygit please apply for the job then tag me in a post here so I can hire you.
https://www.upwork.com/jobs/~022041527334143517526
Our process states
webbygit commentedon Apr 7, 2026
@mallenexpensify Done
mallenexpensify commentedon Apr 7, 2026
@webbygit can you please accept the job below? Please reply here and tag me once you have.
https://www.upwork.com/jobs/~022041527334143517526
There were two applicants, I'm assuming your Vaibhav A. cuz you linked to the issue here.
webbygit commentedon Apr 7, 2026
@mallenexpensify Submitted.
and yes that's me
mallenexpensify commentedon Apr 7, 2026
@webbygit paid, summary updated above. Thx.
JmillsExpensify commentedon May 1, 2026
$250 approved for @shubham1206agra