Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
*** To View Gutenberg-Mobile git history from before this merge, use the following fork: https://github.com/wordpress-mobile/gutenberg-rnmobile-monorepo-commit-history/
Description
This is the final PR that aims at merging the Monorepo effort in
master.What is Monorepo?
Monorepo is the name we gave to the project of merging gutenberg-mobile (the react-native version of gutenberg) and gutenberg together. Thus this PR contains all the commits from
gutenberg-mobileplus some extra commits to make it work (see How has this been tested?).With this PR comes a new flavour of the block editor: a native version that can run on both iOS and Android!
You can try the demo app from this branch by running
npm run native start:resetfollowed bynpm run android(ornpm run ios) in a new terminal. You will need either the Android SDK or XCode installed on your machine (a docker based script should come later).Why Monorepo?
Monorepo is a first step in making Gutenberg a cross-platform project. We’re not there yet as the project is still very much web in its direction. However, we have great hopes for developers to be able to create an amazing editing experience for both the web platform and native apps at the same time.
Many times we’ve seen changes to web code break the native build. This is because we were not able to fully convert gutenberg to native from day one so we had to make compromises and often duplicate features or components to have it working.
To address this issue we decided to simplify the gutenberg contributor’s journey in developing for mobile by providing all the necessary tools to run and test their code from within gutenberg. Moreover we would be adding back the mobile CI tests on every gutenberg PRs in order to spot regressions and help developers solve them.
What is going to change for web devs? #
This final merge PR has all the changes. Most of it are mobile build additions but it also has some minor changes web devs might want to be aware of:
tsconfig.base.json: we’re explicitly defining the types the web will load (see this discussion). We’re also excluding any files from the react-native packages.react-native-aztec,react-native-bridgeandreact-native-editornpmcommandnpm run nativeto run native scripts inpackages/react-native-editor/package.jsonFor a complete history of Monorepo please see the master PR.
What is going to change for mobile devs?
A bunch of new
npmcommands are now available:npm run native startnpm run native start:resetnpm run native iosnpm run native androidnpm run native testnpm run native test:e2e:ios:localnpm run native test:e2e:android:localMore details related to how to transition from a gutenberg-mobile setup to the this setup will be given on the gutenberg-mobile PR (note: add link when PR is ready)
How has this been tested?
This branch contains all the following approved PRs:
masterand port react-native-aztec from Flow to jsThe last extra commits should only be updates to pull the latest changes from gutenberg-mobile
developand fix conflicts with gutenbergmaster.Screenshots
Here are a few screenshots of the demo app which is part of this PR:
iOS
Android
Types of changes
Releasing a demo version of the react native block editor and improving the native dev experience.
Checklist: