-
Notifications
You must be signed in to change notification settings - Fork 3k
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
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
@@ -615,6 +615,7 @@ function getOptions( | |||
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 |
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
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
@@ -5,6 +5,7 @@ import {View} from 'react-native'; | |||
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.
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 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
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