Hide reports with error from task share somewhere list#24506
Conversation
|
@aimane-chnaif 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] |
|
Jest unit tests are failing on multiple PRs, I will try to find out what broke the tests but it is not related to this PR since they are failing on PRs before this one. @arosiclair @aimane-chnaif as per your feedback -
I have renamed the function to /**
* Returns true if write actions like assign task, money request, send message should be disabled on a report
* @param {Object} report
* @returns {Boolean}
*/
function shouldDisableWriteActions(report) {
const reportErrors = getAddWorkspaceRoomOrChatReportErrors(report);
return isArchivedRoom(report) || !_.isEmpty(reportErrors) || !isAllowedToComment(report) || isAnonymousUser;
}What do you think? Do you have any other alternatives? |
|
@Nikhil-Vats don't care about unit tests. It was reported here. |
|
Hey team, do you mind pulling from |
|
Thanks @PauloGasparSv . I will do that. |
|
Hey @aimane-chnaif, I have merged the latest main and all checks are passing now. PR is ready for review. |
|
@Nikhil-Vats please fix conflict |
|
Done @aimane-chnaif |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
| * @returns {Boolean} | ||
| */ | ||
| function shouldHideComposer(report) { | ||
| function shouldDisableWriteActions(report) { |
There was a problem hiding this comment.
I am not against this naming. But will defer to @arosiclair
arosiclair
left a comment
There was a problem hiding this comment.
Looks good just remove those comments about the hiding composer since they aren't needed anymore
| @@ -156,7 +156,7 @@ class ReportScreen extends React.Component { | |||
|
|
|||
| componentDidUpdate(prevProps) { | |||
| // If composer should be hidden, hide emoji picker as well | |||
There was a problem hiding this comment.
| // If composer should be hidden, hide emoji picker as well |
| @@ -257,7 +257,7 @@ function getOptionData(report, reportActions, personalDetails, preferredLocale, | |||
| result.notificationPreference = report.notificationPreference || null; | |||
|
|
|||
| // If the composer is hidden then the user is not allowed to comment, same can be used to hide the draft icon. | |||
There was a problem hiding this comment.
| // If the composer is hidden then the user is not allowed to comment, same can be used to hide the draft icon. |
|
Done @arosiclair. |
|
@arosiclair 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. |
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.3.55-0 🚀
|
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.3.56-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
Details
Hides report that couldn't be created on backend from share destination list for tasks.
Fixed Issues
$ #23361
PROPOSAL: #23361 (comment)
Tests
a@_.ab. Press enter.a@_.abis not in the list of contacts shown.Offline tests
Same as above.
QA Steps
Same as above.
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)/** 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)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
Web
23361_web.mov
Mobile Web - Chrome
23361_mweb_chrome.mov
Mobile Web - Safari
23361_mweb_safari.mov
Desktop
23361_desktop.mov
iOS
23361_ios.mov
Android
23361_android.mov