Skip to content
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

[RNMobile] Upgrade React Native 0.71.11 #51303

Merged
merged 70 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
c70eb5b
Upgrade `react-native` dependency
fluiddot Jun 5, 2023
13ad608
Upgrade `@babel/runtime` dependency
fluiddot Jun 5, 2023
83b7a16
Upgrade `metro-react-native-babel` preset and transformer dependencies
fluiddot Jun 5, 2023
256be9c
Upgrade `cocoapods` gem
fluiddot Jun 5, 2023
213073d
Re-apply `react-devtools-core` patch to new version
fluiddot Jun 5, 2023
cbdb7ff
Update jest snapshots with new a11y values
fluiddot Jun 8, 2023
bd0750b
Mock `Linking.addEventListener` function
fluiddot Jun 8, 2023
6cac580
Update tests that fail due to use of debounce and link suggestions
fluiddot Jun 8, 2023
311ed3f
Fix `MediaUpload` component test
fluiddot Jun 8, 2023
5b48573
Update `@react-navigation/native` package to version `6.0.14`
fluiddot Jun 8, 2023
ba8496a
Update `react-native-reanimated` to version `2.17.0`
fluiddot Jun 8, 2023
ca395c2
Update `react-native-gesture-handler` to version `2.10.2`
fluiddot Jun 8, 2023
2c0e048
Fix `act` warnings produced during block insertion
fluiddot Jun 9, 2023
809b82d
Fix `act` warnings in Columns block tests
fluiddot Jun 9, 2023
3f73574
Fix `act` warnings in List block tests
fluiddot Jun 9, 2023
e0cab59
Upgrade `react-native` dependency to version `0.71.11`
fluiddot Jun 16, 2023
97265c7
Mock return value of Linking `addEventListener`
fluiddot Jun 16, 2023
9f2edf4
Remove `waitForModalVisible` usage in Paragraph block tests
fluiddot Jun 16, 2023
a9d4165
Remove `waitFor` usage in Link settings tests
fluiddot Jun 16, 2023
70dbcc6
test: Fix act warning by awaiting LinkPicker loading indicator removal
dcalhoun Jun 17, 2023
36ccef4
build: Update react-native-safe-area-context to 4.6.3
dcalhoun Jun 22, 2023
29457bb
build: Upgrade react-native-screens to 3.22.0
dcalhoun Jun 22, 2023
88b679b
build: Upgrade react-native-svg to 13.9.0
dcalhoun Jun 22, 2023
53ea3f9
build: Upgrade @react-native-masked-view/masked-view to 0.2.9
dcalhoun Jun 22, 2023
6d30809
build: Upgrade @react-native-clipboard/clipboard to 1.11.2
dcalhoun Jun 22, 2023
5be8a68
build: Upgrade react-native-modal to 13.0.1
dcalhoun Jun 22, 2023
ac7d100
Merge branch 'trunk' of github.com:WordPress/gutenberg into rnmobile/…
dcalhoun Jun 26, 2023
8bbaf2c
test: Update link modal snapshot
dcalhoun Jun 26, 2023
b5c02fd
Update `@react-navigation/stack` to version `6.3.5`
fluiddot Jun 27, 2023
556b3ef
Upgrade `react-native-linear-gradient` to version `2.7.3`
fluiddot Jun 28, 2023
fb14804
Use `react-native-safe-area-context` mock provided by the library
fluiddot Jun 28, 2023
70a78c5
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jun 28, 2023
7988b0e
Update link modal snapshot
fluiddot Jun 28, 2023
a756c3e
Update `package-lock.json` file
fluiddot Jun 28, 2023
e5838f4
Disable `react-native-screens` in navigators
fluiddot Jun 27, 2023
f879e29
Fix render order of animated view to highlight selected segment
fluiddot Jun 27, 2023
86d36e0
Update source of `react-native-hsv-color-picker` to use tag version
fluiddot Jun 28, 2023
8f36b9a
Revert "Update link modal snapshot"
fluiddot Jun 28, 2023
305db7f
[RNMobile] Upgrade React Native `0.71.11` - iOS changes (#51386)
fluiddot Jun 30, 2023
39570ce
[RNMobile] Upgrade React Native `0.71.11` - Android changes (#51289)
fluiddot Jun 30, 2023
ad188ac
Avoid exception in E2E tests when typing an empty string on Android
fluiddot Jun 30, 2023
9b8d7be
Update a11y id queries for Android E2E tests
fluiddot Jun 30, 2023
de27968
Update button inline appender query for Android E2E tests
fluiddot Jun 30, 2023
b6f5fba
Unify press keycode function for E2E tests
fluiddot Jul 3, 2023
bb3afd8
Update comments in functions related to pressing a keycode
fluiddot Jul 4, 2023
bdd4704
Update block drop position using Reanimated's shared value
fluiddot Jul 4, 2023
2b3fa44
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 4, 2023
643860d
Remove unneeded `hidden` param in Paragraph block test case
fluiddot Jul 4, 2023
cf67f49
Revert removing `.ruby-version` file
fluiddot Jul 5, 2023
a5036dd
Add inline comment in Reanimated patch
fluiddot Jul 5, 2023
70c6dcb
Use `waitForElementToBeRemoved` in Paragraph block test cases
fluiddot Jul 5, 2023
2d0a219
Remove `act` statements from Link Settings test cases
fluiddot Jul 5, 2023
470af37
fix: Cover focal point drag handle visibility
dcalhoun Jul 6, 2023
0411df1
[RNMobile] Use Reanimated in bottom sheet height animation (#52563)
fluiddot Jul 14, 2023
4482b9d
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 19, 2023
1f34e0c
Update `react-native-editor` changelog
fluiddot Jul 19, 2023
20aaaf3
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 19, 2023
2fad54c
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
Jul 20, 2023
44b988a
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 21, 2023
0c79d79
Drop unsupported `--no-jetifier` from Android cmd
Jul 21, 2023
fff11e9
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
Jul 21, 2023
8e496ba
Revert accidental change to .ruby-version
Jul 21, 2023
7b423cd
Restore correct dependencies to package-lock.json
Jul 21, 2023
7289045
Update `react-native-editor` changelog
fluiddot Jul 26, 2023
3ef9edd
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 26, 2023
05e9748
Merge branch 'trunk' into rnmobile/upgrade/react-native-0.71.8
fluiddot Jul 26, 2023
c6b1311
Update `package-lock.json` file to revert previous conflict resolutions
fluiddot Jul 26, 2023
29c2bed
Re-apply `react-devtools-core` patch to new version
fluiddot Jul 26, 2023
61669c8
Update `Podfile.lock` file
fluiddot Jul 26, 2023
5040e6a
Merge branch 'trunk' of github.com:WordPress/gutenberg into rnmobile/…
dcalhoun Jul 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,623 changes: 2,939 additions & 1,684 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@
"lerna": "5.5.2",
"lint-staged": "10.0.1",
"make-dir": "3.0.0",
"metro-react-native-babel-preset": "0.70.3",
"metro-react-native-babel-transformer": "0.70.3",
"metro-react-native-babel-preset": "0.73.10",
"metro-react-native-babel-transformer": "0.73.10",
"mkdirp": "0.5.1",
"mock-match-media": "0.4.2",
"moment-timezone-data-webpack-plugin": "1.5.1",
Expand All @@ -224,7 +224,7 @@
"progress": "2.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.69.4",
"react-native": "0.71.11",
"react-native-url-polyfill": "1.1.2",
"react-refresh": "0.10.0",
"react-test-renderer": "18.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ describe( 'BlockDraggable', () => {
// activate the gesture. Since this not available in tests, the library
// displays a warning message.
expect( console ).toHaveWarnedWith(
'[react-native-gesture-handler] You have to use react-native-reanimated in order to control the state of the gesture.'
'[Reanimated] You can not use setGestureState in non-worklet function.'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous warning is no longer shown when running the tests, seems that now a different one is displayed instead.

);
expect( getEditorHtml() ).toMatchSnapshot(
'Paragraph block moved from first to second position'
Expand Down Expand Up @@ -411,7 +411,7 @@ describe( 'BlockDraggable', () => {
// activate the gesture. Since this not available in tests, the library
// displays a warning message.
expect( console ).toHaveWarnedWith(
'[react-native-gesture-handler] You have to use react-native-reanimated in order to control the state of the gesture.'
'[Reanimated] You can not use setGestureState in non-worklet function.'
);
expect( getEditorHtml() ).toMatchSnapshot(
'Spacer block moved from third to first position'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,19 @@ exports[`Block Mover Picker should render without crashing and match snapshot 1`
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": false,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
Comment on lines +66 to +78
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new a11y values have been added in RN 0.71 (reference).

}
}
accessible={true}
Expand Down Expand Up @@ -130,7 +142,19 @@ exports[`Block Mover Picker should render without crashing and match snapshot 1`
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe( 'MediaUpload component', () => {
const wrapper = render(
<MediaUpload
allowedTypes={ [ mediaType ] }
onSelectURL={ jest.fn() }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a failure I encountered when running the tests. The error was related to missing the option "Insert from URL" on the Image and Audio block.

After reviewing the logic of MediaUpload component, seems the error is legit, as the URL insertion option is only available when passing the onSelectURL prop. Now I'm curious about how these tests passed before 🤔 .

https://github.com/WordPress/gutenberg/blob/b52d61ed6c1307e9ccf0eedaddafe52c06033dbd/packages/block-editor/src/components/media-upload/index.native.js#L138C24-L145

render={ ( { open, getMediaOptions } ) => {
return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
Expand Down Expand Up @@ -38,7 +42,11 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
Expand Down Expand Up @@ -126,6 +134,15 @@ exports[`Audio block renders audio block error state without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -189,7 +206,11 @@ exports[`Audio block renders audio file without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
Expand Down Expand Up @@ -223,7 +244,11 @@ exports[`Audio block renders audio file without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
Expand Down Expand Up @@ -274,6 +299,15 @@ exports[`Audio block renders audio file without crashing 1`] = `
accessibilityHint="Double tap to listen the audio file"
accessibilityLabel="Audio Player"
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
focusable={true}
onClick={[Function]}
Expand Down Expand Up @@ -326,6 +360,15 @@ exports[`Audio block renders audio file without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -440,6 +483,23 @@ exports[`Audio block renders placeholder without crashing 1`] = `
accessibilityHint="Double tap to select an audio file"
accessibilityLabel="Audio block. Empty"
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/columns/test/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import {
act,
addBlock,
fireEvent,
getEditorHtml,
Expand Down Expand Up @@ -290,6 +291,10 @@ describe( 'Columns block', () => {
// Get the first column
const firstColumnBlock = await getBlock( screen, 'Column' );
fireEvent.press( firstColumnBlock );
// Inner blocks batch store updates with microtasks.
// To avoid `act` warnings, we let queued microtasks to be executed.
// Reference: https://t.ly/b95nA
await act( async () => {} );
dcalhoun marked this conversation as resolved.
Show resolved Hide resolved

// Open vertical alignment menu
fireEvent.press( verticalAlignmentButton );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ exports[`File block renders file error state without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": false,
"expanded": undefined,
"selected": undefined,
}
}
accessible={false}
Expand Down Expand Up @@ -61,6 +65,15 @@ exports[`File block renders file error state without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -167,6 +180,15 @@ exports[`File block renders file error state without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -251,7 +273,11 @@ exports[`File block renders file without crashing 1`] = `
<View
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": false,
"expanded": undefined,
"selected": undefined,
}
}
accessible={false}
Expand Down Expand Up @@ -290,6 +316,15 @@ exports[`File block renders file without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -370,6 +405,15 @@ exports[`File block renders file without crashing 1`] = `
}
>
<RCTAztecView
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
activeFormats={[]}
blockType={
Expand Down Expand Up @@ -486,6 +530,23 @@ exports[`File block renders placeholder without crashing 1`] = `
accessibilityHint="Double tap to select"
accessibilityLabel="File block. Empty"
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/list/test/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import {
act,
selectRangeInRichText,
typeInRichText,
fireEvent,
Expand Down Expand Up @@ -577,6 +578,10 @@ describe( 'List block', () => {
preventDefault() {},
keyCode: BACKSPACE,
} );
// Inner blocks batch store updates with microtasks.
// To avoid `act` warnings, we let queued microtasks to be executed.
// Reference: https://t.ly/b95nA
await act( async () => {} );
dcalhoun marked this conversation as resolved.
Show resolved Hide resolved

expect( getEditorHtml() ).toMatchInlineSnapshot( `
"<!-- wp:paragraph -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ exports[`Missing block renders without crashing 1`] = `
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": true,
"expanded": undefined,
"selected": undefined,
}
}
accessible={true}
Expand All @@ -24,6 +28,23 @@ exports[`Missing block renders without crashing 1`] = `
accessibilityHint="Tap here to show help"
accessibilityLabel="Help button"
accessibilityRole="button"
accessibilityState={
{
"busy": undefined,
"checked": undefined,
"disabled": undefined,
"expanded": undefined,
"selected": undefined,
}
}
accessibilityValue={
{
"max": undefined,
"min": undefined,
"now": undefined,
"text": undefined,
}
}
accessible={true}
collapsable={false}
focusable={true}
Expand Down
Loading