-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Show reply in thread for IOU and Task. #24412
Conversation
@situchan PR is ready for review, please have a look. Ty 😄 |
type === CONTEXT_MENU_TYPES.REPORT_ACTION && | ||
((reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID)) || | ||
reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW || | ||
reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU), |
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 don't write a util function here because we're using ReportUtils
in our condition, if I move this to util function of ReportActionsUtils
it will cause the dependency cycle.
@@ -120,7 +120,11 @@ export default [ | |||
successTextTranslateKey: '', | |||
successIcon: null, | |||
shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => | |||
type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID), | |||
type === CONTEXT_MENU_TYPES.REPORT_ACTION && | |||
!ReportActionUtils.isSplitBillAction(reportAction) && |
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.
Because we're showing the detail page when clicking on Split IOU, we shouldn't show the thread for split IOU as well.
Bump @situchan |
Reviewer Checklist
Screenshots/VideosWebweb1.movweb2.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.movDesktopdesktop.moviOSios.movAndroid |
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
((reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID)) || | ||
reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW || | ||
(reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionUtils.isSplitBillAction(reportAction))), |
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.
Can we split this into a separate bool to make it easier to read please
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.
Sure
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.
Updated @Julesssss !
const isNormalAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); | ||
const isPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; | ||
const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionUtils.isSplitBillAction(reportAction); | ||
return type === CONTEXT_MENU_TYPES.REPORT_ACTION && (isNormalAction || isPreviewAction || isIOUAction); |
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 (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) return earlier
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.
isNormalAction -> isCommentAction
isPreviewAction -> isReportPreviewAction (as task preview is also preview)
type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID), | ||
shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => { | ||
if (type !== CONTEXT_MENU_TYPES.REPORT_ACTION) { | ||
return; |
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.
return; | |
return false; |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
b165148
to
7e2e668
Compare
@hungvu193 what happened with signature? @benjaminbennet is this your account? |
I've just borrowed my friend laptop to commit because my laptop was broken 🤦 , brb in couple of minutes. |
Should be working now. Hmm, not sure why, my laptop was hang when I tried to run npm 🤦 , sorry for this inconvenience @situchan |
add condition for split bill action makes iou repliable, sign commit. add condition for split bill action Update src/pages/home/report/ContextMenu/ContextMenuActions.js Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com> optimize variable name update sign commit, var name and early return sign commit email
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
@Julesssss 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.
Nice, 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/Julesssss in version: 1.3.55-0 🚀
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.56-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); | ||
const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; | ||
const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionUtils.isSplitBillAction(reportAction); | ||
return isCommentAction || isReportPreviewAction || isIOUAction; |
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.
Coming from #29342, "paid elsewhere" message had a "reply in thread message"
We resolved this by moving ReportUtils.isThreadFirstChat
- const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID);
+ const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT;
- return isCommentAction || isReportPreviewAction || isIOUAction;
+ return (isCommentAction || isReportPreviewAction || isIOUAction) && !ReportUtils.isThreadFirstChat(reportAction, reportID);
Details
Show reply in thread for IOU and Task.
Fixed Issues
$ #23377
PROPOSAL: #23377 (comment)
Tests
From...
in header to go to parent report.Offline tests
Same as Tests.
QA Steps
From...
in header to go to parent report.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
Screen.Recording.2023-08-11.at.17.14.19.mov
Mobile Web - Chrome
crhome.mov
Mobile Web - Safari
safa.mov
Desktop
Screen.Recording.2023-08-11.at.17.14.19.mov
iOS
Screen.Recording.2023-08-11.at.17.46.57.mov
Android
trim.mov
Screen.Recording.2023-08-11.at.18.01.38.mov