[No QA] [TS migration] Migrate 'SignInRedirect.js' lib to TypeScript - #28388
Conversation
|
|
||
| autoAuthState?: string; | ||
| /** Server side errors keyed by microtime */ | ||
| errors?: OnyxCommon.Errors; |
There was a problem hiding this comment.
maybe we can only import Errors from this common namespace?
There was a problem hiding this comment.
Everywhere we are are importing it as OnyxCommon.Errors so I would follow this pattern 😄
|
@Julesssss 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] |
|
Just so you know @Julesssss, TS process was changed recently and now C+ are responsible for the reviewer checklist. |
|
@Julesssss are you able to look again? |
|
@Julesssss are you able to do PR reviewer checklist or assign someone? |
|
Hey @s77rt, you were chosen by the bot for C+ review 👋 |
| Onyx.connect({ | ||
| key: ONYXKEYS.NETWORK, | ||
| callback: (network) => { |
There was a problem hiding this comment.
In the callback we are converting network.shouldForceOffline to Boolean. I don't think that's necessary. There is also an early return. Can we use optional chaining instead?
currentIsOffline = network?.isOffline;
currentShouldForceOffline = network?.shouldForceOffline;…s-migration/SignInRedirect-lib
|
@s77rt fixed 😄 |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - ChromeMobile Web - SafariDesktop |
|
✋ 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/Julesssss in version: 1.3.86-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.86-5 🚀
|
| Navigation.isNavigationReady().then(() => { | ||
| const routes = navigationRef.current && lodashGet(navigationRef.current.getState(), 'routes'); | ||
| const homeRoute = _.find(routes, (route) => route.name === SCREENS.HOME); | ||
| const routes = navigationRef.current?.getState().routes; |
There was a problem hiding this comment.
Coming from #45619, we should use optional chaining operator here to avoid accessing routes when nav state is null



Details
Migrate 'SignInRedirect.js' lib to TypeScript
Fixed Issues
$ 24913
PROPOSAL: N/A
Tests
Offline tests
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
web.mp4
Mobile Web - Chrome
Mobile Web - Safari
Desktop
desktop.mp4
iOS
ios.mp4
Android