Repository navigation
Implement the custom classname support hook in the server - #24483
Conversation
77141d7 to
7e93d38
Compare
|
Size Change: +3.33 kB (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Tested this out on 'Site Title' block and can verify the custom class name is now applied correctly on the front-end! 🎉
This looks good to me, as it follows the standard convention for the rest of the supported styles (minus the slight change to default true since it is an opt-out setting?)
I assume we should probably expand the test file to include this as well? Generally for each style I have added 1 test to ensure the style is added when expected, 1 test to ensure the style isnt added when unsupported, and generally update the all-applied test to include it as well. With a lot of styles being supported this convention is growing the file quite a bit, so maybe you have other ideas? Although, it is simple enough to create new ones with copy/paste and minimal alteration as the format is very similar for them all. 🤷♀️
|
Thanks for testing @Addison-Stavlo I've added a unit test. |
In different dynamic blocks, we support custom class names in the server in an Adhoc way and now that we have the block-supports handling on the server as well, this PR implements it automatically for all these blocks.
There are still other hooks that could benefit from a similar approach: anchor, generated classname.
Testing instructions
Check that custom classnames work for these blocks (editor and frontend)