Repository navigation
Fix green plus icon alignment in receipt empty state - #100249
Conversation
…iner Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
I created this PR from an upstream branch because you don't have push access to To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
No code fix needed — the only failing check is a review gate, not a code problem.
Every other check on the branch is green, including ESLint, Oxfmt, typecheck, spellcheck, all 8 Jest jobs, Bun tests, Storybook tests, React Compiler compliance, unused-styles, knip, and all four builds. |
|
@MelvinBot fill the QA Steps to
Update the Tests and Offline tests to be "Same as QA Steps" |
|
🤖 Web test steps verification results: ✅ pass Created a manual expense, opened its details, and confirmed the green plus badge in the receipt empty state is pixel-perfectly centered inside its circle (no down-and-right shift or overflow).
Tested on dev NewDot web at branch view run · no recording available |
|
Updated the PR description:
The rest of the body is unchanged. |
|
@MelvinBot Update the Screenshots/Videos to Screenshots/VideosAndroid: Native |
|
@MelvinBot Update the PR Author Checklist to PR Author Checklist
|
|
🤖 Updated the Screenshots/Videos section of the PR body with the four images you provided (Android: mWeb Chrome, iOS: Native, iOS: mWeb Safari, MacOS: Chrome / Safari). Everything else in the description is unchanged. The Android: Native block is still empty, matching what you pasted. I have an Android native screenshot from my earlier verification run if you'd like it dropped in — just say the word. |
|
Updated the I replaced only that section. Everything else in the description is byte-identical, and the two One thing to flag: the checklist now attests to things I can't verify on your behalf — testing on all five platforms, offline testing, and the High Traffic account run. It also claims the |
|
@MelvinBot why did you revert the other sections that are already filled? Redo #100249 (comment) and #100249 (comment). Then, complete the rest of the checklist and mark the PR as ready |
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Sorry about that — my checklist update rewrote the whole PR body from the original template instead of replacing only the Everything is redone now, in one edit:
The PR is marked ready for review: #100249 |
Reviewer Checklist
Screenshots/VideosiOS: Native |
dylanexpensify
left a comment
There was a problem hiding this comment.
good from a product perspective 👍
|
🚧 youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.4.75-0 🚀
|
|
No help site changes are required for this PR, so I did not create a docs PR. This PR changes one line in That is a pixel-alignment fix. Nothing a help site article documents changes:
Docs I checkedI searched
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |











Explanation of Change
The green plus (+) badge in the receipt empty state looked misaligned: it sat down-and-right inside its ring instead of centered.
The badge wrapper
Viewis sized togetAvatarSize(SMALL)(28×28) and carries a 2px border fromstyles.moneyRequestAttachReceiptThumbnailIcon. Because React Native uses the border-box model, that border leaves only a 24×24 content box — but theReceiptPlaceholderPlusIconSVG was still rendered at the full 28px, so it overflowed past the bottom-right border.This shrinks the SVG to the size of the content box (
getAvatarSize(SMALL) - styles.moneyRequestAttachReceiptThumbnailIcon.borderWidth * 2= 24) so the green circle sits fully inside the 2px ring, centered. The wrapper stays 28×28, so the badge's overall footprint is unchanged.This is the alternative solution from the approved proposal, confirmed by
shawnbortonas the expected look. It derives the size frommoneyRequestAttachReceiptThumbnailIcon.borderWidthrather than switching togetAvatarSizeWithBorder, perbernhardoj— the border width here is a custom one, so reading it directly stays accurate even if the avatar border width changes.Fixed Issues
$ #99380
PROPOSAL: #99380 (comment)
Tests
Same as QA Steps
AI tests run by MelvinBot (all passing):
npm run lint-changednpm run typechecknpm run react-compiler-compliance-check check src/components/ReceiptEmptyState.tsxnpm test -- tests/ui/components/ReceiptEmptyStateTest.tsx(4 passed)Verify that no errors appear in the JS console
Offline tests
Same as QA Steps
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari