React Native based mobile Gutenberg Edit

Intertwined with the web codepaths, the Gutenberg repo also includes the React Native based mobile tree. The mobile client is packaged and released via the official WordPress apps. Even though the build pipeline is rather different and lives in its own repo for now (here’s the native mobile repo), the source code itself is taken directly from this repo and the “web” side codepaths.

Native mobile specific files Native mobile specific files

The majority of the code shared with native mobile is in the very same JavaScript module and SASS style files. In the cases where the code paths need to diverge, a .native.js or .native.scss variant of the file is created. In some cases, platform specific files can be also found for Android (.android.js) or iOS (.ios.js).

Top ↑

Mind the mobile Mind the mobile

Our tooling isn’t as good yet as we’d like to and it’s hard to have a good awareness of those native mobile files. That means that contributors need to manually pay attention to update the native mobile files during code refactorings. For example, renaming a function or a prop should also be performed in the native modules too, otherwise, the mobile client will break. We are in the process of putting some more safeguards in place in PRs, but we’re still far from done. Please bear with us and thank you in advance. ❤️🙇‍

Top ↑

Debugging the native mobile unit tests Debugging the native mobile unit tests

Follow the instructions in Native mobile testing to locally debug the native mobile unit tests when neeeded.