Problem/Motivation
Unless you're using the Standard profile, the default value of the Use the administration theme when editing or creating content option on the Appearance page is false, which means that node forms are rendered using the frontend theme. I feel like since the progress in the Admin UI and JavaScript Modernisation Initiative, the Claro theme set as default admin theme and the rise in popularity of Gin theme this is no longer a sensible default. Maybe I'm biased since I have never had to integrate admin forms with custom frontend themes, but is this still a thing nowadays?
Steps to reproduce
Set up a fresh Drupal installation with the Minimal install profile and visit the Appearance admin page. The option is turned off.
Proposed resolution
Turn on the Use the administration theme when editing or creating content by default for new installations.
Remaining tasks
Do it.
User interface changes
Node forms will be rendered in the admin theme by default.
Issue fork drupal-3347015
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:
- 3347015-consider-using-the
changes, plain diff MR !3618
Comments
Comment #3
dieterholvoet commentedComment #4
cilefen commentedComment #5
smustgrave commentedTagging for framework manager for their thoughts.
Personally I would not like to see this happen as I think this goes against the work done for claro.
Comment #6
dieterholvoet commentedHow so? Changing this would make it so Claro is used in even more situations, right?
Comment #7
smustgrave commentedHaving a terrible case of the Mondays and no coffee. You are correct, some reason I read it as using the front end theme by default.
That's my mistake. Will mark it and see what the committer says.
Comment #8
gábor hojtsyI think Drupal may have been a system where using the frontend theme was the sensible default, but its used for more ambitious projects now and using the admin theme by default fits with that better. (Content types are more complex and usually other admin tasks are involved in creating the content, such as category management or media management).
Comment #9
lauriiiI don't think this actually needs a framework manager review so removing the tag.
Something we still need to do is to go through tests where
$this->config('node.settings')->set('use_admin_theme', '1')is being called to make sure that we are not changing any tests to not test what they are supposed to test.Comment #10
alexpottYeah it'd be good to know if we have explicit test coverage around this setting. Plus we'll need a CR to announce the change to people.
+1 for the change.
Comment #11
smustgrave commentedSearching for
->config('node.settings')->set('use_admin_theme',
There are 4 instances and 3 I believe can be removed.
ConfigurableLanguageManagerTest
AddedStylesheetsTest
ShortcutLinksTest
As far as a dedicated test where would that go?
Comment #14
acbramley commentedhttps://www.drupal.org/node/3514929 CR added
Rebased the MR against 11.x, will do a sniff round tests.
Comment #15
acbramley commentedResulted in a nice bit of tidy up.
The
RecipeRunnerTest::testModuleConfigurationOverridetest case specifically tested overriding this setting via a recipe so I've reversed the recipe's settings so the test is still testing that the recipe overrides node's default.Comment #16
smustgrave commentedFailures appear to be random.
Believe feedback has been addressed.
Comment #18
catchMakes sense to me, and only flipping a default. We've got +1s from two product managers on this issue but because it was a while ago I pinged and @Gabor confirmed his was still valid.
Committed/pushed to 11.x, thanks!