[No QA] [TS migration] Migrate 'Link.js' lib to TypeScript#28257
Conversation
|
|
||
| const params = _.compact([authTokenParam, emailParam]).join('&'); | ||
| const paramsArray = [authTokenParam, emailParam]; | ||
| const params = paramsArray.filter(Boolean).join('&'); |
There was a problem hiding this comment.
i love this pattern, congrats @kubabutkiewicz 🔥
| }); | ||
|
|
||
| let currentUserEmail; | ||
| let currentUserEmail: string; |
There was a problem hiding this comment.
| let currentUserEmail: string; | |
| let currentUserEmail: string | undefined; |
I would be more safe if we specify that this variable can be undefined, because it's only populated in the callback of Onyx, so before that happens it's undefined and we should consider this possibility.
There was a problem hiding this comment.
Or if we only care about the string type, maybe we can default it to ''? Wdyt?
There was a problem hiding this comment.
It is an option too, @kubabutkiewicz We can change this one to:
let currentUserEmail = '';| @@ -10,29 +8,23 @@ import * as Url from '../Url'; | |||
| let isNetworkOffline = false; | |||
There was a problem hiding this comment.
| let isNetworkOffline = false; | |
| let isNetworkOffline: boolean | undefined = false; |
Same.
There was a problem hiding this comment.
actually here it would stay false before this callback fires 🤔
There was a problem hiding this comment.
You are right @adhorodyski! Sorry @kubabutkiewicz , but could you revert this one?
dangrous
left a comment
There was a problem hiding this comment.
One change (I think) and one clarification, looks good otherwise!
Can you also add some testing steps please just so I can double check? Thanks!
|
@dangrous Added testing steps , answered and make this one change :) |
dangrous
left a comment
There was a problem hiding this comment.
Cool, looks good! @fabioh8010 do you mind filling out the checklist so we can get this merged? Thank you!
|
@dangrous This one must be filled by SWM engineers as part of our cross-review strategy, they will review it soon. |
|
@dangrous Just so you know, TS process was changed recently and now C+ are responsible for the reviewer checklist. |
|
Got it, let me see if I can grab one for this! |
|
Hi @dangrous @aimane-chnaif are you able to review this and do reviewer check list? |
|
On it now. Was reviewing yesterday |
|
Code looks good. Can you update QA Steps like this?
|
| const paramsArray = [authTokenParam, emailParam]; | ||
| const params = paramsArray.filter(Boolean).join('&'); |
There was a problem hiding this comment.
NAB: I don't see the need of introducing new variable
| const paramsArray = [authTokenParam, emailParam]; | |
| const params = paramsArray.filter(Boolean).join('&'); | |
| const params = [authTokenParam, emailParam].filter(Boolean).join('&'); |
There was a problem hiding this comment.
bump, though not blocker
There was a problem hiding this comment.
for me it was looking more clear when did that, should I revert that?
Apply this to Test step as well. And add numbers 1. 2. 3. |
|
@aimane-chnaif can you look again? |
|
@aimane-chnaif Hi, are you able to look at this PR ? |
|
reviewing today |
|
@kubabutkiewicz I got lint error after pulling main
|
…s-migration/Link-lib
|
@aimane-chnaif PR updated |
|
@kubabutkiewicz please also fix lint |
|
@aimane-chnaif fixed. |
|
@aimane-chnaif do you have time to re-review today? |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
|
🎯 @aimane-chnaif, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #30783. |
dangrous
left a comment
There was a problem hiding this comment.
Just one comment - looks great otherwise!
| @@ -42,18 +34,11 @@ function buildOldDotURL(url, shortLivedAuthToken) { | |||
| }); | |||
| } | |||
|
|
|||
| /** | |||
| * @param {String} url | |||
| * @param {Boolean} shouldSkipCustomSafariLogic When true, we will use `Linking.openURL` even if the browser is Safari. | |||
There was a problem hiding this comment.
Can we leave this note in? It might be useful for the future!
|
✋ 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/dangrous in version: 1.3.96-6 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
|
🚀 Deployed to staging by https://github.com/dangrous in version: 1.3.98-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|


Details
Fixed Issues
$ 24912
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
android.mp4