-
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
CancelTask frontend #18747
CancelTask frontend #18747
Conversation
…siclair-cancel-task-action
@thienlnam I merged your completeTask branch to use the TaskAction component so your changes are gonna appear here until we get your PR merged. Holding until then |
Suggestions look good though I'm gonna wait for your PR to get finalized before putting them in just so that I don't have to resolve conflicts over and over. Ping me when that's ready! |
@fedirjh @marcaaron One of you needs to 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] |
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 , left few comment to address some bugs
|
||
// Implementing in https://github.com/Expensify/App/issues/16857 | ||
onSelected: () => {}, | ||
onSelected: () => Task.cancelTask(props.report.reportID, props.report.parentReportID, props.report.reportName, props.report.stateNum, props.report.statusNum), |
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.
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.
We decided to just hide this menu when the task is canceled
@@ -204,7 +204,7 @@ class ReportActionItem extends Component { | |||
checkIfContextMenuActive={this.checkIfContextMenuActive} | |||
/> | |||
); | |||
} else if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED) { | |||
} else if (this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED || this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.TASKCANCELED) { |
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.
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.
Checkbox should now be disabled when the task is canceled
Thanks for the review I'm taking these questions to slack internally to get some answers (convo) |
Looks like we're failing a lint but should be ready to test after that is fixed |
Oh, also #18747 (comment) as well - let us know when it's ready |
7b42786
to
c0377c4
Compare
Ready for another review! |
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 to me, I will create reviewer checklist shorlty
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-05-16.at.7.41.19.PM.movMobile Web - ChromeCtaskmChrome.movMobile Web - SafariIOS.Safari.movDesktopCTaskDesktop.moviOSCTaskIOS.movAndroidCTaskAndroid.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.
Looks great, thank you!
✋ 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.15-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.3.15-12 🚀
|
selector: (account) => | ||
account && { | ||
guideCalendarLink: account.guideCalendarLink, | ||
primaryLogin: account.primaryLogin, |
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.
Is there a reason why primaryLogin
is 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.
Not really sure might have just been added in a bad merge. If it isn't being used still I think it's fine to remove
@@ -463,6 +463,7 @@ const CONST = { | |||
CLOSED: 'CLOSED', | |||
CREATED: 'CREATED', | |||
TASKEDITED: 'TASKEDITED', | |||
TASKCANCELED: 'TASKCANCELED', |
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.
beep boop 🤖 🐧
This PR caused #21314 (comment)
Because we have a typo-ish here.
The backend uses TASKCANCELLED
(notice the double LL)
Details
Adds action for cancelling a task
Fixed Issues
$ #16857
Tests
Offline tests
Same as Tests but go offline after Step 1
QA Steps
Same as tests
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
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android