-
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
Use Font XML resources and standardise font usage on native platforms #41115
Use Font XML resources and standardise font usage on native platforms #41115
Conversation
I assume there's no visual changes as part of this? As in before vs after all look the same? Can we perhaps just get a double check on that? Wanna make sure line heights and everything is good :) |
No visual changes intended, no |
Exactly, after this PR everything is supposed to be the same. |
src/styles/utils/FontUtils/fontFamily/singleFontFamily/index.ts
Outdated
Show resolved
Hide resolved
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.
@fabioh8010 can you also add some documentation to describe how our fonts are set up and how to change or update any fonts using the new CLI method?
Update: Improved the refactors to unify native and web to use the same font family naming, did the same for ExpensifyHelp docs and Storybook, and did other minor improvements / fixes. What's left to do:
|
@fabioh8010 I'm marking this as WIP until you think it's ready for final review |
@roryabraham Kind bump 🙂 |
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.
Otherwise LGTM 👍🏼
@mollfpr back to you
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.
We did we move this from src/styles/utils/FontUtils/fontFamily/singleFontFamily.ts
to src/styles/utils/FontUtils/fontFamily/singleFontFamily/index.ts
, given that the singleFontFamily
directory contains only one index.ts
file?
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 just wanted to match with multiFontFamily
structure, which also has the folder.
@mollfpr kindly bump |
@mollfpr bump |
Checking 👀 |
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.
Looks good to me!
We also need to update the font for storybook theme.
Line 9 in f3a8f73
fontBase: 'ExpensifyNeue-Regular', |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
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 👍
@roryabraham bump 😄 |
skipping further design review here since the goal was no visible changes, and we used a full regression suite on an AdHoc build to try and accomplish that. |
✋ 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/roryabraham in version: 9.0.13-0 🚀
|
@roryabraham Do we have specific QA steps? |
Not really, just be on the lookout for broken fonts. Looks like tester found one issue which was already fixed |
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.13-4 🚀
|
Details
This PR standartise and improve font usage across the entire project.
fontFamily
,fontStyle
andfontWeight
.src/styles/utils/FontUtils
were refactored and simplified to standartise the font usage in E/App.We will be using the @react-native-community/cli-link-assets tool to manage font assets in the native platforms, as part of this effort to implement it into the RN CLI.
Relevant links/discussions in chronological order:
Fixed Issues
$ #13772
PROPOSAL:
Tests
Full regression test to ensure fonts are correctly applied.
Offline tests
N/A
QA Steps
Full regression test to ensure fonts are correctly applied.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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-compressed.mov
Android: mWeb Chrome
android.chrome-compressed.mov
iOS: Native
ios-compressed.mov
iOS: mWeb Safari
ios.safari-compressed.mov
MacOS: Chrome / Safari
web.chrome-compressed.mov
web.safari-compressed.mov
MacOS: Desktop
desktop-compressed.mov