Problem/Motivation
#1043198: Convert view modes to ConfigEntity introduced a UI for view modes. This is completely detached from Field UI, though, for now.
@yoroy proposed the following in comment #139 over there:
- I was surprised to see the listing/add/edit of view modes tucked away in an admin/configuration sub page. Thinking about them in the context of content types, why not allow to add them in-context?
mockup showing expanded Advanced display settings fieldset expanded, with a text field and add-link below the checkboxes for already existing view modesAnyway, yay for any progress being made here. View modes rule.
@tstoeckler's response:
How do you envision editing and deleting view modes, then, though? Also we've always allowed to change the machine name (for advanced users), which doesn't seem to be part of your proposal.
and @yoroy's response:
My mockup was mostly an incomplete sketch to stir the pot a bit :) There would still need to be a central place to manage/edit/delete view modes for sure.
Proposed resolution
We'll see.
Remaining tasks
Discuss.
User interface changes
We'll see.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| addnewviewmode.jpg | 44.4 KB | tstoeckler |

Comments
Comment #1
swentel commentedThis actually dependent now on #2029321: Provide list and form controllers for EntityViewMode and EntityFormMode
Comment #2
Bojhan commentedIn [#2029321#comment-7644783] alex suggests:
Which translates to a UI like this:
EDIT: the edit button should be an enable button, for the cases where its "no"
Comment #3
swentel commented#2029321: Provide list and form controllers for EntityViewMode and EntityFormMode is in.
Comment #4
yched commentedThe list of view modes is by entity type.
Both the OP and #2 put this in a UI context that is restricted to a specific bundle, while changes done here will have effect on all other bundles, which is going to be misleading.
This was the whole challenge about a "View modes" UI - they affect the whole of an entity type, and we have no generic place in the UI that talk about "entity type X" (for whatever value of X). We only have pages that talk about "bundle Y in entity type X".
Comment #5
Bojhan commented@yched I am not sure I follow. This is per content type. Not for all nodes. This is merely a different view of the same data, that currently has a UI
Comment #6
tim.plunkettWhen you add a new view mode for a content type, all content types get it. That's always how the API has worked, for better or for worse.
Comment #7
Bojhan commentedAhh, this is about the proposal in #1. I agree, that could be confusing. It might make more sense for that action to do link to the view modes UI, yoroy what do you think?
Comment #8
yched commented@Bojhan: Bottomline is: you can't add or remove a view mode on just "article" nodes. You add or remove a view mode on "node" entities, and all node types will be affected.
Comment #9
Bojhan commented@yched Yes, but we can enable. Which is what #2 is about. Let me talk to yoroy about this.
Comment #10
klonos@Bojhan, #2: I've split the first part to #2186359: The "Manage display" tab label when editing an entity should be "Manage displays" (plural) instead.
We're still doing this. Right?
Comment #11
vbouchetThis ticket seems related.
Comment #25
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #26
smustgrave commentedSeems more like a feature request. WIth so many years without movement is this still needed? There's the link on field UI to go to the view mode page that count?