tomusborne / generateblocks

GenerateBlocks is a small collection of lightweight WordPress blocks that can accomplish nearly anything.
https://generateblocks.com
188 stars 18 forks source link

Fix: Broken pattern preview in bulk select mode #1237

Closed tomusborne closed 1 month ago

tomusborne commented 2 months ago

This fixes a bug where the preview pattern feature doesn't work if the pattern isn't in the current list of patterns being displayed.

https://github.com/tomusborne/generateblocks/assets/20714883/374898c7-e56f-4b88-8092-12caf563e82f

This PR disables the button if the preview isn't available. A better solution would be to have the patterns always be available, but I believe this would require a refactor of how we filter the pattern list.