Problem/Motivation

Our projects never use the default view mode for entity types. Our "default" would generally be "full." As such, whenever we try to use the Layout Paragraphs Builder (Experimental) formatter, there is an option to choose the edit view mode only. The view mode shown to the end user is always default.

Proposed resolution

My suggestion is to allow setting the displayed view mode, like the other Layout Paragraphs formatter allows.

Remaining tasks

Review and test the supplied patch

User interface changes

This will add a "View Mode" selector to the widget settings.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

swilmes created an issue. See original summary.

swilmes’s picture

Issue summary: View changes

sethhill made their first commit to this issue’s fork.

sethhill’s picture

Status: Needs review » Reviewed & tested by the community

I added to the patch that @swilmes posted, displaying the view mode and preview mode by name. I also added the view_mode to the config schema and ensured that phpunit tests are still successful. This looks good from my perspective.

sethhill’s picture

Status: Reviewed & tested by the community » Fixed

sethhill’s picture

Status: Fixed » Reviewed & tested by the community
naveenvalecha’s picture

Thank you for the PR. We are using PR on a big customer website and its working fine for us.
RTBC +1
Looking forward to get this in soon :)

  • sethhill committed 03a79acc on 2.0.x
    git commit -m 'Issue #3440313 by sethhill, swilmes, jnettik: Allow View...
naveenvalecha’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for merging it
Marking this as fixed.
Looking forward to see you in #3417765: Large modal exceeds viewport height without scrollbar = actions unreachable

sethhill’s picture

Status: Fixed » Closed (fixed)
james.williams’s picture

What is the difference between the view_mode and preview_view_mode settings please? I only see the original preview_view_mode (and form_display_mode) making any difference. It looks to me as though preview_view_mode makes the idea of view_mode redundant, in which case view_mode should probably be removed?