fix: prevent lag when adding code block in task description#36819
fix: prevent lag when adding code block in task description#36819AndrewGable merged 5 commits intoExpensify:mainfrom
Conversation
|
Will have time to review this PR tomorrow. :) |
| const defaultDescriptionValue = useMemo(() => parser.htmlToMarkdown(parser.replace(taskDescription)), [taskDescription]); | ||
|
|
||
| useEffect(() => { | ||
| if (!isFocused) { |
There was a problem hiding this comment.
I don't think isFocused is necessary, because we have already solved the performance problem, and it would be fine if the description in the details page can be updated immediately when the user clicks the button on the description page, instead of waiting for isFocused to update. :)
c5477ab to
e100285
Compare
Reviewer Checklist
Screenshots/VideosAndroid: Native36819-android-native.mp4Android: mWeb Chrome36819-android-chrome.mp4iOS: Native36819-ios-native.mp4iOS: mWeb Safari36819-ios-safari.mp4MacOS: Chrome / Safari36819-web.mp4MacOS: Desktop36819-desktop.mp4 |
ntdiary
left a comment
There was a problem hiding this comment.
LGTM. BTW, the TypeScript and Actions check failures should not be related to the changes in this PR. :)
|
@AndrewGable Gentle Reminder |
|
✋ 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/AndrewGable in version: 1.4.45-0 🚀
|
|
FYI this was reverted. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.45-6 🚀
|
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.4.46-0 🚀
|
|
This PR is still failing with fixed issue #34324 in iOS. evidence attached. |
@kavimuru this PR was reverted so simply check off |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.46-2 🚀
|
Details
This PR fixes an issue where the app navigation was lagging while entering a code block to task description input and then navigating to next page. Page was utilising
parser.replacemethod from expensify-commons which caused catastrophic backtracking while parsing urls in entered text. This caused JS thread to get blocked on native devices, resulting in degraded performance.Fixed Issues
$ #34324
PROPOSAL: #34324 (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_out.mp4
Android: mWeb Chrome
android-mweb_out.mp4
iOS: Native
ios_out.mp4
iOS: mWeb Safari
ios-web_out.mp4
MacOS: Chrome / Safari
web_out.mp4
MacOS: Desktop
desktop_out.mp4