Create Task FrontEnd Changes#17992
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
thienlnam
left a comment
There was a problem hiding this comment.
It's really coming together 🎉
There was a problem hiding this comment.
Reminder for me to get translations for this, we have some certain terminology we are trying to keep consistent
There was a problem hiding this comment.
@thienlnam I posted in open-source to get someone to check translations. Someone asked for the En/Es versions and I provided them but I haven't heard anything else about it.
0e1bd1f to
3560b3a
Compare
thienlnam
left a comment
There was a problem hiding this comment.
Left this initial comment first, but taking a look at the onyx data next
|
Optimistically: |
|
I have read the CLA Document and I hereby sign the CLA |
3285c82 to
f166357
Compare
f166357 to
7e1df15
Compare
thienlnam
left a comment
There was a problem hiding this comment.
Couple parameters to update to match with backend
There was a problem hiding this comment.
Nice catch! We want to leave the option for a task to be created without an assignee, only title and share destination are required. I've changed to logic to check to make sure there is an assignee before fetching the DM chat report with that assignee.
417e60f to
ee50e02
Compare
fedirjh
left a comment
There was a problem hiding this comment.
CreateTask command is still failing, there is some missing parameters
| if (option.alternateText) { | ||
| // Clear out the state value, set the assignee and navigate back to the NewTaskPage | ||
| setSearchValue(''); | ||
| TaskUtils.setAssigneeValue(option.alternateText, props.task.shareDestination); |
There was a problem hiding this comment.
Coming from #18649:
We should have used option.login instead of option.alternateText for phone number accounts.
Here's the root cause: #18649 (comment)
|
This issue was not addressed in this PR. We accepted white spaces as task description. |
|
This issue was not address in this PR. Issue: Error appears for a second when user select new member as Assignee |
| disabled: false, | ||
| }; | ||
|
|
||
| const TaskSelectorLink = (props) => { |
There was a problem hiding this comment.
This component was not clipping text appropriately for longer text which caused #18659
| { | ||
| onyxMethod: Onyx.METHOD.SET, | ||
| key: `${ONYXKEYS.COLLECTION.REPORT}${optimisticTaskReport.reportID}`, | ||
| value: optimisticTaskReport, |
There was a problem hiding this comment.
Coming from #19134:
This should always be added in optimisticData when build new report, so that they show with opacity when created offline.
pendingFields: {
createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
},
| // the response | ||
| function onSubmit() { | ||
| if (!props.task.title || !props.task.shareDestination) { | ||
| setSubmitError(true); |
There was a problem hiding this comment.
Coming from Assign Task - An incorrect error message is displayed when clicking confirm task:
This was overlooked. As confirmError error is set as initial state value, Please enter a title and select a share destination message is always displayed even though title is already filled.
| } | ||
|
|
||
| // Create the CreatedReportAction on the task | ||
| const optimisticTaskCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(optimisticTaskReport.reportID); |
There was a problem hiding this comment.
Fyi looks like we probably meant to pass ownerEmail in the param, not reportID :D
|
Coming from #21361. We were getting error after adding the title and moving to the next step. Info: #21361 (comment) |
| <Form | ||
| formID={ONYXKEYS.FORMS.NEW_TASK_FORM} | ||
| submitButtonText={props.translate('common.next')} | ||
| style={[styles.mh5, styles.mt5, styles.flexGrow1]} |
There was a problem hiding this comment.
Coming from #21754, We have extra padding (styles.mt5) in all create task forms.
|
Coming from here #22060. We missed to clear the pending action onyx state after API success #22060 (comment) |
| onBackButtonPress={() => Navigation.goBack()} | ||
| /> | ||
| <View style={[styles.flex1, styles.w100, styles.pRelative]}> | ||
| <OptionsSelector |
There was a problem hiding this comment.
Hi all, this PR caused issue #20075
The asignee selection list can take a long time to filter. So we should have debounced search when implementing OptionsSelector (like done in this PR)
|
This case was missed while implementing New Task Page. Issue: Web - UserB can still create a task in room chat when UserA changes post permission to "Admins only" |
| }); | ||
| } | ||
|
|
||
| const successData = []; |
There was a problem hiding this comment.
This caused a regression. The successData array is empty but we should be clearing the pendingActions. (Coming from #22907)
|
This issue was not handled in this PR. Issue: Assign Task - Workspace avatar shows 'U' |
| } | ||
|
|
||
| // Create the CreatedReportAction on the task | ||
| const optimisticTaskCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(optimisticTaskReport.reportID); |
There was a problem hiding this comment.
Coming from No activity yet appears in task item of search RHN.
We should have updated getLastMessageTextForReport() to show the task details in LHN description.










Details
This sets up the UI and the necessary actions in order to Create a Task.
Fixed Issues
$ #16855
PROPOSAL: GH_LINK_ISSUE(COMMENT)
Tests
NOTE: The CreateTask AuthCommand is not currently deployed, so the online flow will not work as expected. However, the offline flow should work.
Assignee and Share Destination are Different
Assignee and Share Destination are the Same
Offline tests
Same as Online Tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Lower.Res.Web.Test.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
Low.Res.Desktop.Version.mov
iOS
Low.Res.IOS.Test.mov
Android
Low.Res.Android.Video.mov