pronamic / wp-pronamic-events

Pronamic Events is a basic plugin to add some Events functionality.
http://www.pronamic.eu/plugins/pronamic-events/
5 stars 3 forks source link

Block type naming? #32

Closed remcotolsma closed 2 years ago

remcotolsma commented 2 years ago

We are working on 3 blocks for Pronamic Events:

Currently i use the following naming:

Documentation:

The name for a block is a unique string that identifies a block. Names have to be structured as namespace/block-name, where namespace is the name of your plugin or theme.

This results in the following code:

<!-- wp:pronamic-events/event-start-date {"format":"d.m.Y"} /-->

<!-- wp:pronamic-events/event-end-date {"format":"d.m.Y"} /-->

<!-- wp:pronamic-events/event-location /-->

And the following HTML output:

<div class="wp-block-pronamic-events-event-start-date"><time datetime="2022-05-03T00:00:00+02:00">03.05.2022</time></div>

<div class="wp-block-pronamic-events-event-end-date"><time datetime="2022-05-05T00:00:00+02:00">05.05.2022</time></div>

<div class="wp-block-pronamic-events-event-location">Some location</div>

We could also choose for the following shorter naming:

I think I prefer the longer notation, WordPress also uses post-date and not just date:

<!-- wp:post-date {"format":"F j, Y g:i a"} /-->

@kjtolsma @rvdsteege What do you think?

rvdsteege commented 2 years ago

I'd go with the long format too. The long format makes clear that it is the start date of a single event.