GithubHelp home page GithubHelp logo

Comments (5)

luisherranz avatar luisherranz commented on June 7, 2024

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 πŸ™‚

Can we consider whether View is a better nomenclature to use than Frontend

Sure. I used the frontend name because there is a possibility that we want to differentiate between the current view script enqueuing behavior, which is always enqueued, and an enqueuing that is deferred in time based on the different hydration technique, which may need a different name. But it's not even clear if we won't be able to do so with backward compatibility with view, so I agree to keep the view name for now. We'll make a PR to change it πŸ™‚

wp-block vs block- instead of gutenberg-

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 wp- feels a bit weird to me.

Should we try to use a generic block- name then? It looks nice and clean, but it feels a bit riskier because both the event and the custom element namespaces are public.

<interactive-block>
<inner-blocks>
new CustomEvent( 'block-context', {} )

And what do you think about wp-? Is it ok to use, even if Gutenberg is used outside of WordPress?
(Maybe as a reminder that Gutenberg is still a WordPress initiative πŸ˜„)


For what is worth, if I had to vote right now, I think I'd go with the generic names.

from block-interactivity-experiments.

mtias avatar mtias commented on June 7, 2024

I recall the wp- prefix was configurable at some point, at least for block parsing + serialization, but it's also hardcoded in many classes, docs, etc. I'm fine trying the generic block name first, though I don't like interactive-block :)

from block-interactivity-experiments.

luisherranz avatar luisherranz commented on June 7, 2024

I recall the wp- prefix was configurable at some point

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 wp-block, drupal-block, xxx-block…).

though I don't like interactive-block :)

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?

<block-root>
  <div>my block...</div>
</block-root>

from block-interactivity-experiments.

mtias avatar mtias commented on June 7, 2024

wp-block seems better than block-root :)

from block-interactivity-experiments.

luisherranz avatar luisherranz commented on June 7, 2024

I've opened a PR to make these changes.

I'm still not convinced with the wp- prefix coupling, though πŸ™‚

from block-interactivity-experiments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.