Problem/Motivation

Often there are a few useful improvements that could be made to the admin theme. Right now we are using Seven and sometimes

Proposed resolution

  1. Consider switching the admin theme to Claro. It's still marked 'experimental', but very close to being considered stable.
  2. Create a sub-theme or module that will allow simply vanilla CSS and vanilla JS overrides to the admin theme.

It would be good to have some input from a few FEDs on what features would be useful here and what form the theme/module would need to take. Requires CSS/JS tweaks to the admin experience are expected to be very lightweight. Do they need to be customisable, or do we just bake them into the Sector experience?

Comments

dieuwe created an issue. See original summary.

danielveza’s picture

Issue tags: +9.3 target

Moving to a 9.3 (or earlier) target

dieuwe’s picture

Version: 9.1.x-dev » 9.2.x-dev
Status: Active » Needs review
StatusFileSize
new9.87 KB

I have an initial patch candidate.

For the first goal, we simple enable Claro by default and remove all references to Seven (including block config files that can go entirely).

The the second goal, there was already an unused library in the sector_utils module. This patch removes the outdated admin.css file and adds in a layout.css that makes the 'secondary' region on node form layout sticky.

I've then shifted some functionality to a specific node form alter hook and attempted to replicate an idea from Gareth by shifting the publishing status and form actions to the sidebar. Overriding the node-edit-form.html.twig via a module is not ideal, so I am avoiding that. It does limit some of our options though, and the ideal placement for the "publishing" items is actually above the 'advanced' group rather than inside of it.

I think that a combination of form alters, CSS, and JS should be enough to make the admin UX tweaks that we want though, without needing to maintain a separate admin theme. But that is still a serious option we could consider based on feedback we get from the team and users on Claro.

There will be a bit of a clash with those form alter changes on existing sites using Gareth's custom "sector_admin" theme, so this patch will need some work on if we actually want to shift the publishing status and actions this way - but I just wanted to demo a proof of concept here for discussion.

dieuwe’s picture

StatusFileSize
new358.62 KB

Attaching a screenshot of the page creation and edit forms as they would appear under this patch.

dieuwe’s picture

StatusFileSize
new10.1 KB

One change here to just keep the 'publishing status' changes as a tweak to the Claro theme only (in the same way that the sector_utils library only gets applied to it).

dieuwe’s picture

StatusFileSize
new10.44 KB

Feedback from Daniel via DM has led to some extra styles being made to increase the primary and secondary columns on node add/edit screens. This follows the 75-25 widths used by Seven, which we much prefer at this point to the vary narrow columns and excessive whitespace that Claro ships with.

  • DanielVeza committed 0c3c0cb on 9.2.x authored by dieuwe
    Issue #3229000 by dieuwe, DanielVeza: Switching admin theme to Claro,...
danielveza’s picture

Status: Needs review » Fixed

I've committed this, sites can revert to seven as their admin theme if they aren't a fan, or if there is a real kickback we can revert this commit and have claro be an opt in.

As time goes on we can add additional CSS to make it better if needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.