Problem/Motivation
The Gin theme provides an option: "Users can override Gin settings". With this enabled, when a user clicks "Edit profile", they are presented with a new option at the bottom of the form within a new "Admin theme settings" group: "Enable overrides - Enables default admin theme overrides."
This default to "off", but when it is toggled "on" it allows the user to override some of Gin's theme settings for their user specifically. The available overrides include:
- Appearance - Enables Darkmode for the admin interface.
- Accent color
- Focus color
- Increase contrast (EXPERIMENTAL) - Enables high contrast mode.
- Navigation (Drupal Toolbar), w/ options: a) Sidebar, Vertical Toolbar (Default), b) Horizontal, Modern Toolbar, c) Legacy, Classic Drupal Toolbar
- Layout density (BETA) - Changes the layout density for tables in the admin interface, w/ options: a) Default, b) Compact, c) Narrow.
- Enable form description toggle - Show a help icon to show/hide form descriptions on content forms.
The "Layout density" option was specifically requested here: https://farmos.discourse.group/t/layout-density-setting/1337
The "Users can override Gin settings" option would be very easy for us to enable, and would open up the possibilities for users to customize their farmOS user's experience.
However, there may be potential issues as well. When we talked about this on the weekly dev call, @paul121 pointed to the "Navigation (Drupal Toolbar)" option specifically. Thusfar we've been assuming that the default toolbar will be used, and so we should confirm that allowing other toolbar options doesn't break anything. It would also be worthwhile to test out the other options to make sure everything works OK.
Proposed resolution
Enable the option, after testing.
Remaining tasks
- Test all the options to make sure nothing breaks.
- Enable the Gin option on new/existing installs.
User interface changes
Users will be able to customize their Gin theme settings.
API changes
None.
Data model changes
None.
Issue fork farm-3309198
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:
Comments
Comment #2
m.stentaComment #3
m.stentaStarted a merge request that implements this. It is very simple. The real work will be in testing to make sure these settings don't break anything.
Comment #5
m.stentaOne thing I'm noticing is that we currently add some CSS to the farmOS logo, which doesn't play nicely when the "Navigation" option is set to "Horizontal, Modern Toolbar".
Here are the specific CSS modifications we might need to fix:
https://github.com/farmOS/farmOS/blob/b495cdb840bd0bc662c1c57205ebcec8f1...
https://github.com/farmOS/farmOS/blob/b495cdb840bd0bc662c1c57205ebcec8f1...
We can probably just make the selectors more targeted, so they only apply when "Navigation" is set to "Sidebar, Vertical Toolbar (Default)".
Comment #6
m.stentaI tried toggling this on, and it didn't appear to do anything. Curious what the expected behavior of this is.
Comment #7
paul121 commentedI believe it only works in content (node) edit forms. Basically the field descriptions get a "?" icon that toggles the description text. Quite nice. Just needs to be generalized a bit
Comment #8
paul121 commentedTested using the tugboat preview as a manager user and it works well! Some thoughts on the horizontal toolbar, but not sure it needs to block, hopefully that will be fixed soon:
Instead of continuing to adjust our CSS here I'd like for Gin to better support custom logos out of the box. I've opened an issue to suggest some improvements to better support custom logo. These changes work great when our custom css @m.stenta linked above is removed: #3309260: Use flexbox to position logo in vertical toolbar
Comment #10
m.stentaThanks for testing @paul121 (and @pat in https://farmos.discourse.group/t/layout-density-setting/1337). I merged this.
We can deal with the CSS stuff in a follow-up.