Repository navigation
Add empty states - #81989
Add empty states#81989
Conversation
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
1 similar comment
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
@Expensify/design Would you please let me know the final font size for mobile vs wide screens header / not? There are a few designs in the figma, and the headline font didn't fit in mobile. I made it smaller (see description) but you may see for yourself. Thank you ❤️ |
|
I think the idea here is to reuse the exact empty state styles we have elsewhere in the app. That means h1 is 22px font-size, and the paragraph below is 15px in our text supporting color. Can we do a test build with that first and then decide if we need to make adjustments? |
|
For the illustration sizes, can we make them 68x68? I think they are 100x100 right now. |
|
Also @grgia try the PR with a fresh sign up - I noticed the empty state changing a few times in the background as the various onboarding modals were shown! |
|
And I think we need to use the updated/latest copy suggestions, right? |
Code Review SummaryPerformance Concernsrc/pages/home/ForYouSection/EmptyState.tsx line 58 — All 16 illustrations are loaded via useMemoizedLazyIllustrations(ILLUSTRATION_NAMES) even though only one is ever displayed (selected at module-load time via RANDOM_INDEX). The previous code loaded only 2 illustrations. Consider loading only the single selected illustration to reduce unnecessary asset loading from 16 SVGs to 1. Type Safety (src/pages/home/ForYouSection/EmptyState.tsx lines 42-44)The dynamic key construction using lcFirst + template literals with 'as TranslationPaths' casts bypasses compile-time type checking. If a translation key is misspelled or missing, this will fail at runtime instead of at build time. Consider using a typed mapping object instead of dynamic key construction, or add a unit test that verifies all keys resolve to valid translations. Magic Number (src/styles/index.ts line 3715)lineHeight: 28 is a magic number. The adjacent forYouEmptyStateDescription style correctly uses variables.fontSizeNormalHeight for its lineHeight. Consider using a variable from variables.ts for consistency. Minor: Export ordering (src/components/Icon/Illustrations.ts)F1Flags is inserted between ExpensifyApprovedLogo and ExpensifyCardImage in the export block, breaking the alphabetical order that the rest of the file follows. |
|
Looks like I was first assigned so I can proceed review |
| import Approval from '@assets/images/simple-illustrations/simple-illustration__approval.svg'; | ||
| import Binoculars from '@assets/images/simple-illustrations/simple-illustration__binoculars.svg'; | ||
| import BlueShield from '@assets/images/simple-illustrations/simple-illustration__blueshield.svg'; | ||
| import Broom from '@assets/images/simple-illustrations/simple-illustration__broom.svg'; |
There was a problem hiding this comment.
This file is being deprecated so no need to import new files here
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
There was a problem hiding this comment.
This doesn't look like it's updated to the latest copy? Provided here.
|
Also not sure why I'm reviewing on behalf of design, but worry about that later. |
|
Cool, I like this new approach way better. Again, design-wise this looks good, let's just get the updated copy in there and then SEND IT. |
|
@aimane-chnaif can you please complete the review? |
|
Should I be reviewing as well? Asking since I'm added in the reviewers |
|
We also still need to update the empty states with the latest copy before we can merge. |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / Safariweb.mov |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
| type EmptyStateMessage = { | ||
| const MSG = 'homePage.forYouSection.emptyStateMessages' as const; | ||
|
|
||
| const ILLUSTRATIONS: IllustrationName[] = [ |
There was a problem hiding this comment.
| const ILLUSTRATIONS: IllustrationName[] = [ | |
| const ILLUSTRATIONS = [ |
| 'Sunglasses', | ||
| 'F1Flags', | ||
| 'Fireworks', | ||
| ]; |
There was a problem hiding this comment.
| ]; | |
| ] as const; |
| const EMPTY_STATE_CONFIGS: EmptyStateConfig[] = ILLUSTRATIONS.map((name) => ({ | ||
| titleKey: `${MSG}.${lcFirst(name)}Title` as TranslationPaths, | ||
| descriptionKey: `${MSG}.${lcFirst(name)}Description` as TranslationPaths, | ||
| illustrationName: name, | ||
| })); |
There was a problem hiding this comment.
| const EMPTY_STATE_CONFIGS: EmptyStateConfig[] = ILLUSTRATIONS.map((name) => ({ | |
| titleKey: `${MSG}.${lcFirst(name)}Title` as TranslationPaths, | |
| descriptionKey: `${MSG}.${lcFirst(name)}Description` as TranslationPaths, | |
| illustrationName: name, | |
| })); | |
| const EMPTY_STATE_CONFIGS: EmptyStateConfig[] = ILLUSTRATIONS.map((name) => { | |
| const uncapitalizedName = lcFirst(name) as Uncapitalize<typeof name>; | |
| const titleKey: TranslationPaths = `${MSG}.${uncapitalizedName}Title`; | |
| const descriptionKey: TranslationPaths = `${MSG}.${uncapitalizedName}Description`; | |
| return { | |
| titleKey, | |
| descriptionKey, | |
| illustrationName: name, | |
| }; | |
| }); |
| marginTop: 20, | ||
| ...FontUtils.fontFamily.platform.EXP_NEW_KANSAS_MEDIUM, | ||
| fontSize: variables.fontSizeXLarge, | ||
| lineHeight: 28, |
There was a problem hiding this comment.
| lineHeight: 28, | |
| lineHeight: variables.lineHeightXXLarge, |
aimane-chnaif
left a comment
There was a problem hiding this comment.
Please address all above comments.
Otherwise looks good.
aimane-chnaif
left a comment
There was a problem hiding this comment.
There's spellcheck error. Please add Uncapitalize to ignore list.
|
Thank you @aimane-chnaif, fixed |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @Valforte has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.3.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀
|




Explanation of Change
Copy: #81517 (comment)
Fixed Issues
$ #81517
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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