32864 md syntax create task#33428
Conversation
|
@thienlnam Do we also want this functionality for the edit message composer? |
|
Currently, a text message and a task are different types, and the API calls are also different so first we have to check the BE ability. |
We can skip this for now since it's more of an edge case that you would edit an existing message to add a task |
|
Just an observation: |
src/pages/home/ReportScreen.js
Outdated
| } | ||
| Task.createTaskAndNavigate(getReportID(route), title, '', assignee.login, assignee.accountID, assignee.assigneeChatReport, report.policyID); | ||
| } else { | ||
| Report.addComment(getReportID(route), text); |
There was a problem hiding this comment.
Is there a way we could avoid repeating Report.addComment?
There was a problem hiding this comment.
sure we just remove the elsewhere condition and return at Task.createTaskAndNavigate, let me update now
There was a problem hiding this comment.
I have cleanup a condition to call Report.addComment
src/pages/home/ReportScreen.js
Outdated
| const onSubmitComment = useCallback( | ||
| (text) => { | ||
| Report.addComment(getReportID(route), text); | ||
| const isHandled = handleCreateTask(text); |
There was a problem hiding this comment.
| const isHandled = handleCreateTask(text); | |
| const isTaskCreated = handleCreateTask(text); |
|
@suneox Thanks for the updates! We have some conflicts that need to be resolved. |
I have resolved conflicts |
src/pages/home/ReportScreen.js
Outdated
| (text) => { | ||
| Report.addComment(getReportID(route), text); | ||
| const isTaskCreated = handleCreateTask(text); | ||
| if (!isTaskCreated) { |
There was a problem hiding this comment.
I think we can have an early return here now since the below code was removed.
|
@suneox I've noticed that since that last conflict resultion, it doesn't scroll to the bottom when creating a task. Screen.Recording.2024-01-09.at.15.31.47.mov |
I think it's a regression from another ticket to remove the logic auto scroll to the bottom because currently it also happens when creating a task from the composer action Screen.Recording.2024-01-09.at.22.56.49.mov |
|
Yeah seems out of scope here, just thought I'd bring it up. |
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.mp4 |
There was a problem hiding this comment.
LGTM.
Let me know if you disagree with #33428 (comment) @thienlnam
|
Looks good thanks!
Yeah this is not a bad idea - though let's try this out in the wild first and see what the responses are. I think it's still possible we might have people using @ in task titles so we don't want to rule that out yet |
|
✋ 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.4.24-0 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.24-3 🚀
|
Details
Fixed Issues
$ #32864
PROPOSAL: #32864 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.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
Android: Native
android-native.mp4
Android: mWeb Chrome
android-chrome.mp4
iOS: Native
ios-native.mp4
iOS: mWeb Safari
ios-safari.mp4
MacOS: Chrome / Safari
web-chrome.mp4
web-safafi.mp4
MacOS: Desktop
desktop.mp4