'On by default' setting is confusing

Created on 2 February 2024, 11 months ago
Updated 27 March 2024, 9 months ago

Problem/Motivation

I couldn't figure out what the 'On by default' setting on /admin/config/content/same-page-preview is supposed to mean. After diving into the code I discovered that it's a way to enable all node type checkboxes below at once.

Proposed resolution

Move the checkbox to the 'Content Type settings' fieldset and call it 'Enable for all content types'. Add JS that toggles the checkboxes below immediately instead of doing it in PHP, after form submit.

πŸ“Œ Task
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

  • Issue created by @dieterholvoet
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    What the "On by default" is intended to control is the ability to open the Same Page Preview iframe whenever content loads. The "preview" is "on" by default instead of being "on" whenever you click the preview button.

    For users (while using their device) would be overwhelmed by this, keeping this feature is an important consideration.

    Is your issue the nameing of the Setting or it's logical organization?

  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    Mostly the naming, maybe it would be better to change the label to the same one that's used in the preview page: 'Open preview by default'. Looking at the code again, I can't seem to figure out where this setting is being used. Are you sure it's being used at all?

  • Merge request !60Change element label β†’ (Open) created by dieterholvoet
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    It's intended to be used when the node_edit page is opened to determine if the preview should launch immediately, or when the user clicks the preview button.

  • πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

    Yes, but can you share where exactly in the code this value is read? Because I can't seem to find it.

Production build 0.71.5 2024