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

RNMobile: Consolidate logic hiding blocks from release builds to one location #19516

Merged
merged 1 commit into from
Jan 13, 2020

Conversation

mchowning
Copy link
Contributor

@mchowning mchowning commented Jan 8, 2020

related gutenberg-mobile PR

Summary

The purpose of this PR is to address a bit of technical debt by consolidating our handling of restricting blocks to dev mode to a single location. Before this PR we registered the code block in all builds and later unregistered it if it was a release build, whereas the gallery block was never registered in release builds. This made it necessary to check two different locations to see whether a block was enabled for release builds. Now we take the same approach with both blocks and never register them if it is a release build.

How has this been tested?

Verify that code and gallery blocks appear in development builds, but not in release builds.

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 updated all React Native files affected by any refactorings/renamings in this PR. .

@mchowning mchowning added the Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) label Jan 8, 2020
Copy link
Contributor

@etoledom etoledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great and works perfectly 🎉
Tested on iOS dev and production mode.

Nice job @mchowning !

Copy link
Contributor

@marecar3 marecar3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 🎉
LGTM!

@mchowning mchowning merged commit adf6735 into master Jan 13, 2020
@mchowning mchowning deleted the rnmobile/consolidate_dev_block_logic branch January 13, 2020 20:11
@ellatrix ellatrix added this to the Gutenberg 7.3 milestone Jan 20, 2020
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants