Skip to content

Commit

Permalink
Include PR template check for .native.js refactorings (WordPress#15468)
Browse files Browse the repository at this point in the history
* Include PR template check for .native.js refactorings

* Add a short notice for the RN codebase

* Mention the RN app guidelines in the template

* Fix missing negative

h/t @gziolo for spotting this.

Co-Authored-By: Grzegorz (Greg) Ziółkowski <grzegorz@gziolo.pl>

* Update dev docs config

* Fix typo

* Update devhub manifest

* Add a link to React Native homepage

* Docs: Update manifest to include new page
  • Loading branch information
hypest authored and gziolo committed Nov 8, 2019
1 parent 3bed7e5 commit 8b912dd
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
- [ ] My code follows the accessibility standards. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/coding-standards/accessibility-coding-standards/ -->
- [ ] My code has proper inline documentation. <!-- Guidelines: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ -->
- [ ] I've included developer documentation if appropriate. <!-- Handbook: https://developer.wordpress.org/block-editor/ -->
- [ ] I've updated all React Native files affected by any refactorings/renamings in this PR. <!-- React Native mobile Gutenberg guidelines: https://github.com/WordPress/gutenberg/blob/master/docs/contributors/native-mobile.md -->.
1 change: 1 addition & 0 deletions docs/contributors/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ The following resources offer additional information for developers who wish to
* [Managing Packages](/docs/contributors/managing-packages.md).
* [Gutenberg Release Process](/docs/contributors/release.md) - a checklist for the different type of releases for Gutenberg project.
* [Localizing Gutenberg Plugin](/docs/contributors/localizing.md) - a guide on how to translate Gutenberg in your locale or language.
* [React Native mobile Gutenberg](/docs/contributors/native-mobile.md) - a guide on the React Native based mobile Gutenberg editor.
4 changes: 2 additions & 2 deletions docs/contributors/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ To add a new documentation page:

1. Create a Markdown file in the [docs](https://github.com/WordPress/gutenberg/tree/master/docs) folder
2. Add item to the [toc.json](https://github.com/WordPress/gutenberg/blob/master/docs/toc.json) hierarchy
3. Update manifest.json by running `npm run docs:build`
4. Commit manifest.json with other files updated
3. Update `manifest-devhub.json` by running `npm run docs:build`
4. Commit `manifest-devhub.json` with other files updated

## Using Links

Expand Down
6 changes: 6 additions & 0 deletions docs/contributors/native-mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# React Native based mobile Gutenberg
Intertwined with the web codepaths, the Gutenberg repo also includes the [React Native](https://facebook.github.io/react-native/) based mobile tree. The mobile client is packaged and released via the [official WordPress apps](https://wordpress.org/mobile/). Even though the build pipeline is rather different and lives in its own repo for now ([here's the native mobile repo](https://github.com/wordpress-mobile/gutenberg-mobile)), the source code itself is taken directly from this repo and the "web" side codepaths.
## 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`).
## 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. ❤️🙇‍
6 changes: 6 additions & 0 deletions docs/manifest-devhub.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@
"markdown_source": "../docs/contributors/localizing.md",
"parent": "develop"
},
{
"title": "React Native based mobile Gutenberg",
"slug": "native-mobile",
"markdown_source": "../docs/contributors/native-mobile.md",
"parent": "develop"
},
{
"title": "Documentation Contributions",
"slug": "document",
Expand Down
3 changes: 2 additions & 1 deletion docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
{ "docs/contributors/scripts.md": [] },
{ "docs/contributors/managing-packages.md": [] },
{ "docs/contributors/release.md": [] },
{ "docs/contributors/localizing.md": [] }
{ "docs/contributors/localizing.md": [] },
{ "docs/contributors/native-mobile.md": [] }
] },
{ "docs/contributors/document.md": [
{ "docs/contributors/copy-guide.md": [] }
Expand Down

0 comments on commit 8b912dd

Please sign in to comment.