-
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
feat: task view with offline with feedback #23705
Conversation
Reviewer Checklist
Screenshots/VideosWeb23705.Web.mp4Mobile Web - Chrome23705.mWeb-Chrome.mp4Mobile Web - Safari23705.mWeb-Safari.mp4Desktop23705.Desktop.mp4iOS23705.iOS.mp4Android23705.Android.mp4 |
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.
Looking pretty good, but I want to make sure we handle the error case well too. Please feel free to DM me on NewDot if you have questions.
@neil-marcellini Done with your requested changes. Here's how its working now: Screen.Recording.2023-07-28.at.6.30.39.AM.mov |
@allroundexperts Should the updated field be reverted after dismissing the RBR? I see in your video above the title is not reverted. |
It should be reverted as soon as the failure data arrives IMO. In video, I'm manually setting Onyx data while being offline so the failure response from backend never arrives. |
src/libs/actions/Task.js
Outdated
* | ||
* @param {Object} report | ||
*/ | ||
function clearEditTaskErrors(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.
NAB: Let's pass only what we need, which is the reportID.
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!
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.
Looking great. The only thing is that I think we should move the error above the line separating the task from the comments. I'll get some design feedback too.
src/libs/actions/Task.js
Outdated
@@ -756,6 +751,18 @@ function isTaskAssigneeOrTaskOwner(taskReport, sessionAccountID) { | |||
return sessionAccountID === getTaskOwnerAccountID(taskReport) || sessionAccountID === getTaskAssigneeAccountID(taskReport); | |||
} | |||
|
|||
/** | |||
* Clears any possible stored errors for a specific field on a task 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.
NAB: More simply; "Clear errors from editing a task".
Actually, we don't need a description at all. It's quite simple.
App/contributingGuides/STYLE.md
Line 170 in a30f549
- Avoid descriptions that don't add any additional information. Method descriptions should only be added when it's behavior is unclear. |
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!
I prefer this option for displaying the error that Sibtain showed. @shawnborton do you agree? |
Works for me! |
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.
Other than that the code looks good
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!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@neil-marcellini Is this eligible for bonus? Asking because you were OoO and this had some added scope as well. |
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.3.50-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.50-3 🚀
|
🚀 Deployed to staging by https://github.com/neil-marcellini in version: 1.3.51-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀
|
/> | ||
</OfflineWithFeedback> | ||
) : ( | ||
<MenuItemWithTopDescription |
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 #35196, we should have wrapped MenuItemWithTopDescription
with the OfflineWithFeedback
to support the offline mode. In offline mode, tasks created without an assignee will not have offline feedback.
Details
This PR adds
OfflineWithFeedback
component to theTaskView
when the title / description or the assignee is changed. This PR does not cover the offline completion of the report.Fixed Issues
$ #23200
PROPOSAL: #23200 (comment)
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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-07-27.at.6.21.31.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-07-27.at.6.32.53.AM.mov
Mobile Web - Safari
Screen.Recording.2023-07-27.at.6.30.14.AM.mov
Desktop
Screen.Recording.2023-07-27.at.6.27.01.AM.mov
iOS
Screen.Recording.2023-07-27.at.6.38.14.AM.mov
Android
Screen.Recording.2023-07-27.at.6.36.07.AM.mov