Problem/Motivation
Follow up for #29338-61: Hide Promoted/Sticky fields by default in Form display. We have changed the default behavior for new content types so that the Promoted and Sticky checkboxes are hidden by default in the form display configuration (but can be un-hidden by a site builder).
Page nodes are not conceptually designed to be in a feed where they would be promoted or sticky, so it would make sense to change the default config for the page content type in Standard and Umami so that these fields are also in the hidden section of the form display.
Proposed resolution
- Change the default config of:
core/recipes/standard/recipe.yml- Standard's
core.entity_form_display.node.page.default.yml - Umami's
core.entity_form_display.node.page.default.yml - etc.
- Do not change the default form configuration for content that does belong in a feed, like articles, announcements, and possibly Umami recipes.
- Do not provide an upgrade path. This is a change to a default value for new sites only. Sites own their config once it is installed and can configure the forms for their content types however they want.
Remaining tasks
TBD
User interface changes
Form elements for "Sticky at top of lists" and "Promote to front page" no longer appear in the sidebar of every single page created in a Standard install.
Introduced terminology
None.
API changes
None.
Data model changes
None.
Release notes snippet
Issue fork drupal-3538654
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:
- 3538654-hide-promote-sticky-fields
changes, plain diff MR !13028
Comments
Comment #2
berdirMy understanding would be both the standard profile and the page recipe, yes.
Comment #3
xjmDid some work to clarify the summary, including identifying some of the relevant default config.
Comment #4
berdirComment #5
xjmComment #6
acbramley commentedPerfect, thank you @xjm!
Comment #9
thejimbirch commentedMerge request added that hides sticky and promote in the following.
Comment #10
berdirThat looks good. How about adding an assertion to \Drupal\Tests\standard\Traits\StandardTestTrait that it's visible to article and hidden for page on node/add/page and node/add/article?
Should we update the one in nightwatch_a11y_testing as well, that's also a page node type, so I assume it's been copied from standard. All other test examples are probably not worth bothering with.
Comment #11
thejimbirch commentedComment #12
acbramley commentedComment #13
smustgrave commentedApplied the MR and searched both recipe and profile folders for "promote" and all form_display settings minus articles (umami, standard, and nightwatch) are unchanged.
Comment #14
astonvictor commentedit works for me for all profiles
+1 RTBC
Comment #15
longwaveCommitted and pushed 387e40c5594 to 11.x and eb870efd88e to 11.3.x. Thanks!