-
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
Bump react-native-live-markdown (use worklets) #53627
base: main
Are you sure you want to change the base?
Bump react-native-live-markdown (use worklets) #53627
Conversation
…loose-url-website-regex
…loose-url-website-regex
Reviewer Checklist
Screenshots/VideosAndroid: Native53627-android-native.mp4Android: mWeb Chrome53627-android-chrome.mp4iOS: Native53627-ios-native.mp4iOS: mWeb Safari53627-ios-safari.mp4MacOS: Chrome / Safari53627-mac-chrome.mp4MacOS: Desktop53627-mac-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.
@s77rt you can now bump reanimated
to 3.16.4 and we will no longer need the patch for 3.16.3, as this fix was released in 3.16.4 (https://github.com/software-mansion/react-native-reanimated/pull/6796/files#diff-f90ca94b2ac6e8ee3db468e6084e525e4930ce4f487a3cf55386155c304a6138R292)
If we bump it, we can drop the patch.
Also there were several versions of live-markdown
released over the past 2 days, and a lot of small bugs were fixed there.
Do you mind bumping live-markdown
to 0.1.204 0.1.205
?
To my knowledge it will not require you to do any changes in the code, and we need some QA to test this bump anyways, so might as well bump to newest.
If it adds any extra work (something breaks) then I will handle this in my PR.
Hi, @s77rt, could you please confirm whether it can be reproduced? 😂
code.mp4 |
@ntdiary As for the bug you've mentioned #53627 (comment):
|
@Kicu Good call! Updated! |
// This is necessary so we don't send the entire CONST object to the worklet which could lead to performance issues | ||
// https://docs.swmansion.com/react-native-reanimated/docs/guides/worklets/#capturing-closure | ||
const ANIMATION_GYROSCOPE_VALUE = CONST.ANIMATION_GYROSCOPE_VALUE; |
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.
We no longer need this workaround since we already use react-native-reanimated
to 3.16.4.
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.
It's not needed but we should do it. CONST
is a huge object and it's creating unnecessary work.
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.
Okay, sounds good.
import {MarkdownTextInput} from '@expensify/react-native-live-markdown'; | ||
import type {parseExpensiMark} from '@expensify/react-native-live-markdown'; | ||
|
||
global.jsi_setMarkdownRuntime = jest.fn(); | ||
global.jsi_registerMarkdownWorklet = jest.fn(); | ||
global.jsi_unregisterMarkdownWorklet = jest.fn(); | ||
|
||
const parseExpensiMarkMock: typeof parseExpensiMark = () => { | ||
'worklet'; | ||
|
||
return []; | ||
}; | ||
|
||
export {MarkdownTextInput, parseExpensiMarkMock as parseExpensiMark}; |
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 it okay if we have this mock here or should we move it to react-native-live-markdown
somehow?
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 part of the mock can be moved. But I'm not sure about the react-native part. Maybe we can just avoid throwing an error if NativeLiveMarkdownModule is not available? (same as it was before). The global.jsi_setMarkdownRuntime check is probably enough
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.
Raised PR Expensify/react-native-live-markdown#578.
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.
Thanks for the PR! Left couple of comments there.
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.
Do I need to wait for the above PR to be completed, and then start testing this PR?
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.
Yes, let's wait for that PR with the mock. I've asked my collegaues to review that PR (it looks good for me, just wanted another pair of eyes on it). I hope we can merge that PR today. Then we can bump here and ask for QA.
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.
@s77rt I've just merged the PR introducing the mock to react-native-live-markdown
(Expensify/react-native-live-markdown#578). Let's bump live-markdown to 0.1.207, remove mock in this PR and we should be ready to test.
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.
Done! This is ready for test
@ntdiary @s77rt about this bug in parsing codeblocks: #53627 (comment) I updated the issue that Tomasz created, check here: We can move forward with this PR, and we will bump |
Only the Android app is still building, will fill the checklist soon. :D |
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! 😄
I added #45154 to the list of issues since this PR is bumping the packages to solve that issue as well. |
@dangrous Can you please re-trigger this test https://github.com/Expensify/App/actions/runs/12273874071/ |
triggered! |
@dangrous That failing test is a false positive. I don't know why it sometimes still see the old patch. Can you trigger it once again |
Hm I can try - maybe need to merge main? |
…loose-url-website-regex
Okay great, that passed. Can we go ahead and merge, or are there any other moving pieces we need to wait for and or test for? |
Please hold. A patch has been removed recently and this PR is adding it again. Will remove it... |
It seems that the test failure is a regression from https://github.com/Expensify/App/pull/50559/files#r1881064349 |
@@ -1,5 +1,6 @@ | |||
diff --git a/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx b/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx | |||
index 38e3d39..9936670 100644 | |||
|
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.
Do we need this newline?
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.
No, I just added it to have the reassure test instance see this as a file change and not just a rename but it didn't work. (also that part of the diff is ignored and is used as a comment section)
@dangrous Should we just ignore the test here? |
Explanation of Change
react-native-live-markdown
html-entities
(required forreact-native-live-markdown
as seen in https://github.com/Expensify/react-native-live-markdown/tree/c35696d8a65ffe06d1acc066a9ff2a17b01eb77d/patches)react-native-live-markdown
(required for existing tests to pass)Fixed Issues
$ #52475
$ #45154
PROPOSAL: #52475 (comment)
Tests
![test](https://camo.githubusercontent.com/4848d0f965f332077b77a1a0488c3e66b4769032104f4de6890bae218b4add8d/68747470733a2f2f70696373756d2e70686f746f732f69642f313036372f3230302f333030 )_test
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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.mov
Android: mWeb Chrome
mweb-chrome.mov
iOS: Native
ios.mov
iOS: mWeb Safari
mweb-safari.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov