vigetlabs / wordpress-site-starter

2 stars 0 forks source link

[#84] Parts Kit Integration #101

Closed bd-viget closed 2 weeks ago

bd-viget commented 3 weeks ago

Summary

This PR adds a version of the Parts Kit integration to WP Site Starter. I went back and forth with rending the block content vs rendering the block inside a standalone Block Editor, but ultimately ended up just displaying the rendered block. This isn't a perfect solution because some blocks do not return any HTML when using render_block().

Features

Issues

Testing Instructions

  1. Go to WP Admin > Tools > Parts Kit
  2. Use the navigation to the left to review the supported blocks.

Screenshots

Screenshot 2024-06-12 at 10 07 17 AM

Known Issues

These are things I have just learned to live with for now until we have more time to put into this:

  1. Most of the code to render the Block Editor inside the Parts Kit is still in this PR - I made some good progress on this, but hit a few roadblocks trying to get it to recognize custom blocks as well as generate the correct expected markup to pre-load a block.
  2. I have no idea why some of the Core blocks do not have any output (like Details, which also affects the Accordion component)
  3. When viewing the Navigation Container block in "Mobile" view, the menu toggle doesn't work (not sure if this is a pointer-events: none issue, or a JS loading issue).

Future Enhancements

  1. Support for Patterns - Make a separate group in the sidebar to render patterns, both built-in and created in the FSE.
  2. Better Core Block Support
  3. Better support for sample content (images, videos, etc)
  4. Get the Standalone Block Editor working
  5. Group Blocks By Block Category (rather than Namespace)