Problem/Motivation

Follow-up to discussion on #2860419: [Meta] Appearance page is too long and confusing and during #3249152: Drupal Usability Meeting 2021-11-12.

For people unfamiliar and new to Drupal it is currently difficult to distinguish between the theme types default and admin and experienced users have at least to think for a second or two each time altering the settings on the Appearance page. There are two situations where the user is confronted with unintuitive tasks paired with a high cognitive load.

  1. In the select box in the Admin Theme form at the bottom of the Appearance page the user is presented with the list of all installed themes. There is no indication which themes out of the list are suitable and intended to be used as an admin theme - you could basically set each installed theme as the Admin Theme.
  2. Same for the availability of the Set as default action button in each Installed Themes card - excluding the card which is actually selected as the Default Theme. You could basically set each installed theme as the Default Theme even if it is designed and intended exclusively to be used as an Admin Theme like for example Claro.

Screenshot of the Appearance page in Claro

If the intended use of a theme would be set in the info.yaml file it would make subsequent user tasks on the Appearance page more clear and intuitive.

Proposed resolution

Either add a new key value pair with the value(s) default and admin to the info.yml file or split the value theme for the key-type into default and admin. Possible value choices could be:

  • default
  • admin
  • default, admin (for a theme that could be used as Default and Admin theme at the same time)

Remaining tasks

1. Agree how to implement the differentiation of Default and Admin Themes in the info.yaml file
2. tbd

CommentFileSizeAuthor
current.png140.1 KBrkoller

Comments

rkoller created an issue. See original summary.

ckrina’s picture

Huge +1 for this. Thanks for creating the issue!

After the issues @lauriii linked, could we say this one and #3103375: Let themes indicate whether they work as front-end and/or admin themes could be merged? Maybe mark this one as duplicated and move all the info and relations to the previous one?

aaronmchale’s picture

Issue summary: View changes
rkoller’s picture

@ckrina i was totally unaware of the two issues @lauriii linked. i did a brief research when i was writing up the initial comment in the parent meta issue but haven't found those. i am totally fine & completely agree with you if we would close this issue as well as one of the other two as duplicate and move informations and aspects of those two missing into the remaining one. and also link the remaining one to the appearance page meta parent. just focus the effort and discussion to a single issue instead of having several.

aaronmchale’s picture

We now have three issues discussing roughly the same thing, so we should reconcile that.

I'm just going to quote my comment on #3103375-20: Let themes indicate whether they work as front-end and/or admin themes:

I think there is some value in guiding people towards making smart choices, in this case that is using the appropriate theme for the job.

However, I fully agree with @andrewmacpherson in comment 18 (#3103375-18: Let themes indicate whether they work as front-end and/or admin themes), there are very valid use-cases for using the admin theme as the front-end theme, headless Drupal or using Drupal as a business-process type of system are two very valid ones. I have more than one of those "business-process focused sites" that uses Gin as both the admin and front-end theme. Similarly, there are valid use-cases where you would want at least some of the administrative UI to use the front-end theme, maybe you have a community site with some users who have moderator level permissions, and you don't want them to have a jarring experience where they have to jump in and out of differently styled pages, I have a Drupal 7 site with that exact use case.

I think there are several completing concerns at play here:

  1. For new users to Drupal, we want them to have a good experience learning and getting to know Drupal, so we should help them by guiding them to make smart choices about how they configure Drupal.
  2. There are very valid use-cases for using the same theme as the admin and front-end theme (a headless installation, a business-process system, a community site, etc).
  3. Theme developers may only want to support their theme being used in one particular context (front-end or admin), as to support the other context would require additional work and potentially additional user/community support which they are not able to provide.

I think we can find a way to reconcile those concerns; I can see the argument from all sides here, but above all else, I feel strongly that it is not the role of the theme developer to dictate in what way the theme should be used (again for all the valid reasons already mentioned), I think to do so would be incompatible with how we architect Drupal (Drupal is a framework that is not opinionated about how a site should function).

One of the ways we might be able to reconcile this is to provide the option for a theme to recommend how it should be used. For example, Olivero could indicate that it is meant to be used as a front-end theme (a key in the info.yml file probably). That recommendation would be communicated on the Appearance page, but if someone really wanted to, they would still have the option to set Olivero as the admin theme; They might be given a warning when doing so, something like "Olivero was not designed to be an admin theme, Olivero may not function well and support may be limited, proceed at your own risk.". Further to this, on the theme project page, we could provide an option for theme developers to recommend how their theme is meant to be used: as an admin theme, front-end theme, or both.

I think that would be a nice compromise: we effectively guide new users, we don't take the choice away, and we mitigate the likelihood of theme developers need to deal with issues/support that they didn't intend on (we give them something that they can easily point to).

xmacinfo’s picture

Status: Active » Closed (duplicate)

We should not have 3 issues dealing with the same request. Let’s close this issue and use instead #550102.

aaronmchale’s picture

Project: Drupal core ideas » Drupal core
Version: » 9.4.x-dev
Component: Idea » theme system
ckrina’s picture

@rkoller no problem at all! I couldn't find them neither even I was guessing something existed, so that's why I asked @lauriii. Thanks all for keeping the ball rolling.