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-modal and other warning fixes #32772

Merged
merged 14 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Animated, Easing, View, Platform } from 'react-native';
/**
* WordPress dependencies
*/
import { ToolbarButton, Toolbar } from '@wordpress/components';
import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
import { useEffect, useState, useRef } from '@wordpress/element';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
Expand Down Expand Up @@ -83,7 +83,7 @@ const FloatingToolbar = ( {
pointerEvents={ showFloatingToolbar ? 'auto' : 'none' }
>
{ showNavUpButton && (
<Toolbar passedStyle={ styles.toolbar }>
<ToolbarGroup passedStyle={ styles.toolbar }>
<ToolbarButton
title={ __( 'Navigate Up' ) }
onClick={
Expand All @@ -93,7 +93,7 @@ const FloatingToolbar = ( {
icon={ <NavigateUpSVG isRTL={ isRTL } /> }
/>
<View style={ styles.pipe } />
</Toolbar>
</ToolbarGroup>
) }
<BlockSelectionButton
clientId={ blockSelectionButtonClientId }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export class Inserter extends Component {
}

onInserterToggledAnnouncement( isOpen ) {
AccessibilityInfo.fetch().done( ( isEnabled ) => {
AccessibilityInfo.isScreenReaderEnabled().done( ( isEnabled ) => {
if ( isEnabled ) {
const isIOS = Platform.OS === 'ios';
const announcement = isOpen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { noop } from 'lodash';
* WordPress dependencies
*/
import { store as blocksStore } from '@wordpress/blocks';
import { Toolbar, ToolbarButton } from '@wordpress/components';
import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { withSelect, withDispatch } from '@wordpress/data';
import { compose } from '@wordpress/compose';
Expand All @@ -23,13 +23,13 @@ export function UngroupButton( { onConvertFromGroup, isUngroupable = false } ) {
return null;
}
return (
<Toolbar>
<ToolbarGroup>
<ToolbarButton
title={ __( 'Ungroup' ) }
icon={ UngroupIcon }
onClick={ onConvertFromGroup }
/>
</Toolbar>
</ToolbarGroup>
);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/components/src/focal-point-picker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ function FocalPointPicker( props ) {
pan.extractOffset(); // Set offset to current value
},
// Move cursor to match delta drag
onPanResponderMove: Animated.event( [
null,
{ dx: pan.x, dy: pan.y },
] ),
onPanResponderMove: Animated.event(
[ null, { dx: pan.x, dy: pan.y } ],
{ useNativeDriver: false }
),
onPanResponderRelease: ( event ) => {
shouldEnableBottomSheetScroll( true );
pan.flattenOffset(); // Flatten offset into value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class BottomSheet extends Component {
backdropOpacity={ 0.2 }
onBackdropPress={ this.onCloseBottomSheet }
onBackButtonPress={ this.onHardwareButtonPress }
onSwipe={ this.onCloseBottomSheet }
onSwipeComplete={ this.onCloseBottomSheet }
onDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }
onModalHide={
Platform.OS === 'android' ? this.onDismiss : undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
BlockToolbar,
store as blockEditorStore,
} from '@wordpress/block-editor';
import { Toolbar, ToolbarButton } from '@wordpress/components';
import { ToolbarGroup, ToolbarButton } from '@wordpress/components';
import {
keyboardClose,
undo as undoIcon,
Expand Down Expand Up @@ -94,7 +94,7 @@ function HeaderToolbar( {
<BlockToolbar />
</ScrollView>
{ showKeyboardHideButton && (
<Toolbar passedStyle={ styles.keyboardHideContainer }>
<ToolbarGroup passedStyle={ styles.keyboardHideContainer }>
<ToolbarButton
title={ __( 'Hide keyboard' ) }
icon={ keyboardClose }
Expand All @@ -103,7 +103,7 @@ function HeaderToolbar( {
hint: __( 'Tap to hide the keyboard' ),
} }
/>
</Toolbar>
</ToolbarGroup>
) }
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class VisualEditor extends Component {
};
}

componentWillMount() {
componentDidMount() {
this.keyboardDidShow = Keyboard.addListener(
'keyboardDidShow',
this.keyboardDidShow
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"react-native-hsv-color-picker": "git+https://github.com/wordpress-mobile/react-native-hsv-color-picker#dfe4d06595fefc9b4d48ce0ced029076c80dab74",
"react-native-keyboard-aware-scroll-view": "git+https://github.com/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#6febe4faf7ff51579087bac105f62be8e4c4015d",
"react-native-linear-gradient": "git+https://github.com/wordpress-mobile/react-native-linear-gradient.git#deafc7a7b3dcfdc2a2d8327b5727cb393f1cabf7",
"react-native-modal": "^6.5.0",
"react-native-modal": "^11.10.0",
"react-native-prompt-android": "git+https://github.com/wordpress-mobile/react-native-prompt-android.git#6406b77d0162262c868bcbbaa0766bfafbf43742",
"react-native-reanimated": "git+https://github.com/wordpress-mobile/react-native-reanimated.git#047ae6064e2bcfdaeb1f25d1d38157359ba96cb6",
"react-native-safe-area": "^0.5.0",
Expand Down
13 changes: 13 additions & 0 deletions patches/metro+0.64.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js b/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
index 5f32fc5..2b80fda 100644
--- a/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
+++ b/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
@@ -346,7 +346,7 @@ class UnableToResolveError extends Error {
try {
file = fs.readFileSync(this.originModulePath, "utf8");
} catch (error) {
- if (error.code === "ENOENT") {
+ if (error.code === "ENOENT" || error.code === 'EISDIR') {
// We're probably dealing with a virtualised file system where
// `this.originModulePath` doesn't actually exist on disk.
// We can't show a code frame, but there's no need to let this I/O