[TS migration] Migrate RoomMembersPage to typescript#34957
Conversation
| if (!member.accountID) { | ||
| return false; | ||
| } | ||
| return selectedMembers.includes(member.accountID); |
There was a problem hiding this comment.
Since you updated the logic (use accountID instead of keyForList), make sure the functionality works as expected.
There was a problem hiding this comment.
yep, keyForList is actually string created by String(accountId)
result.push({ keyForList: String(accountID),
so instead of doing Number(keyForList) I'm doing accountId
Made sure everything works as expected 😃
|
@mananjadhav 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] |
|
I’ll review this in an hour. |
|
@mananjadhav quick reminder 😃 |
|
Reviewing this at the moment. |
| if (report) { | ||
| Report.openRoomMembersPage(report.reportID); | ||
| } | ||
| setDidLoadRoomMembers(true); |
There was a problem hiding this comment.
Should we setting this true even if report is not set?
| const inviteUser = () => { | ||
| setSearchValue(''); | ||
| Navigation.navigate(ROUTES.ROOM_INVITE.getRoute(props.report.reportID)); | ||
| if (report) { |
There was a problem hiding this comment.
Same here as well? Also do we have any case where report will not be defined?
| isSelected: selectedMembers.includes(accountID), | ||
| isDisabled: accountID === session?.accountID, | ||
| text: formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details)), | ||
| alternateText: details.login ? formatPhoneNumber(details.login) : '', |
There was a problem hiding this comment.
Do we need this check? I can see formatPhoneNumber accepts undefined.
| isDisabled: accountID === session?.accountID, | ||
| text: formatPhoneNumber(PersonalDetailsUtils.getDisplayNameOrDefault(details)), | ||
| alternateText: details.login ? formatPhoneNumber(details.login) : '', | ||
| icons: details.login |
There was a problem hiding this comment.
I am trying to make out if this has an odd impact because of this change? I can see earlier we would still have source and type if details.login not set.
| subtitleKey={isEmptyObject(report) ? undefined : 'roomMembersPage.notAuthorized'} | ||
| onBackButtonPress={() => { | ||
| if (!report) { | ||
| return; |
There was a problem hiding this comment.
Instead of return should we just call goBack as fallback?
| setSearchValue(''); | ||
| Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(props.report.reportID)); | ||
| if (!report) { | ||
| return; |
There was a problem hiding this comment.
Same here? should we goBack?
|
@mananjadhav just fixed the comments! |
529dc85 to
d7c8fb4
Compare
|
Thanks the code changes look good but we've got conflicts. Can you please resolve them? |
|
@mananjadhav I've just resolved |
|
Thanks, working on the checklist now. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-room-members.movAndroid: mWeb Chromemweb-chrome-room-members.moviOS: Nativeios-room-members.moviOS: mWeb Safarimweb-safari-room-members.movMacOS: Chrome / Safariweb-room-members_oUWGv6fx.mp4MacOS: Desktopdesktop-room-members.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #31995 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
Approved again so that @lakchote is assigned to the PR. |
|
@SzymczakJ Can we please resolve conflicts? |
|
@mananjadhav solved conflicts for good. I hope... 😄 |
|
Thanks @SzymczakJ. Did Sanity on web again. @lakchote All yours. |
|
@lakchote quick reminder 😄 |
|
✋ 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/lakchote in version: 1.4.43-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.43-20 🚀
|
Details
Fixed Issues
$ #31995
PROPOSAL: N/A
Tests
Offline tests
QA Steps
Same as tests
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.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
Android: Native
android.mov
Android: mWeb Chrome
androidweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov