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

  1. Test all the options to make sure nothing breaks.
  2. 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

Command icon 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

m.stenta created an issue. See original summary.

m.stenta’s picture

Title: Allow users to override Gin settings » Allow users to override Gin theme settings
m.stenta’s picture

Status: Active » Needs review

Started 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.

m.stenta’s picture

@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.

One 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)".

m.stenta’s picture

Enable form description toggle - Show a help icon to show/hide form descriptions on content forms.

I tried toggling this on, and it didn't appear to do anything. Curious what the expected behavior of this is.

paul121’s picture

I tried toggling this on, and it didn't appear to do anything. Curious what the expected behavior of this is.

I 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

paul121’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#3309260: Use flexbox to position logo in vertical toolbar

Tested 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:

Here are the specific CSS modifications we might need to fix:

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

  • m.stenta committed e8250a3 on 2.x
    Issue #3309198: Allow users to override Gin theme settings
    
m.stenta’s picture

Status: Reviewed & tested by the community » Fixed

Thanks 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.

Status: Fixed » Closed (fixed)

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