-
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
[TS migration] Migrate RoomMembersPage to typescript #34957
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you updated the logic (use accountID
instead of keyForList
), make sure the functionality works as expected.
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.
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 😃
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.
Minor comments, LGTM
@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. |
Report.openRoomMembersPage(props.report.reportID); | ||
if (report) { | ||
Report.openRoomMembersPage(report.reportID); | ||
} | ||
setDidLoadRoomMembers(true); |
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.
Should we setting this true even if report
is not set?
src/pages/RoomMembersPage.tsx
Outdated
@@ -95,71 +61,67 @@ function RoomMembersPage(props) { | |||
*/ | |||
const inviteUser = () => { | |||
setSearchValue(''); | |||
Navigation.navigate(ROUTES.ROOM_INVITE.getRoute(props.report.reportID)); | |||
if (report) { |
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.
Same here as well? Also do we have any case where report
will not be defined?
src/pages/RoomMembersPage.tsx
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this check? I can see formatPhoneNumber
accepts undefined.
src/pages/RoomMembersPage.tsx
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
src/pages/RoomMembersPage.tsx
Outdated
subtitleKey={isEmptyObject(report) ? undefined : 'roomMembersPage.notAuthorized'} | ||
onBackButtonPress={() => { | ||
if (!report) { | ||
return; |
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.
Instead of return should we just call goBack as fallback?
src/pages/RoomMembersPage.tsx
Outdated
onBackButtonPress={() => { | ||
setSearchValue(''); | ||
Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(props.report.reportID)); | ||
if (!report) { | ||
return; |
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.
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 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
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