fix: should not be able to set welcome message for threads created from policy room - #30676
Merged
Merged
Conversation
Contributor
Author
Contributor
Author
|
@situchan Friendly bump. Please help review the PR |
Contributor
Author
|
@situchan Friendly bump. Please help review this PR |
situchan
suggested changes
Nov 12, 2023
| return room; | ||
| } | ||
| /** | ||
| * We want policy owners and admins to be able to modify the welcome message only when the report is not a thread chat |
Contributor
There was a problem hiding this comment.
Suggested change
| * We want policy owners and admins to be able to modify the welcome message only when the report is not a thread chat | |
| * We only want policy owners and admins to be able to modify the welcome message, but not in thread chat. |
| * @return {Boolean} | ||
| */ | ||
| function checkShouldDisableWelcomeMessage(report, policy) { | ||
| return isMoneyRequestReport(report) || isArchivedRoom(report) || !isChatRoom(report) || _.isEmpty(policy) || policy.role !== CONST.POLICY.ROLE.ADMIN || isChatThread(report); |
Contributor
There was a problem hiding this comment.
Suggested change
| return isMoneyRequestReport(report) || isArchivedRoom(report) || !isChatRoom(report) || _.isEmpty(policy) || policy.role !== CONST.POLICY.ROLE.ADMIN || isChatThread(report); | |
| return isMoneyRequestReport(report) || isArchivedRoom(report) || !isChatRoom(report) || isChatThread(report) || !PolicyUtils.isPolicyAdmin(policy); |
| * @param {Object} policy | ||
| * @return {Boolean} | ||
| */ | ||
| function checkShouldDisableWelcomeMessage(report, policy) { |
Contributor
There was a problem hiding this comment.
rename to shouldDisableWelcomeMessage
Contributor
|
Please pull main when ready for next review |
situchan
reviewed
Nov 12, 2023
| testID={ReportWelcomeMessagePage.displayName} | ||
| > | ||
| <FullPageNotFoundView shouldShow={!PolicyUtils.isPolicyAdmin(props.policy)}> | ||
| <FullPageNotFoundView shouldShow={!PolicyUtils.isPolicyAdmin(props.policy) || ReportUtils.checkShouldDisableWelcomeMessage(props.report, props.policy)}> |
Contributor
There was a problem hiding this comment.
Suggested change
| <FullPageNotFoundView shouldShow={!PolicyUtils.isPolicyAdmin(props.policy) || ReportUtils.checkShouldDisableWelcomeMessage(props.report, props.policy)}> | |
| <FullPageNotFoundView shouldShow={ReportUtils.checkShouldDisableWelcomeMessage(props.report, props.policy)}> |
Contributor
Author
|
@situchan Updated. Please help review again |
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb1.movweb2.movMacOS: Desktopdesktop.mov |
Contributor
|
@dukenv0307 please pull main to fix author checklist failure |
situchan
approved these changes
Nov 15, 2023
Contributor
Author
|
Updated. |
chiragsalian
approved these changes
Nov 15, 2023
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
37 tasks
6 tasks
Contributor
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.0-3 🚀
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Fixed Issues
$ #29454
PROPOSAL: #29454 (comment)
Tests
/welcomeMessageOffline tests
QA Steps
/welcomeMessagePR 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 */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
Android: Native
android-resize.mov
Android: mWeb Chrome
chrome-resize.mov
iOS: Native
ios-resize.mov
iOS: mWeb Safari
safari-resize.mov
MacOS: Chrome / Safari
web-resize.mov
MacOS: Desktop
desktop-resize.mov