[No QA] Migrate static styles to use StyleSheet.create - #70261
Conversation
|
@jayeshmangwani 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] |
|
Since the PR restructures one of files that is modified the most, I'm going to resolve conflicts after the review |
| }, | ||
| }) satisfies CustomPickerStyle, | ||
| }); | ||
| // Styles that don't satify the StyleSheet.create typing, because they are not defined on the top level of the object |
There was a problem hiding this comment.
spellcheck is failing for this
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid.movAndroid: mWeb Chromemweb-chrome.moviOS: HybridAppiOS.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Co-authored-by: Jayesh Mangwani <35371050+jayeshmangwani@users.noreply.github.com>
|
@adamgrzybowski Sorry, the spelling in my comment was also wrong 😢 , I should have used the word |
|
@jayeshmangwani, not a problem 😄 now it should be fixed for good 🤞 |
|
✋ 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/mountiny in version: 9.2.16-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.2.16-14 🚀
|
Explanation of Change
First phase of the styles optimisation. In this PR I split the
stylesobject into smaller, separate ones:staticStyles- style objects that can be wrapped byStyleSheet.createdynamicStyles- style functions that return a specific style object (can't be wrapped byStyleSheet.create)customPickerStyles- specific styles that are passed toreact-native-picker-selectnestedStyles- style objects that cannot be wrapped byStyleSheet.create, because the style definition is not on the top level of the object. -> temporary solution that I'd like to fix in one of the follow-ups.The introduction of
StaticStylesandDynamicStylesis necessary for the smooth transition toStyleSheet.create, since it doesn't accept functions as key values.Fixed Issues
$ #70099
PROPOSAL: https://swmansion.slack.com/archives/C08CZDJFJ77/p1756884100187419
Tests
Theoretically there should be no changes in the way the app works and displays content
Offline tests
QA Steps
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))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
Screen.Recording.2025-09-12.at.10.44.47.mov
Android: mWeb Chrome
Screen.Recording.2025-09-12.at.11.36.58.mov
iOS: Native
Screen.Recording.2025-09-12.at.09.59.32.mov
iOS: mWeb Safari
Screen.Recording.2025-09-12.at.10.01.14.mov
MacOS: Chrome / Safari
Screen.Recording.2025-09-12.at.11.34.35.mov
MacOS: Desktop
Screen.Recording.2025-09-12.at.11.28.33.mov