-
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
revert usage of InteractionManager in Modal #21865
Conversation
@allroundexperts 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] |
@allroundexperts wait, I'll let you know, I'm trying to more optimize it |
@allroundexperts problem is not limited to IntractionManager, in staging and production hex are converted to rgba by default. Thats why it was not reproduced in dev. |
Hm... Are you implying that the problem existed before your PR? |
I guess something got also changed in staging and production, if you look at meta color in staging its default to rgba value and we are just apply rgb value only while opening modal. I'm also modifying the function to accept rgb/rgba as param. |
Right. Can you revert your change and see if the error still occurs? |
No it will not. |
@allroundexperts I pushed the code. i modified @allroundexperts Its ready for review now. |
src/styles/StyleUtils.js
Outdated
const themeHex = convertRGBToHex(...themeRGB); | ||
return themeHex; |
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.
Why do you need this change?
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 were only returning rgb here. Everywhere we use hex, i thought we should return hex from here also.
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.
Let's try not to change the existing behaviour.
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.
ok, reverting this one.
@@ -16,7 +15,7 @@ function Modal(props) { | |||
return; | |||
} | |||
|
|||
InteractionManager.runAfterInteractions(() => StatusBar.setBackgroundColor(color)); | |||
StatusBar.setBackgroundColor(color); |
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.
Why is this revert needed? The console error seemed to be stemming from the convertRGBToHex
function?
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.
There was race condition also with modal. to get correct current color of StatusBar. i reverted usage of InteractionManager
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-07-04.at.12.55.16.PM.movMobile Web - ChromeScreen.Recording.2023-07-04.at.12.59.45.PM.movMobile Web - SafariScreen.Recording.2023-07-04.at.1.01.59.PM.movDesktopScreen.Recording.2023-07-04.at.12.56.10.PM.moviOSScreen.Recording.2023-07-04.at.1.05.42.PM.movAndroidScreen.Recording.2023-07-04.at.1.08.30.PM.mov |
Sure |
@allroundexperts Its pretty much better now in android. androidRecord_2023-07-04-22-08-10.1.mp4 |
So ready for me to do a final test and review? |
Yes, please! |
Two small changes |
Otherwise, it works well |
✋ 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/pecanoro in version: 1.3.38-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.38-7 🚀
|
Details
Due to race condition, reverting usage of
InteractionManager
in Modal.which causes this regression #21833
Fixed Issues
$ #20516
PROPOSAL: #20516 (comment)
REGRESSION: #21833
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)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
Web
web.mov
Mobile Web - Chrome
mweb.chrome.mov
Mobile Web - Safari
mweb.safari.mov
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mp4