Indicate that a field value is overridden inline

Created on 24 September 2023, 9 months ago

Problem/Motivation

We have discussed ๐Ÿ› There is no indication on configuration forms if there are overridden values Needs work in ๐Ÿ“Œ Drupal Usability Meeting 2023-09-08 Fixed . The link to the recording is https://youtu.be/LUzwPjS_YSA and for the record, the attendees at the usability meeting were @AaronMcHale, @Emma Horrell, @benjifisher, @rkoller, @simohell, and @worldlinemine.

This feature request here is one of two followups spun off ๐Ÿ› There is no indication on configuration forms if there are overridden values Needs work trying to improve the way overridden values are communicated on a config form. With the recommended changes in #2408549-182: There is no indication on configuration forms if there are overridden values โ†’ and #2408549-183: There is no indication on configuration forms if there are overridden values โ†’ all overridden values are still shown in an info message on top of the page on every page load. The cognitive load making the connection between the list of overridden values and the corresponding overridden fields can be challenging. In particular if it is a form with many fields and several to many overrides. One of the attendees had even a real life example of a site with +30 overrides on a single form. A sentiment that was shared in the Drupal Dojo one day before where I brought up the issue as well. The attendees were @cutehair, @eclipsegc, and @rocketeerbkw.

There was a clear consensus in the usability meeting as well as the Drupal Dojo Austin to add an inline indication if a field is overridden - an icon prepend to the overridden field. That way the content of the info message on top of the page could be reduced. Simply stating that the page has overridden fields and inform the user that the fields overridden are labeled with an icon. The icon should be click- or hover-able. On click/hover the overridden value should be shown while the field shows the value stored in config.

The Drupal Dojo Austin pushed that idea a bit further and came up with the following suggestion the day before. There are currently two different usage scenarios and user needs:

1) Values are overridden locally in for example the settings.php and the user wants to be able to see and be able to change values in config so that they are correct when they are exported and deployed to production.

2) Values are overridden in production via ENV variables and the users wants to see the values that are "real" and actually in use instead of the ones in config.

For scenario 1 the field would show the value stored in config, while the icon shows the value that overrides the config value. In contrast for scenario 2 the field shows the override value set in the ENV file while the icon shows the value stored in config. And the user should be able to switch between the two. Not everyone has the need described in scenario 1 nor everyone the need described in scenario 2, there no one fits all. That toggle switch could be added as part of the info message on top of an overridden page.

Steps to reproduce

Proposed resolution

  • Prepend an icon to every overridden field on a page
  • Make the icons click- or hover-able (The field shows the value stored in config while the icon shows the value that is overriding the value)
  • Update the info message by just stating that the page has overridden fields and inform the user that the fields overridden are labeled by prepended icons.

In case there is consensus to go one step further with the suggestion raised during the Drupal Dojo Austin the additional steps would be:

  • Add a toggle switch to the info message so the user is able to switch between the two described scenarios.
  • Scenario 1 the field shows the value stored in config while the icon shows the overridden value.
  • Scenario 2 the ENV value is shown while the icon shows the value stored in config. In that scenario overridden fields shouldn't be editable, so that only the used value is displayed.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

โœจ Feature request
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Formย  โ†’

Last updated about 9 hours ago

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

  • Issue created by @rkoller
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    I am not sure if the form system is the correct component for this issue. Apologies in case it is the wrong component and please update it accordingly. I am also uncertain if adding the original issue as related is the correct approach for followup issues.

Production build 0.69.0 2024