[Group Chats] Add remaining features#39757
Conversation
Update the Group Chat creation flow UI and Details page
…Ensure reportName shows correctly everywhere.
… Leave Group Chat flow
|
Definitely will need to be cleaning this up and there is guaranteed 1 million typescript errors. But I think most of the functionality is working. 😄 I wired up the API commands and fixing some style issues from the first PR. There are still both style and code issues that need to be addressed. @waterim did a great job of setting up the UI stuff. |
|
(I need to check this later) The chat draft not being used Screen.Recording.2024-04-06.at.6.18.13.PM.mov |
|
Custom avatar not taken into consideration on new chat creation Screen.Recording.2024-04-06.at.6.23.11.PM.mov |
|
Gonna merge this one so we can get started on the polish and follow up issues. There's a good amount of work left to do, but feels like this is in a good state for internal testing and feedback. This also probably won't get onto staging until Monday. Thanks for all the reviews! |
|
✋ 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/marcaaron in version: 1.4.63-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
|
This PR is failing because of issue #43212 Bug6504171_1717693912593.2024-06-06_19-09-07.mp4 |
| return; | ||
| } | ||
|
|
||
| Report.leaveGroupChat(report.reportID); |
There was a problem hiding this comment.
When we leave a group chat we replace the current screen with the most recent report so the group chat is no longer in stack. However in this case the function is called from a RHP screen.
If the stack is as follow:
report 1 -> report 1 details page
and we leave the group, the stack will be:
report 1 -> report 2
report 1 can still be accessed by going back (bug).
To fix this we opted to dismiss any RHP modal before proceeding
(From #44152)
| > | ||
| <HeaderWithBackButton | ||
| title={translate('groupConfirmPage.groupName')} | ||
| onBackButtonPress={() => Navigation.goBack(isUpdatingExistingReport ? ROUTES.REPORT_SETTINGS.getRoute(reportID) : ROUTES.NEW_CHAT_CONFIRM)} |
There was a problem hiding this comment.
Hey folks👋
This has caused #45812, essentially, you vere navigated back to the wrong page after refreshing GroupChatNameEditPage. This was resolved by using ROUTES.REPORT_WITH_ID_DETAILS instead of ROUTES.REPORT_SETTINGS
| navigateToMostRecentReport(report); | ||
| API.write(WRITE_COMMANDS.LEAVE_GROUP_CHAT, {reportID}, {optimisticData}); |
There was a problem hiding this comment.
Optimistic changes take effect before navigation is done causing the not found page to show up briefly which caused mWeb - Group chat - Not here page appears briefly when last member leave the group chat
| parameters.file = avatar; | ||
| } | ||
|
|
||
| clearGroupChat(); |
There was a problem hiding this comment.
This call is found to be done too early making the UI unexpectedly empty #57021. FWIW This was not a bug at the time of writing, it must be some onyx change that made the onyx execution happen too fast before navigation.




Details
Holding on...
Fixed Issues
$ #34927
Tests
Offline tests
Offline adding Group Chat member(s)
Offline remove Group Chat member(s)
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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./** 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)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
2024-04-09_19-00-50.mp4
MacOS: Desktop
Follow up issues
UpdateGroupChatAvatar#39983UpdateGroupChatName#39984removeFromRoomandremoveFromGroupChat. Implement offline behavior. #39985