-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Task Share Destination Fixes #24019
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
Task Share Destination Fixes #24019
Conversation
|
@situchan @thienlnam Seems like a test is designed to expect the wrong results from Do you want me to take a look and fix that test as well to work with are newly desired results? |
Yes please, we're changing the expected functionality so we'll need to update the test as well |
Roger that, on it now |
|
@situchan @thienlnam Also updated the test to match the new functionality |
src/libs/OptionsListUtils.js
Outdated
| includeThreads = false, | ||
| includeTasks = false, | ||
| includeMoneyRequests = false, | ||
| disallowNewChats = false, |
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.
Let's use exclude word to be consistent with others.
I suggest excludeUnknownUsers
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.
Agreed, changed it to your suggestion. Thanks!
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.
Thanks for the quick update. Also please pull main
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.
Thank you @situchan , done!
I pulled main before I made my PR, seems like a lot of stuff was merged afterwards
|
@Thanos30 please exclude archived workspaces |
|
Also, Concierge cannot be destination. The condition should be exactly same as Assign task option visibility in Composer App/src/pages/home/report/ReportActionCompose.js Lines 453 to 469 in 2f750ad
|
Got it, thank you! I added an extra condition on |
| (lodashGet(props.reports[reportKey], 'participantAccountIDs', []).length === 1 && | ||
| _.some(props.reports[reportKey].participantAccountIDs, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID))) |
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.
Make common function in ReportUtils similar to isConciergeChatReport and use it both here and ReportActionCompose.
We avoid duplicated code.
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.
Roger that
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.
@situchan Thank you for your feedback. Let me know what you think of the changes 🙏
src/libs/ReportUtils.js
Outdated
| * @returns {Boolean} | ||
| */ | ||
|
|
||
| function canShareTaskInReport(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.
This can be general function, not tied to task.
So let's rename it to isExpensifyChatReport
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.
Done, thanks 🙏
|
Last change: - ...this.getTaskOption(reportParticipants),
+ ...this.getTaskOption(), |
Whoops, sorry I missed that |
Reviewer Checklist
Screenshots/VideosWebweb1.movweb2.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
situchan
left a comment
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
@thienlnam all yours
thienlnam
left a comment
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.
Just a small comment, but rest is looking good!
Got it, fixing that in a minute |
|
@thienlnam Done, thanks! |
src/libs/ReportUtils.js
Outdated
| * @param {Object} report | ||
| * @returns {Boolean} | ||
| */ | ||
|
|
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.
Added space
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.
Removed, sorry
| import PropTypes from 'prop-types'; | ||
| import {withOnyx} from 'react-native-onyx'; | ||
| import OptionsSelector from '../../components/OptionsSelector'; | ||
|
|
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.
Another space added here
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.
@thienlnam sorry for the inconvenience, removed some code after the adjustments with the new functions. I thought npm run prettify would cover it. Done.
thienlnam
left a comment
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.
Great, thanks!
|
✋ 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/thienlnam in version: 1.3.51-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.52-0 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.52-5 🚀
|
|
Just coming from this issue where Here we filter Lines 483 to 486 in 0a7aabd
|

Details
Fixing Task Share Destination code to show only chats already available.
Fixed Issues
$ #20898
PROPOSAL: #20898 (comment)
Tests
Offline tests
QA Steps
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
Uploading Screen Recording 2023-08-01 at 8.28.31 PM.mov…
Mobile Web - Chrome
Screen.Recording.2023-08-01.at.8.34.12.PM.mov
Mobile Web - Safari
Screen.Recording.2023-08-01.at.8.34.12.PM.mov
Desktop
iOS
Screen.Recording.2023-08-01.at.8.48.16.PM.mov
Android
Screen.Recording.2023-08-01.at.9.01.06.PM.mov