-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Implement theme dependent illustrations (useThemeIllustrations
hook)
#31452
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? |
src/styles/illustrations/light.ts
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd still move the files with the imports to src/styles/illustrations
. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grgia updated the PR accordingly :)
@grgia I honestly don't know what value I can provide as a reviewer here? |
all good @dannymcclain removed you as a reviewer! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
@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
useThemeIllustrations
hook 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.js
before any early return:Offline tests
Same as in Tests.
QA Steps
No QA.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.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...