Allow selection to override any view mode

Created on 13 October 2023, about 1 year ago

Problem/Motivation

Currently the view mode override only applies to a single other view mode. Our use case requires the selected view mode to override any arbitrary mode inherited by the parent entity; specifically layout paragraphs that already have a view mode override, however this could equally apply to e.g. blocks placed in layout manager with a specific view mode

Steps to reproduce

  1. Create a layout paragraph in a node with a view mode selected
  2. Add another paragraph inside the layout where the view mode to override matches the containing node but is different from the layout paragraph's
  3. Set the view mode of the inner paragraph
  4. Save the node
  5. Observe that the inner paragraph has the view mode of its containing layout paragraph rather than the one selected for it.

Proposed resolution

Add an extra option "Any" to the override selection and corresponding logic in the view mode alter hook to allow arbitrary override of the paragraph view mode

User interface changes

Single option "any" added to the configuration option "Select which view mode to override":

API changes

N/A

Data model changes

N/A

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇦🇺Australia Agileware

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024