slimndap / wp-theatre

A free plugin to publish your events on a WordPress website. Perfect for theaters, music venues, cinemas and festivals.
https://wp.theater
GNU General Public License v3.0
40 stars 23 forks source link

Frontend output #320

Open slimndap opened 1 year ago

slimndap commented 1 year ago
atkozie commented 11 months ago

Well this is affirming! I've wrestled mightily with styling the front end of this plugin.

slimndap commented 11 months ago

Please feel free to submit improvements.

atkozie commented 11 months ago

Individual control over the datetime components would be helpful. It all outputs as one piece of html, so I can't for example use CSS remove the year from the datetime like my client wants.

I've been digging through the files of the plugin to try to find a way to rip out the year output, but I only sort-of read PHP and JS, and I definitely don't write it. So I was unsuccessful.

slimndap commented 11 months ago

Currently it would require a programmer to write a little bit of custom PHP code. The output of the startdate can be changed by using the wpt/event/startdate filter.

carstingaxion commented 9 months ago

I also thought about this now, had a look across all add_shortcode calls and their output and came to the following:

  1. Given, that we come to a new data architecture, using post_types, taxonomies and shadow-taxonomies, etc., so that we can make more efficient calls based on WP_Query using core functions.

  2. And decide to not further support classic themes with the new version ⚠️

  3. We can simply go on and create a bunch of blocks, which are (by design) able to replace a defined shortcode - incl. it’s attributes - into one or more blocks by itself using block transforms.

  4. @slimndap All of your reasonable pain-points regarding

    • outdated HTML
    • responsiveness
    • accessibility
    • and even additional views … will be (at least party) covered by core blocks, which we will leverage the most - I suggest
  5. By creating only core block-variations rather than new custom blocks, we don’t have to worry about most of the UI stuff, instead we will get progressively enhanced blocks, reliably tested and with the best integration for the world of (block)-themes. IMHO Most of the found shortcodes could be transformed into variations of the core query-block.

  6. The coming block-bindings API will be the second important piece, as it allows us to connect the existing post_meta data to be rendered into core-blocks super easily! This would also be the way to go with the datetime-component mentioned by @atkozie

  7. For many of the existing options related to the visibility of particular features, like for e.g. the existing Show event list on production template we now have block-hooks, which will allow us and existing users to do a theme switch easier, because some of the structure of a classic template can be regenerated on-the-fly even with an empty theme. This should help us a lot providing a nice upgrade-experience.

What do you (all) think about the proposed way?

I‘ll try to create some demo blocks based on existing shortcodes or post_meta or both in my repo dedicated to theater production blocks, let’s see.

(Edit: Added number 7, which I forgot when submitting the comment)

carstingaxion commented 9 months ago

The essence of my thoughts have already been here on the repo:

The front end output is very clean, to ensure accessibility and compatibility with themes and can be customized using hooks and template files.

Source: @slimndap #321

carstingaxion commented 9 months ago

First tests were successful.

https://github.com/users/slimndap/projects/2/assets/198883/55468ccc-71a9-4259-896d-a42bb6d290e1