-
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
Remove Mandatory Description field on edit task #19749
Conversation
@joelbettner @fedirjh 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] |
888ab54
to
ff5f9c1
Compare
Reviewer Checklist
Screenshots/VideosWeb1Web.movMobile Web - Chrome2Chrome.movMobile Web - Safari3Safari.movDesktop4Desktop.moviOS5IOS.movAndroidAndroid.mov |
@fedirjh are we waiting for some input or its just PR Reviewer checklist is missing? |
@dhairyasenjaliya All good , I was waiting for @joelbettner feedback’s on #19749 (comment) |
friendly bump for the review @joelbettner |
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 addition requested.
@joelbettner added comment as per suggestion |
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
Co-authored-by: Fedi Rajhi <[email protected]>
@fedirjh done I guess again you need to approve PR |
✋ 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/joelbettner in version: 1.3.24-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
@@ -325,7 +325,7 @@ function editTaskAndNavigate(report, ownerEmail, title, description, assignee) { | |||
key: `${ONYXKEYS.COLLECTION.REPORT}${report.reportID}`, | |||
value: { | |||
reportName, | |||
description: (description || report.description).trim(), | |||
description: description.trim(), |
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.
@dhairyasenjaliya @fedirjh This change makes a regression, that is after editing the title of task, description is empty briefly, see more detail here https://expensify.slack.com/archives/C049HHMV9SM/p1686020401378739
@@ -380,7 +380,7 @@ function editTaskAndNavigate(report, ownerEmail, title, description, assignee) { | |||
{ | |||
taskReportID: report.reportID, | |||
title: reportName, | |||
description: (description || report.description).trim(), | |||
description: description.trim(), |
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 change makes description is updated to empty when you edit the title of the task
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.
With this change in this PR, I think we should call editTaskAndNavigate
when update title of task in here with description is the current description of the report instead empty description
App/src/pages/tasks/TaskTitlePage.js
Line 62 in 82ce35f
TaskUtils.editTaskAndNavigate(props.task.report, props.session.email, values.title, '', ''); |
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.
@dukenv0307 One simple fix for the issue is to pass description from props.task
as below :
TaskUtils.editTaskAndNavigate(
props.task.report,
props.session.email,
values.title,
props.task.description,
props.task.managerEmail
);
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.
nope. this will likely cause another regression since we are using the same edit for changing the assignee
what I suggest is to add a new parameter isDescriptionPage
for the description something like the below and add true on the description page since we are allowing empty value as well
function editTaskAndNavigate(report, ownerEmail, title, description, assignee, isDescriptionPage = false) {
value: {
reportName,
description: (isDescriptionPage ? description : report.description).trim(),
managerEmail: assignee || report.managerEmail,
},
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.
nope. this will likely cause another regression since we are using the same edit for changing the assignee
@dhairyasenjaliya Hmmm how will that cause regression ? If we update other instances , it should be fine , we have access to props.task
on all tasks forms
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.
@dukenv0307 One simple fix for the issue is to pass description from props.task as below
@fedirjh yes, I recommended it here #19749 (comment)
nope. this will likely cause another regression since we are using the same edit for changing the assignee
@dhairyasenjaliya I don't think we need to add a new parameter for this function. I think we only need to add the correct description when we edit anything of task that doesn't description field.
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.
yeah agree but let's say we have an empty description on edit then it will rely on props.task. description
which has an old value then it will set the old value rather than empty, so what I think we need to make a way for the description field that it checks if we are coming from the description page then only we truly set those new value it maybe old, empty or new text
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 wait till the GH ticket is created
Details
Fixed Issues
$ #19022
PROPOSAL: #19022 (comment)
Tests
Offline tests
Same as above
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
web.mov
Mobile Web - Chrome
mweb-chrome.mov
Mobile Web - Safari
mobile-safari.mp4
Desktop
desktop_dQ2omOhh.mp4
iOS
ios.mp4
Android
android.mov