Repository navigation
Block library: Standardize file structure of core blocks - #14743
Conversation
c225b78 to
6546a64
Compare
|
|
||
| return ( | ||
| <RichText | ||
| identifier="values" |
There was a problem hiding this comment.
Sometimes we seem to set these as constants, other times not. Would it be good to standardise this too? Personally, I feel like the constants are good, but a separate file for it a bit too much.
There was a problem hiding this comment.
Yes, we should both ensure they are provided and figure out what's the best way to encode them. We can't use constants inside block.json files but maybe it would be possible to create ESLint rule which would ensure that identifiers use the existing attribute's name.
ellatrix
left a comment
There was a problem hiding this comment.
Looks good. Personally I think the contants file is a bit too much, especially if we will have them for all blocks.
As it turns out in #14770, I figured out that constants don't play well with |
Description
This is trying to bring the structure of core blocks closer to what is proposed in block registration RFC #13693. In particular, it ensures that:
editmethods are moved to their own fileExtracting SVG icons is going to be a good step towards exploring how #14628 could be achieved as all SVG based icons would be located in their own files making it easier to reason how to convert them to the current form from the commonly known file format.
Testing
Ensure all block icons in the inserter display as before for core blocks.
Follow-up task
savemethods as well.transformsormerge.