Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DX] Add settings/page for contextual links settings #5404

Open
bugfolder opened this issue Dec 17, 2021 · 1 comment
Open

[DX] Add settings/page for contextual links settings #5404

bugfolder opened this issue Dec 17, 2021 · 1 comment

Comments

@bugfolder
Copy link

This issue is in response to this comment (also here).

The basic idea is to add a extensible settings page for contextual links (e.g., modifiable via hook_form_FORM_ID_alter()) that provide a place to turn on/off and/or modify different aspects of Contextual Links.

A suggested place would be admin/config/administration/contextual-links, which seems to fit, and would also help provide a reason for admin/config/administration to have a submenu (currently there's only one submenu item, admin/config/administration/admin-bar).

An example use case—which also creates the setting page—is PR backdrop/backdrop#3790, which creates layout and theme-related contextual links, in response to #2626. (At this point, it's looking like a different PR that doesn't create contextual links will solve that issue, but this is an example of the type of setting that would belong there.)

It would also be a good home for the settings in Layout Contextual Links module (which is the contrib version of PR backdrop/backdrop#3790).

Other possible use cases that have been mentioned in discussions include finer-grained controls on which contextual links to display, to allow site-builders to turn on/off contextual links selectively, or to optionally add additional information to contextual links (e.g., the title of the thing being linked to).

At this point (assuming that PR backdrop/backdrop#3790 doesn't go forward), there's not yet a specific proposal for something to include in this settings page, but adding the issue here (per @BWPanda's comment) so that it doesn't get lost, and perhaps future proposals of modifications to contextual links that need their own settings can extend or link to this issue and resurrect the concept.

@klonos
Copy link
Member

klonos commented Dec 27, 2021

Contextual links are a separate module, so they can be turned on/off site-wide by enabling/disabling the module. The module also provides a "Use contextual links" permission, so site admins have a way to control for which users the links should be available. What we don't have is:

  • a way to exclude/include paths where contextual links should/shouldn't be shown.
  • a way to enable/disable specific type(s) of contextual links (implementations of hook_contextual_links_view_alter() or menu items that specify 'context' => MENU_CONTEXT_INLINE I guess).

The above are the only things that I could think of that could be settings provided by core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants