- π³πΏNew Zealand john pitcairn
I built a fairly hacky system on top of Layout Paragraphs module that gave users the ability to decide how the dialog should open. That proved very useful and worked something like this:
- Everything opens in the off-canvas sidebar dialog by default.
- A "pop-out" icon is added to the sidebar dialog title bar next to the close icon.
- Clicking that closes the dialog and reopened it as a modal.
- A "pop-in" icon is added to the modal dialog title bar next to the close icon.
- Clicking that closes the modal dialog and reopens it as a sidebar.
- A dialog type identifier class is added to the dialog.
- The user's choice is remembered in browser localstorage, per dialog type.
Maybe that's not appropriate as a solution here, but I'll probably need to replicate it for Layout Builder as we move away from Layout Paragraphs, so thought I'd mention it as a possible direction. The nice thing about is you could set some broad defaults then leave it up to the user.