godaddy-wordpress / godaddy-wordpress/coblocks

ISBAT Have blocks with an attribute named Animation w/o breaking

Open
#2,623 0 comments 0 reactions 0 assignees View on GitHub
[Priority] Low [Type] Bug
Dominant language
JavaScript
Stars
794
Forks
142
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug:

I should be able to filter blocks that I do not want being accessed via this `LayoutPreview` / `sanitizeBlocks` function [Code Here](https://github.com/godaddy-wordpress/coblocks/blob/334b49bfe20d19c64fc9cd87e61812bc3b3e6197/src/extensions/layout-selector/layout-selector-results.js#L68). Coblocks is currently breaking our Block Previews, as we also use an attribute named `animation`.

### To reproduce:

1. Have a non-Coblocks block that has an attribute named animation, where that attribute is expected to exist for render.
2. Have both Plugins active. Load a block preview for
3. See Error

### Expected behavior:

We would expect you to be targeting only Coblocks blocks.

### Screenshots:

### Isolating the problem:

- [ ] This bug happens with no other plugins activated
- [ ] This bug happens with a default WordPress theme active
- [ ] This bug happens **without** the Gutenberg plugin active
- [ ] I can reproduce this bug consistently using the steps above

### WordPress version:

6.7

### Gutenberg version:

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.