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.

Currently the only way to really view a theme is to install and enable it. The rather small screenshots provided by themes are hardly enough for a user to get an idea of the look & feel of a theme.

Proposed resolution

Provide a theme preview page showing UI elements or a style guide. Move the theme actions to this page so that the cards on the Appearance page are basically just teaser links.

Alternatively, keep the theme actions on the cards and add a 'Preview' action to them, as well as action buttons on the theme preview page (e.g. for 'Install & Enable'). Since the cards on the Appearance page have limited space for action buttons, we could place all actions in a dropdown (as suggested in the parent issue).

This feature would be useful for core themes and themes provided by well-maintained distributions like Thunder. Custom themes are less likely to take advantage of it.

Remaining tasks

  1. Discuss options
  2. Provide a concept

User interface changes

tbd

Comments

Antoniya created an issue. See original summary.

antoniya’s picture

Issue summary: View changes
antoniya’s picture

Issue summary: View changes
aaronmchale’s picture

Issue summary: View changes
aaronmchale’s picture

I think this is a really good idea.

From a technical perspective, we have some of the ground work for this in Core already: When you configure the layout for blocks there is a link to preview all of the regions of the current theme, that could be built on for this.

Some of what I posted in #3249379-4: Make all form submissions on the Appearance page consistent is also relevant here:

I wonder if we should do #3249355: Implement theme preview functionality [this issue] first, and postpone #3249379: Make all form submissions on the Appearance page consistent on #3249355: Implement theme preview functionality. The reason being that we could potentially solve this problem by implementing a two-step process, whereby you first open the theme preview, and on that screen you are clearly presented with all or some of the options, specifically: Set as default, Set as admin.

I might leave the "Uninstall" option out of that. Perhaps we just follow the pattern of the modules Extend interface and have a separate screen for uninstalling, where you see all of the themes that are eligible to be uninstalled and you can select which ones you want to uninstall.

aaronmchale’s picture

Issue tags: +Needs design
aaronmchale’s picture

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

It seems to me that the Drupal site itself is not the best place for a theme preview. For a contributed theme, I want to see the preview (or style guide) before I install it on my site. Maybe we should be thinking in terms of the theme's project page on d.o, not adding a preview to the Drupal site.

avpaderno’s picture

If, to preview a theme, all its files need to be downloaded, that would be like installing it on the site. I agree with benjifisher this is not what I would want: In this case, I could simply install it, check how some pages are rendered, and uninstall the theme if it's not what I wanted. (This is what I have always done to decide which theme to use.)

On the other side, considering that drupal.org could be running on a Drupal version that isn't the version I am using on my site, the preview could not show exactly how the theme changes pages on my site.

Also, given that a theme could be tested on https://simplytest.me/, is there any reason for implementing this feature?

antoniya’s picture

Issue summary: View changes

As discussed in the Usability meetings, custom themes are rather unlikely to implement a preview. This is meant more for core themes and distributions which aim to improve the experience of introducing new users to Drupal. Added a few changes to the IS to reflect that.

Other than that a project page on DO for core themes would be great indeed.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.