forumone / gesso-wp

Gesso WordPress theme
34 stars 17 forks source link

styleguide / demo content as theme include #384

Closed jackmakesthings closed 4 months ago

jackmakesthings commented 1 year ago

To discuss - what takes the place of pattern lab / storybook in gesso 5? Blockbook exists, but seems to be unmaintained, and may not work well with the dynamic blocks we're using (PHP-templated).

I think a good temporary solution might be a styleguide block pattern or template, included with the theme, that displays headers, lists, paragraph styles, etc. Common essentials. Setting it up as a block pattern would make it easy to add to as the site is developed - we could even break it down further, have one pattern for color swatches, one for headers, etc.

Should do some research before starting this as someone else may have already built it.

jackmakesthings commented 1 year ago

WP 6.2 includes Style Book as part of the Global Styles interface. (At this time it looks like FSE must be enabled to access this.)

Style Book shows all blocks & patterns available. Core blocks work out of the box; for custom blocks, example should be set in and inserter should not be false in block.json.

We may still want to consider a "kitchen sink" block pattern for non-FSE sites.

tropicandid commented 11 months ago

Likely we will not pursue this as the LOE of actually implementing pre-fabbed styled blocks is more effort than just creating a page with components. It would be wise to implement Style Book once we officially begin to leverage FSE

cssgirl commented 4 months ago

While we are still waiting on StyleBook and/or some other option I added a new pattern called "Kitchen Sink" via PR https://github.com/forumone/gesso-wp/pull/444. This pattern can be added to a page or any other content type and display most of the core blocks provided by Gesso. This is a good way to allow clients to preview blocks without something like Stylebook where they could inadvertently change things.

Devs can also add the custom blocks and patterns they have build for a project to this pattern.

See: https://github.com/forumone/gesso-wp/blob/40d4c2a5e3c6ffc28410e342cbdf83d1cc2d756a/patterns/kitchen-sink.php