WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

New Block: Dialog Popup #61297

Open bhubbard opened 6 months ago

bhubbard commented 6 months ago

What problem does this address?

Popups are very common for websites, and its a common request.

What is your proposed solution?

Creating a new block for popups using the dialog html element: https://www.youtube.com/watch?v=ywtkJkxJsdg

paaljoachim commented 3 months ago

I am thinking this plugin is something to take a closer look at: https://wordpress.org/plugins/makeiteasy-popup/

I found out about the plugin as the author mentioned it in the Advanced WordPress Facebook group here: https://www.facebook.com/groups/advancedwp/posts/8230806923648116/

Here are some of the things the author wrote: "It is about popup. I developed a popup block and tried to make it extensible and configurable, ready to use in production. It has many features and follows best practices of core blocks development, which means you can style it inside block editor with native block editor controls and you can insert any number of other blocks in it. I think it is ready for production sites, check it out! Please write your remarks and suggestions, so I can improve it. I believe block with so many features can easily be charged for, but I offer it for free."

"...to provide a block which would be close to core blocks and give users options which they often need. I started this block when dialog element was very new, I am planning to switch to dialog element."

sethrubenstein commented 4 days ago

I'm finalizing a set of <dialog/> blocks that utilizes the Interactivity API for a project we're working on for release in February 2025. I could easily modify this to be more Gutenberg/Core friendly, if there's agreement that this would be a good fit for the core block library?

https://github.com/user-attachments/assets/6e57d6d1-ee13-4f67-9872-a580966b8d59

paaljoachim commented 4 days ago

I will ping a few folks so they can give feedback. @SantosGuillamot @michalczaplinski @WordPress/interactivity-api

michalczaplinski commented 5 hours ago

I would love to see more Core blocks that leverage the Interactivity API! 🙁

That said, with dialogs there are a11y concerns that I'm not an expert on. I don't have a strong opinion on whether this should be in Core or is more of a plugin territory but perhaps @WordPress/gutenberg-core does.