Feature: Implement theme dependent illustrations (useThemeIllustrations hook)#31452
Conversation
|
@dannymcclain @shubham1206agra One of you needs to 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] |
|
@chrispader @grgia Is my review required here? |
| import EmptyStateBackgroundImage from '@assets/images/empty-state_background-fade-light.png'; | ||
| import Abracadabra from '@assets/images/product-illustrations/abracadabra.svg'; | ||
| import BankArrowPink from '@assets/images/product-illustrations/bank-arrow--pink.svg'; | ||
| import BankMouseGreen from '@assets/images/product-illustrations/bank-mouse--green.svg'; | ||
| import BankUserGreen from '@assets/images/product-illustrations/bank-user--green.svg'; | ||
| import ConciergeBlue from '@assets/images/product-illustrations/concierge--blue.svg'; | ||
| import ConciergeExclamation from '@assets/images/product-illustrations/concierge--exclamation.svg'; |
There was a problem hiding this comment.
@chrispader rather than importing all these images, what if we only used the provider for the theme specific ones and left the rest using the old pattern?
There was a problem hiding this comment.
yea sure, wasn't sure if all illustrations are theme-dependent.
once we have a list of all theme-dependent illustrations, i can simply adapt the affected components
There was a problem hiding this comment.
i'd still move the files with the imports to src/styles/illustrations. wdyt?
There was a problem hiding this comment.
Right now it is looking like it's only the background image, though the list might grow when we do a final QA of the theme. Hb we assume it's only that one for now?
There was a problem hiding this comment.
I'll leave the hook and context as is then and just update the list of imports. I can keep the branch with all of these changes, in case there are more dynamic illustrations coming soon
|
@grgia I honestly don't know what value I can provide as a reviewer here? |
|
all good @dannymcclain removed you as a reviewer! |
grgia
left a comment
There was a problem hiding this comment.
Code LGTM,
Let's add test steps to manually change the theme to light mode and check that the background image is correct :)
And then NO QA for QA section
done @grgia |
|
@chrispader could you add screenshots that show that the background image is correct for both light and dark? |
may bad, sorry uploaded the wrong screenshot.. added screenshots with the dynamic illustration! @grgia |
|
@shubham1206agra would you be interested in checklist/screenshots to ensure this image loads on dark/light mode on all platforms? |
|
Yes I will do it |
@grgia Do I need check these too? |
|
@shubham1206agra which are you referring to? |
|
Themes not applied to images shown above |
|
@shubham1206agra the only image that is effected is the background image! |
|
Ok then I will ignore these. |
Reviewer Checklist
Screenshots/Videos |
|
can we merge this @grgia ? :) |
|
🎉🎉 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/grgia in version: 1.4.4-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.4-3 🚀
|








@grgia
Details
Adds a new
useThemeIllustrationshook which uses the dynamic theme illustrations from theThemeIllustrationsProvider.This PR also updates all components in the app that use illustrations
Fixed Issues
$ #21017
PROPOSAL:
Tests
src/Expensify.jsbefore any early return:Offline tests
Same as in Tests.
QA Steps
No QA.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
MacOS: Desktop
Only added screenshots for macOS web (Safari) for showcase of test steps...