-
Notifications
You must be signed in to change notification settings - Fork 11
Nomenclature suggestions #37
Comments
Hey Matías, thanks for chiming in because, as far as I know, most of the contributors collaborating here are not familiar with Gutenberg nomenclature yet (me the first!), so the sooner we learn about it, the better 🙂
Sure. I used the
This has been more of a surprise to me. So it looks like Gutenberg is only the project name, but none of the APIs should have the Gutenberg name. Is that correct? On the other hand, now that Gutenberg is being adopted outside of WordPress (Drupal, Tumblr, Laravel...), using Should we try to use a generic <interactive-block>
<inner-blocks> new CustomEvent( 'block-context', {} ) And what do you think about For what is worth, if I had to vote right now, I think I'd go with the generic names. |
I recall the |
Oh, that's a good idea if a prefix is unavoidable. However, I'd use it with care because it could cause extensibility problems (generic code that needs to target
It's true that we could end up using it for non-interactive blocks (maybe to store things like static Block Context) and it's not part of the block itself, so what about <block-root>
<div>my block...</div>
</block-root> |
|
I've opened a PR to make these changes. I'm still not convinced with the |
Great to see all the explorations and progress. Even though nothing is finalized yet, it seems timely to look at the API surface and some of the naming conventions to ensure we are putting forward the best possible set of tools.
Can we consider whether
View
is a better nomenclature to use thanFrontend
?and
Registration
Same goes for other APIs like events and attributes:
Similarly
data-
attributes should useblock
orwp-block
instead ofgutenberg
namespace.Custom Elements
Super interesting to see the use of custom elements, I think it's a good path forward. I'd suggest improving the names as well:
Can we assume interactivity if it's declared as a custom element?
The text was updated successfully, but these errors were encountered: