Remove comment and node preview

Created on 20 October 2021, over 3 years ago
Updated 19 November 2024, 3 months ago

Problem/Motivation

Comments and nodes both offer 'preview' functionality: when you're creating or editing the entity, there's a preview button on the form, and it will show you an approximation of what your node or comment looks like.

However it's not a real preview, because it doesn't and can't show the entity in its usual context (different view modes, or the comment in the hierarchy) - it's just a special one-off, very hacky (relies on $node->in_preview being set dynamically) render of the entity.

Steps to reproduce

Proposed resolution

For nodes, we already have a full, in-context preview functionality via the workspaces module. You can even make multiple related changes to different entities and preview how they will look altogether. Great, why keep the 15 year old hack around when we have that?

For comments, I do not remember being given the opportunity to preview a comment in any non-Drupal website for many, many years. Formatting is already 'previewable' via wysiwyg, this is enough.

Remaining tasks

Decide that we want to get rid of this feature. Then remove it entirely with no replacement.

User interface changes

API changes

Code responding to ::in_preview won't have to do so any more, but otherwise it will just be a button removed from the entity forms.

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

entity system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

Sign in to follow issues

Comments & Activities

Not all content is available!

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

  • 🇦🇺Australia pameeela

    +1 to this, I'd like to disable it for the content types that we ship Drupal CMS with, but am hesitant to do that when the core default is still 'Optional'.

Production build 0.71.5 2024