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

Gallery block: Re-introduce v1 #41465

Closed
fluiddot opened this issue May 31, 2022 · 0 comments · Fixed by #41533
Closed

Gallery block: Re-introduce v1 #41465

fluiddot opened this issue May 31, 2022 · 0 comments · Fixed by #41533
Assignees
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) [Priority] High Used to indicate top priority items that need quick attention

Comments

@fluiddot
Copy link
Contributor

What problem does this address?

The Gallery block supports two different versions of the block:

  • v1: The gallery item is rendered using a custom component.
  • v2: The gallery items are rendered as inner blocks using the Image block.

The version to use is determined by the global variable galleryBlockV2Enabled that is populated using the editor setting named galleryWithImageBlocks. Due to the changes from this PR, the native version of the editor is now always using the v2 even if the site doesn't support it.

What is your proposed solution?

Re-introduce the v1 by adding a condition to the following code to check if the platform is native:

if ( process.env.IS_GUTENBERG_PLUGIN ) {

@fluiddot fluiddot 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 May 31, 2022
@fluiddot fluiddot added the [Priority] High Used to indicate top priority items that need quick attention label May 31, 2022
@fluiddot fluiddot self-assigned this Jun 1, 2022
@fluiddot fluiddot linked a pull request Jun 3, 2022 that will close this issue
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) [Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant