Skip to content

Conversation

@glendaviesnz
Copy link
Contributor

Description

There have been issues with getting auto migration of v1 gallery blocks stabilised for the 5.9 release so this PR disables the v2 Gallery block. If the decision is made to pull the v2 Gallery block from 5.9 then this PR would be merged and cherry picked to 5.9 and then this commit would be reverted on trunk so the v2 Gallery blocks are still available in the plugin.

How has this been tested?

  • Check out this PR to a local dev env
  • Add a Gallery block and make sure it is the v1 format - it will have move icons in the image as in the screenshot and nested images in a <ul> structure rather than nested image blocks.
  • Check that block remains as v1 when editor refreshed and that it displays as expected in the frontend

Screenshots

Screen Shot 2021-11-16 at 9 50 57 PM

@glendaviesnz glendaviesnz added the [Block] Gallery Affects the Gallery Block - used to display groups of images label Nov 16, 2021
@glendaviesnz glendaviesnz self-assigned this Nov 16, 2021
@ocean90
Copy link
Member

ocean90 commented Dec 5, 2021

Currently the block is not enabled at all in WordPress 5.9 beta, because __unstableGalleryWithImageBlocks is false by default and there's no filter in core which enables it.

__unstableGalleryWithImageBlocks: false,

@glendaviesnz
Copy link
Contributor Author

@ocean90 the gallery block will be enabled in 5.9 beta 2 with this PR, along with auto migration of the old block content to the new version on edit.

This PR was just here in case we couldn't get the gallery migrations working and had to pull the new gallery from 5.9, so closing now. We have some tidy up to do to remove all the references to __unstableGalleryWithImageBlocks but need to co-ordinate with the mobile team on that as some old versions of the app will still be expecting this.

@glendaviesnz
Copy link
Contributor Author

glendaviesnz commented Dec 6, 2021

@ocean90 the gallery block will be enabled in 5.9 beta 2 with this PR, along with auto migration of the old block content to the new version on edit.

Just to expand on this, this PR is also needed to enable the Gallery block on 5.9 beta 2.

@johnbillion johnbillion deleted the revert/gallery-v2-for-wp-5-9 branch April 22, 2025 10:20
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants