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
- Consider switching the admin theme to Claro. It's still marked 'experimental', but very close to being considered stable.
- 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?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | sector-admin_theme-3229000-6.patch | 10.44 KB | dieuwe |
| #5 | sector-admin_theme-3229000-5.patch | 10.1 KB | dieuwe |
| #4 | sector-admin_theme-3229000-4.jpg | 358.62 KB | dieuwe |
| #3 | sector-admin_theme-3229000-3.patch | 9.87 KB | dieuwe |
Comments
Comment #2
danielvezaMoving to a 9.3 (or earlier) target
Comment #3
dieuweI 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_utilsmodule. This patch removes the outdatedadmin.cssfile and adds in alayout.cssthat 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.twigvia 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.
Comment #4
dieuweAttaching a screenshot of the page creation and edit forms as they would appear under this patch.
Comment #5
dieuweOne 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).
Comment #6
dieuweFeedback 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.
Comment #8
danielvezaI'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.