-
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
32864 md syntax create task #33428
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we could avoid repeating Report.addComment
?
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.
sure we just remove the elsewhere condition and return at Task.createTaskAndNavigate
, let me update now
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.
I have cleanup a condition to call Report.addComment
src/pages/home/ReportScreen.js
Outdated
/** | ||
* @param {String} text | ||
*/ | ||
const onSubmitComment = useCallback( | ||
(text) => { | ||
Report.addComment(getReportID(route), text); | ||
const isHandled = handleCreateTask(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.
const isHandled = handleCreateTask(text); | |
const isTaskCreated = handleCreateTask(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.
I have updated
@suneox Thanks for the updates! We have some conflicts that need to be resolved. |
I have resolved conflicts |
src/pages/home/ReportScreen.js
Outdated
/** | ||
* @param {String} text | ||
*/ | ||
const onSubmitComment = useCallback( | ||
(text) => { | ||
Report.addComment(getReportID(route), text); | ||
const isTaskCreated = handleCreateTask(text); | ||
if (!isTaskCreated) { |
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.
I think we can have an early return here now since the below code was removed.
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.
i have updated
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
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