[No QA]Enable an experimental Onyx mode for Guides on login#22902
Conversation
|
@Santhosh-Sellavel 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] |
|
|
||
| const setEnableMemoryOnlyKeys = () => { | ||
| if (!window) { | ||
| return; |
There was a problem hiding this comment.
Should we add a log line here to confirm that we didn't go out through this early return?
There was a problem hiding this comment.
I thought that window would not be defined on native platforms, but is seems like it is? So maybe this check isn't even required.
There was a problem hiding this comment.
I think JS is running on all platforms. is using enableMemoryOnlyKeys going to break native?
There was a problem hiding this comment.
It doesn't seem to break native from my testing
| // If the user has entered a guide email, then we are going to enable an experimental Onyx mode to help with performance | ||
| if (PolicyUtils.isExpensifyGuideTeam(loginTrim)) { | ||
| Log.info('Detected guide email in login field, setting memory only keys.'); | ||
| setEnableMemoryOnlyKeys(); |
There was a problem hiding this comment.
Do you know if it could cause a problem to call window.enableMemoryOnlyKeys() twice? I'm thinking about if the login fails and then the guide tries again.
There was a problem hiding this comment.
I do not think so from reading the code
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
[No QA]Enable an experimental Onyx mode for Guides on login (cherry picked from commit 60e73fa)
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 1.3.41-1 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.41-3 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.41-3 🚀
|
Details
This change enables and calls
window.enableMemoryOnlyKeys();for any guide email while logging in.Fixed Issues
Related #21766
Tests
Detected guide email in login field, setting memory only keysDetected guide email in login field, setting memory only keysOffline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android