Another feature request. Would there be any way to limit this behavior to custom inline blocks? We already have code in place to handle other kinds of blocks (in our case using Entity Browser Block to open entity browsers), and don't want that workflow hijacked. I guess ideally a configuration option to apply to all links (the default), or only specific kinds of blocks.

Comments

KarenS created an issue. See original summary.

johnwebdev’s picture

Status: Active » Needs review
StatusFileSize
new3.62 KB

Sounds like a good idea.

This patch does the job; but the user interface is not very user-friendly and you're expected to enter the plugin ids you want to be opened in a modal and if you leave it empty it's applied to all links. This user interface could be extended to support things like regexes so you don't have to enter ALL blocks of the same type (i.e. inline blocks), if we think the general approach is good enough.

Otherwise I'm open for ideas how the UI should function.

Setting to NR to see if it broke any tests.

johnwebdev’s picture

StatusFileSize
new4.17 KB
new422 bytes

There has been new permissions added to Layout Builder, let's run the tests again with that permission added to the test user.

johnwebdev’s picture

StatusFileSize
new5.02 KB
new2.12 KB
johnpitcairn’s picture

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.

hoporr’s picture

Patch does not apply to latest version of the module