-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Hide reports with error from task share somewhere list #24506
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 |
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.
LGTM 🎉
* @param {Object} report | ||
* @returns {Boolean} | ||
*/ | ||
function shouldHideComposer(report) { | ||
function shouldDisableWriteActions(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.
I am not against this naming. But will defer to @arosiclair
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.
Looks good just remove those comments about the hiding composer since they aren't needed anymore
src/pages/home/ReportScreen.js
Outdated
@@ -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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// If composer should be hidden, hide emoji picker as well |
src/libs/SidebarUtils.js
Outdated
@@ -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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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@_.ab
is not in the list of contacts shown.Offline tests
Same as above.
QA Steps
Same as above.
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
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