neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

Modal API for the backend modules #3317

Open markusguenther opened 3 years ago

markusguenther commented 3 years ago

Description

Sometimes when you develop a backend module you need a small verification from the user. For that we have modals in the user management module or the Media module.

In the older backend modules these Modals always have fluid templates and a small JS component opens a Modal with the HTML content. But as you not always want to render modal markup in your templates it would ne nice to have a little JS API to open a modal.

We already extended window.NeosCMS with Configuration and Tools in https://github.com/neos/neos-development-collection/pull/3302

So my suggestion would be that we also have window.NeosCMS.Modal to open a confirmation modal that has the look and feel of neos.

const confirmModal = new window.NeosCMS.Modal('title', 'My message', options)

And in the options we can define things like buttons with callbacks or if the modal should not open immediately.

Expected behavior

Modals should look like that: Screenshot 2021-03-22 at 20 26 26

Actual behavior

And not like that (RedirectHandler UI) Screenshot 2021-03-22 at 20 26 06

markusguenther commented 3 years ago

Hope that I will find time to bring that into 7.1 but first we need to get the emberjs stuff merged 🤞

mhsdesign commented 4 months ago

If the masterplan works this will be part of https://github.com/neos/neos-ui/issues/3119