Provide option to display contextual links on embedded entities

Created on 1 October 2020, over 3 years ago
Updated 25 March 2024, 3 months ago

Problem/Motivation

The Media Embed filter plugin currently removes contextual links from embedded media. The code mentions:

// - Contextual Links do not make sense for embedded entities; we only allow
//   the host entity to be contextually managed.

However, I think the ability to contextually manage items is exactly why I'd rather embed media than insert an image directly in my content. For example, I could have an "Attribution" field on an image bundle, and want to provide users the ability to edit that attribution wherever that image appears. Same idea with some image style implementations that use cropping, if you are editing content, and see a weird crop in an embedded image, it's a much better UX to edit the image in place, than to click over to the media library, brainstorm what title search might correspond to this image, page thru results...

Proposed resolution

Add a checkbox to the settings form for the Media Embed filter that allows users to opt in to contextual links on embedded media.

Remaining tasks

User interface changes

New option on Media Embed filter settings form, defaulting to current behavior.

API changes

NA

Data model changes

Add new field to filter_settings.media_embed
File: core/modules/media/config/schema/media.schema.yml

    show_contextual_links:
      type: boolean
      label: 'Show contextual links for embedded media'
✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 15 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States xaqrox Washington, D.C.

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024