Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295382

Allow modules to prevent certain Contextual links from being render

$
0
0

Problem/Motivation

follow up #3002608: Remove contextual links not related to layout administration inside layout builder blocks

In that issue we didn't want contextual links to be rendered inside elements that were in the Layout Builder to avoid the user thinking they were related to layouts and being rerouted from the page.

We were only able to do this by responding to the Javascript event drupalContextualLinkAdded and then removing the new link.

Although this works well it may cause unneeded requests to the server if the contextual links are not cached at that point on the client. If there was a way to prevent the contextual module from even adding the link this might be better.

But to be clear contextual links are cached in the clients browser local storage(which for clearing is sometimes maddening) so in most cases there will not actually be a server call. It could though also save Javascript resources.

Proposed resolution

Determine if need a way to do this or if the way Layout Builder did this is fine

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295382

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>