-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Monorepo] import gutenberg-mobile as a package #18159
Conversation
Release/1.13.0
Merge master (v1.13.0) back to develop
…e into feature/move-media-upload-progress
… the JS side to Native when Underline is enabled on the current selection
@@ -1,8 +1,8 @@ | |||
const config = process.env.MOBILE ? require( './packages/react-native-editor/babel.config' ) : { |
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 need to double-check how Babel caching works with envs.
There are a few files added in the root folder. Can you list all of those which must live there so we could double-check when doing the review? |
@@ -0,0 +1,280 @@ | |||
diff --git a/node_modules/@types/react-native/globals.d.ts b/node_modules/@types/react-native/globals.d.ts |
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 that file?
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.
Yeah it is a path for react-native because:
after import gutenberg-mobile we have react-native-dark-mode as a dependency which requires @types/react-native.
@types/react-native/globals.d.ts
andtypescript/lib/lib.dom
declare the same global types. We can not removelib.dom
fromtsconfig
because@types/react-native
doesn't include Window and i get error:
node_modules/@types/reach__router/index.d.ts:9:30 - error TS2304: Cannot find name 'Window'.
9 export type WindowLocation = Window['location'] & HLocation;
I tried all solutions from this issue (DefinitelyTyped/DefinitelyTyped#15960) and few more, only removing the
@types/react-native/globals.d.ts
fix that.
Seems like Orta is trying to fix that here - microsoft/types-publisher#655
I can't review |
@@ -0,0 +1,26 @@ | |||
package = JSON.parse(File.read(File.join(__dir__, 'packages', 'react-native-editor', 'package.json'))) |
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.
Should we move this file to @wordpress/react-native-bridge
, or could we even?
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 tried to move it to packages/react-native-bridge
but couldn't make it works with Wordpress-iOS
. I don't know why but cocoapods can not read package.json
with that configuration.
@@ -0,0 +1,23 @@ | |||
require 'json' |
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.
Same here, would be awesome if we didn't add new files at the root
This looks like it's on good tracks 👍 However, given the amount of changes, I think it will be pretty hard to merge this to What do you think about merging to another branch which we can iterate on? The idea is that this PR would be mostly copying the content of So, in order to make the diff clearer I would suggest removing all your commits that are not in gutenberg-mobile and cherry-pick them in a new PR that targets this new branch. Wdyt? |
I like that idea and i planned to do something like this when I finish all the stuff related to the building process (Jitpack, cocoapods) etc. Right after that, I would update branch to master and then will create few PRs to make reviews possible :) |
Closing this as it is now outdated |
Description
Explores #11491.
Superseeds #17456 started by @Tug
Wordpress-iOS PR - wordpress-mobile/WordPress-iOS#12762
Wordpress-Android PR - wordpress-mobile/WordPress-Android#10668
This is a migration of gutenberg-mobile to gutenberg repository.
New packages added:
@wordpress/react-native-editor
- playground react-native app and bundle entrypoint@wordpress/react-native-bridge
- module which starts react-native inside the client app (WP-iOS/Android
)@wordpress/react-native-aztec
- react-native-aztec moduleUsual
yarn
commands ran from gutenberg-mobile are now accessible from gutenberg usingnpm run native
For instance:
yarn start
=>npm run native start
How has this been tested?
TBD
Screenshots
Types of changes
Add new native packages, for native build, unifying the 2 repositories
Checklist:
react-native-aztec
example app works