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

[Monorepo] Import gutenberg-mobile as new WordPress react-native packages #17456

Closed
wants to merge 2 commits into from

Conversation

Tug
Copy link
Contributor

@Tug Tug commented Sep 16, 2019

Description

Explores #11491.

This is an experiment to add gutenberg-mobile build and tools to gutenberg.

New packages added:

  • @wordpress/react-native-gutenberg-editor
  • @wordpress/react-native-gutenberg-bridge
  • @wordpress/react-native-aztec
  • @wordpress/react-native-e2e-tests

Usual yarn commands ran from gutenberg-mobile are now accessible from gutenberg using npm run native ....

For instance:

  • yarn start => npm run native start

bundle however, has been replaced with build to follow gutenberg naming conventions

  • yarn bundle:android => npm run native build

Some commands that are out of date have been removed (makepot...)

This is still a work in progress. Currently, the demo app does not work as master is broken on native (see #17228 for a fix), native tests are failing with TypeError: r.editor is not a function in packages/edit-post/src/test/editor.native.js, and many things remain untested.

How has this been tested?

TBD.

  • npm install
  • Try the demo app on android: npm run native start:reset and npm run native android
  • Try building the app: npm run build
    ...

Types of changes

Add new native packages, for native build, unifying the 2 repositories

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've checked that the licencing is OK
  • I've checked that package release is working as expected (lerna)
  • I've checked that installing dependencies works as expected, and that changes to package-lock.json are OK
  • I've checked that we are up to date with gutenberg-mobile develop branch
  • I have informed concerned developers of the change of repository
  • I have ported e2e tests
  • I have ported pre-commit hooks including eslint
  • I have ported i18n
  • I have checked that build scripts are up to date with WordPress-iOS
  • I have checked that build scripts are up to date with WordPress-Android
  • I have made sure that the project can be opened in Android Studio
  • I have made sure that the project can be opened in XCode
  • I have made sure that the demo app for mobile runs
  • I have made sure that I have excluded any binary files, jar, phar... from the patch (gutenberg-mobile has gradle-wrapper.jar committed to the repo though and we might want to fix that later?)

@Tug Tug added [Type] Build Tooling Issues or PRs related to build tooling Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Sep 16, 2019
@Tug Tug self-assigned this Sep 16, 2019
@gziolo
Copy link
Member

gziolo commented Sep 16, 2019

I love it ❤️

How can I help to merge it? Will we have to split it into more PRs? Do you need my review now or is it mostly an experiment?

@Tug
Copy link
Contributor Author

Tug commented Sep 16, 2019

How can I help to merge it?

I'm thinking test and report bugs and other problems!

Also there is going to be a lot of work needed around integrating the new packages with the current ones in terms of scripts, build, lint checks, doc gen, package release... obviously we cannot do everything at once but I expect this PR not to break anything either on the web or the mobile side.

Will we have to split it into more PRs?

I'd like to but I'm not sure how at this point, most added files depend on each others at the moment... ideas are welcomed here 👍

Do you need my review now or is it mostly an experiment?

It's mostly an experiment at this point, but hopefully it could turn into a real proposal!
I'm still experiencing some issues with the build but yeah would be awesome to have your feedback (I can ping you if you want when it's a bit more stable ;))

@Tug Tug force-pushed the add/gutenberg-mobile-build branch 2 times, most recently from 2d153a6 to 515c9c1 Compare September 16, 2019 22:48
@Tug Tug changed the title [Monorepo] Port main native packages from gutenberg-mobile [Monorepo] Import gutenberg-mobile as new WordPress react-native packages Sep 16, 2019
@gziolo gziolo mentioned this pull request Sep 19, 2019
5 tasks
@gziolo gziolo added the [Type] Technical Prototype Offers a technical exploration into an idea as an example of what's possible label Oct 10, 2019
@gziolo gziolo requested a review from dratwas October 10, 2019 11:10
@gziolo
Copy link
Member

gziolo commented Oct 15, 2019

Let's close in favor of #17950 which is more up to date. It looks like it follows the same approach.

@gziolo gziolo closed this Oct 15, 2019
@gziolo gziolo deleted the add/gutenberg-mobile-build branch October 15, 2019 13:42
@dratwas dratwas mentioned this pull request Nov 19, 2019
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Build Tooling Issues or PRs related to build tooling [Type] Technical Prototype Offers a technical exploration into an idea as an example of what's possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants