Skip to content

Conversation

nathan-schmidt-viget
Copy link
Contributor

@nathan-schmidt-viget nathan-schmidt-viget commented Nov 8, 2024

Summary

This adds the Dialog block to the site starter. It has a very basic style, one the WP page editor it opens inline and on the frontend it opens as a dialog window.
The block is a wrapper so any block (custom or core) will render inside of the dialog.

@bd-viget added a ACF field for the open button text, not sure if there is a better way to build it.

Issues

Testing Instructions

  1. Add the dialog block and add blocks inside of it.
  2. Test out different blocks inside of the dialog.
  3. Dialog opens when you click the "open" button.
  4. Closes when you click the "close" X or when you click outside of the dialog.

Screenshots

Screenshot 2024-11-08 at 12 06 39 PM Screenshot 2024-11-08 at 12 06 54 PM

Comment on lines +35 to +36
"viewStyle": "file:./view.css",
"editorStyle": "file:./editor.css",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice to have style for both!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the alpine.js is from blueprint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor did all the heavy lifting of moving its from PHP to Twig. 🎉

Copy link
Contributor Author

@nathan-schmidt-viget nathan-schmidt-viget Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we could add a ACF field or if there is another way to do it.

@nathan-schmidt-viget nathan-schmidt-viget marked this pull request as ready for review November 11, 2024 13:30
@bd-viget bd-viget force-pushed the ns/148-modal-block branch from 56455b6 to ad22c0d Compare July 17, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants