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

fix how class names from core get passed through register block extension #193

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

fabiankaegy
Copy link
Member

Description of the Change

When filtering the editor.BlockListBlock to add a custom class name to it we need to ensure we correctly pipe through any already existing classes. This was done incorrectly. You can see an example of how core does it here: Here is an example of how it is done in core: https://github.com/WordPress/gutenberg/blob/70ba9218ae53e31d2c26689eed2e698dcea7f3aa/packages/block-editor/src/hooks/layout.js#L457-L460

How to test the Change

All tests should pass

Changelog Entry

Fixed - Make sure any class names which get added via editor.BlockListBlock filter get passed through correctly

Credits

Props @fabiankaegy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@fabiankaegy fabiankaegy added the [Type] Bug Something isn't working label Jan 24, 2023
@fabiankaegy fabiankaegy self-assigned this Jan 24, 2023
@github-actions
Copy link

Size Change: +12 B (0%)

Total Size: 38.3 kB

Filename Size Change
dist/index.js 38.3 kB +12 B (0%)

compressed-size-action

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

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

LGTM!

@fabiankaegy fabiankaegy merged commit 525be32 into develop Jan 25, 2023
@fabiankaegy fabiankaegy deleted the fix/pipe-through-class-names branch January 25, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants