compiler: allow mutating refs in certain components#45464
compiler: allow mutating refs in certain components#45464mountiny merged 4 commits intoExpensify:mainfrom
refs in certain components#45464Conversation
dangrous
left a comment
There was a problem hiding this comment.
This looks fine to me! But I don't hugely know what I'm talking about haha. @kirillzyusko is there anyone else you think should take a look at this one before merging?
I would ask @mountiny to have a look as well 👀 |
|
I can handle the checklist BTW once @mountiny takes a look; there are a number of console errors but I'm pretty sure they're unrelated. In the meantime @kirillzyusko would you have a chance to take some screencasts of the videos working? |
|
Lets get a C+ for this checklist |
|
@kirillzyusko can you also please merge main? |
mountiny
left a comment
There was a problem hiding this comment.
Changes look good to me too @allgandalf will do the testing and checklist
@kirillzyusko how do we make sure that no new cases of this are added? Can you add some automated check for this that would fail on GH action?
This comment has been minimized.
This comment has been minimized.
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
@kirillzyusko any particular testing steps for this one or do you just want me to play round with the composer and video player? can you update the testing steps accordingly |
a279fc4 to
b0519f7
Compare
@dangrous done, I attached screenshots. |
@mountiny done 👀 |
@mountiny There is kind of small problem, that One thing that I can do is adding a job, that will compare an amount of compiled files from What do you think? Will such approach work or not? 🤔 |
@allgandalf just play around 👀 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-22.at.2.23.04.PM.movScreen.Recording.2024-07-22.at.2.21.58.PM.movAndroid: mWeb ChromeScreen.Recording.2024-07-22.at.2.51.02.PM.moviOS: NativeScreen.Recording.2024-07-22.at.11.25.33.AM.movScreen.Recording.2024-07-22.at.11.24.03.AM.moviOS: mWeb SafariScreen.Recording.2024-07-22.at.1.46.06.PM.movScreen.Recording.2024-07-22.at.1.45.04.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-20.at.2.25.30.AM.movMacOS: DesktopScreen.Recording.2024-07-22.at.1.49.52.PM.movScreen.Recording.2024-07-22.at.1.47.41.PM.mov |
|
@allgandalf what is your ETA for the review? thanks! |
|
Had some problem like you had building iOS but that is fixed, should complete the checklist in an hour |
|
just realised the App crashes on development if we make the video full screen when we have Screen.Recording.2024-07-20.at.2.20.48.AM.mov |
|
@allgandalf please report it in open source
I think we should start adding something like this; however, we might still allow new files to not adhere to the health check. OR we should create some guidelines on how to resolve various cases where we disable lint rules and how to avoid them before we disallow adding new "not-compatible" code |
|
@allgandalf how is it looking with the checklist? |
|
Completing now, my iOS build was failing so couldn't complete, sorry about that |
allgandalf
left a comment
There was a problem hiding this comment.
Changes LGTM, tests well on all platform, I checked with composer and uploading/pausing and muting videos. Hopefully clears QA too
|
🎯 @allgandalf, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #45879. |
|
@kirillzyusko can you update the testing steps for the QA please |
@allgandalf done! |
|
Seems like we're ready to merge here? |
|
✋ 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.0.11-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.0.11-2 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.11-5 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.12-0 🚀
|
Details
For react
anyValue.currentdoesn't mean that theanyValueis produced byuseRefhook and because of that compiler throws exception:The fix was added in facebook/react#29916 - the suggested way is to append
Refpostfix (what I did in this PR).After enabling
enableTreatRefLikeIdentifiersAsRefsand modifying several files the compile can optimize +4 more files (1081 vs 1077):This is a first PR in a series of PR that will align more files to
react-compilerrules.Fixed Issues
$ N/A
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop