Follow up to: #2781575: Determine ideal field order and visibility for "quick edit" blocks in off canvas tray
Problem/Motivation
Many block form that will open in the Offcanvas tray relate to other configuration on the site.
For instance
Search block -> search configuration
Aggregator feed block -> feed configuration
Book Navigation block -> Book settings
Shortcut blocks -> Edit shortcuts
If the user clicks on these blocks in Edit Mode they may actually want to change these settings
Or they may not know there are more settings or where to find the settings
Proposed resolution
Add links to related configuration pages.
Remaining tasks
Provide more off-canvas block forms
If Settings Tray becomes stable before this issue is committed, then the forms should be added directly to the block module.
User interface changes
New links on some blocks to configuration
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#2 | 2888567-2.patch | 10.5 KB | tedbow |
Comments
Comment #2
tedbowHere is patch that starts this for the Search block. It also adds the abstract class OffCanvasPluginFormBase because now that we will have more Off-canvas forms it makes sense have base class that takes care of common tasks.
Comment #3
Wim LeersVery good point!
However, it feels like:
this is not the responsibility of the Settings Tray module, but of the Contextual Links module — because it's really about adding more contextual links
which actually means it's the responsibility of the modules providing the blocks to provide these additional contextual links
but that means "per instance" and not "per type" contextual links, which the Contextual Links module was never designed for
IMO the ideal solution would be something like
and
Settings Tray specifically allows for in-place editing of blocks. We won't be able to offer that for this. You could argue these forms should show up in the Settings Tray — but very often, they have certain minimum width requirements (e.g. the search settings page). So I think a good first step would be to even just have these contextual links in the first place — that's already following the spirit of Outside In: surfacing the settings of something by clicking on that something. In a second phase, we could then make it work with Settings Tray's Off-Canvas dialog (i.e. #2784443: Move off-canvas functionality from Settings tray module into drupal.dialog.ajax library so that other modules can use it).
Comment #4
Wim LeersOh, wait, your patch in #2 is not suggesting to add more contextual links, but to instead add a link inside the Settings Tray form for a given block!
That could also work, but … wouldn't that be a bit strange, since it requires an extra click, an extra level of indirection? Wouldn't surfacing this as a contextual be faster/simpler?
I guess you could do both though:
Comment #6
tedbowChanging to new settings_tray.module component. @drpal thanks for script help! :)
Comment #7
fgm