-
Notifications
You must be signed in to change notification settings - Fork 3k
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
compiler: allow mutating ref
s in certain components
#45464
Conversation
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.
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? |
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.
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 |
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.
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.current
doesn't mean that theanyValue
is produced byuseRef
hook and because of that compiler throws exception:The fix was added in facebook/react#29916 - the suggested way is to append
Ref
postfix (what I did in this PR).After enabling
enableTreatRefLikeIdentifiersAsRefs
and 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-compiler
rules.Fixed Issues
$ N/A
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Tests
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop