Skip to content

[Mobile] Disable gallery size options on mobile#19774

Merged
mkevins merged 1 commit intornmobile/release-v1.20.1from
rnmobile/fix-disable-gallery-size-options
Jan 22, 2020
Merged

[Mobile] Disable gallery size options on mobile#19774
mkevins merged 1 commit intornmobile/release-v1.20.1from
rnmobile/fix-disable-gallery-size-options

Conversation

@mkevins
Copy link
Copy Markdown
Contributor

@mkevins mkevins commented Jan 21, 2020

Note:

This PR can be merged into the v1.20.1 branch. The v1.20.1 branch does not need to be merged. Its purpose is for the v1.20.1 hotfix only, and that branch can be deleted. The release tag should be created from this branch, since this repository does not allow merge commits (so we will not get a clean fast-forward). For v1.21.0, simply omitting this PR will leave the options enabled, but a small fix is needed to show labels correctly, and this should be tested and get some design approval (the reason for not including this in the hotfix).

Related PRs:

gutenberg-mobile (hotfix): wordpress-mobile/gutenberg-mobile#1794
WordPress-Android: wordpress-mobile/WordPress-Android#11120
WordPress-iOS: wordpress-mobile/WordPress-iOS#13252

Description

This PR disables the gallery image size options on mobile. We can re-enable them after we've verified / implemented the desired behavior for mobile.

How has this been tested?

Tested on iOS via WordPress-iOS.

Steps:

  • Create a gallery block with some images
  • Tap the gallery
  • Tap the gallery settings icon (the gear)

Expected result:

The image size option should not be visible in the menu.

Screenshots

Types of changes

This uses the Platform.select function to provide an empty array of image size options on mobile, leaving web implementation unchanged. There is already logic in place to hide the option when the array is empty, so this is sufficient to hide the option on mobile.

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. .

@mkevins mkevins added Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] Gallery Affects the Gallery Block - used to display groups of images labels Jan 21, 2020
@mkevins mkevins changed the base branch from master to rnmobile/releases-2020 January 21, 2020 10:14
@mkevins mkevins changed the base branch from rnmobile/releases-2020 to rnmobile/release-v1.20.0 January 21, 2020 10:15
@mkevins mkevins changed the base branch from rnmobile/release-v1.20.0 to rnmobile/release-v1.20.1 January 21, 2020 16:16
Copy link
Copy Markdown
Contributor

@pinarol pinarol left a comment

Choose a reason for hiding this comment

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

LGTM! Tested with the direct app links in the main app PRs

@mkevins mkevins merged commit e9a0cb6 into rnmobile/release-v1.20.1 Jan 22, 2020
@mkevins mkevins deleted the rnmobile/fix-disable-gallery-size-options branch January 22, 2020 05:09
@mkevins mkevins restored the rnmobile/fix-disable-gallery-size-options branch January 23, 2020 00:05
@mkevins mkevins deleted the rnmobile/fix-disable-gallery-size-options branch January 23, 2020 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Gallery Affects the Gallery Block - used to display groups of images 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.

2 participants