Disable thread in archived room - #38251
Conversation
|
@akinwale PR ready for your review 👍 |
|
It looks like this PR will also fix this issue. See this comment for details. I edited the PR description to include this issue in the list of issues that will be fixed by this PR. Happy coding! 🧑💻 |
| * - The action is the thread's first chat | ||
| */ | ||
| function shouldDisableThread(reportAction: OnyxEntry<ReportAction>, reportID: string): boolean { | ||
| function shouldDisableThread(reportAction: OnyxEntry<ReportAction>, reportID: string, isArchivedReport = false): boolean { |
There was a problem hiding this comment.
You don't need to add a new method parameter for isArchivedReport. You can check if the report is archived in the shouldDisableThread method using the following code:
+const report = getReport(reportID);
+const isArchivedReport = isArchivedRoom(report);There was a problem hiding this comment.
Initially I intended to do as your above suggestions but I spotted in ContextMenuAction, we already handle the isArchivedRoom check outside so I don't want to do the extra redundant work again
App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Lines 193 to 198 in aca0f8c
But I can update according to what you prefer anw.
There was a problem hiding this comment.
Since it's a utility method, let's keep it self-contained. You will also notice that the getReport method is used by other methods in the file.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb Chrome38251-android-chrome.mp4iOS: Native38251-ios-native.mp4iOS: mWeb Safari38251-ios-safari.mp4MacOS: Chrome / Safari38251-web.mp4MacOS: Desktop38251-desktop.mp4 |
|
@blimpich Waiting for your feedback. |
|
Oh Ben was OOO. Let me ask on Slack if any one can help approving this. |
roryabraham
left a comment
There was a problem hiding this comment.
LGTM, approving and merging since @blimpich is OOO. I do wonder if archiving a room should archive all child threads as well, but it seems like that could be a separate concern
|
Reassure is failing on SignInPage, which is most certainly unaffected by these changes. going to ignore and merge 🚀 |
|
@roryabraham looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
Disable reply in thread with messages in an archived room and have no reply.
Fixed Issues
$ #37551
$ #38183
PROPOSAL: #37551 (comment)
Tests
#announceroom#announceroom from step 2Reply in threadoption shows#announceroom aboveReply in threadoption does not showOffline tests
Same as Tests
QA Steps
#announceroom#announceroom from step 2Reply in threadoption shows#announceroom aboveReply in threadoption does not showPR 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.Screenshots/Videos
Android: Native
Screen.Recording.2024-03-14.at.02.22.45-compressed.mov
Android: mWeb Chrome
Screen.Recording.2024-03-14.at.02.24.07-compressed.mov
iOS: Native
Screen.Recording.2024-03-14.at.02.16.36-compressed.mov
iOS: mWeb Safari
Screen.Recording.2024-03-14.at.02.18.56-compressed.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-14.at.02.17.05-compressed.mov
Offline
Screen.Recording.2024-03-14.at.02.25.31-compressed.mov
MacOS: Desktop
Screen.Recording.2024-03-14.at.02.19.45-compressed.mov