Change record status: 
Introduced in branch: 

In Drupal 8.0.x the UI allows us to create a new view mode for a comment type, but there is no way to use that view mode without writing a custom formatter. Ideally, there should be a setting on the built-in comments formatter that allows us to specify a particular view mode should be used for the comments on a particular content type.

Proposed resolution

Add a new Comment field formatter setting view_mode, defaulting to default.
Add an update path to set this setting on existing formatters.
Test the update path test.
Allow the new setting to be configured from the view display form.
Calculate dependencies for the new setting and add appropriate reactions on dependency removal or disable.

TL;DR: Site builders are able now to configure what view mode is used when showing a comment.

Site builders

By default, comments are rendered using the default comment view mode. But Drupal 8 allows the creation of several view modes for an entity, consequently for a comment. Prior to this change, a site builder was not able to change the view mode used to show the comment list on a specific host entity. This was possible only by extending the CommentDefaultFormatter in a new class and override there the view mode used.

Now, site builders can configure the comment view mode in the comment field formatter form, along with other formatter settings (like pager_id).


The comment field default formatter (CommentDefaultFormatter) has a new configurable setting: view_mode that defaults to 'default'.

Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done