Problem/Motivation
shortcut.admin.js
exists to select the New set option as soon as something is being entered in the Label textfield on the user shortcut set selection form.
This functionality does not work currently.
In the worst case the user enters something in the textfield expecting a new shortcut set to be created but upon submitting the form the data is simply ignored because the New set radio was not selected.
Steps to reproduce
- Visit
/user/1/shortcuts
- Type something into the textfield
Expected result:
The New result radio above the textfield is selected.
Actual result:
The New result radio above the textfield is not selected.
Proposed resolution
Instead of fixing the JavaScript, let's replace this non-standard UI feature with a standard pattern used all across core: #states
. I.e. let's only show the textfield if New set is selected explicitly.
As part of this let's also actually show the Label title of the textfield like we do on other forms.
https://www.drupal.org/files/issues/shortcut-after-2.png
Remaining tasks
User interface changes
The label textfield on the user shortcut set selection page only appears if New set is selected above and has a visible title.
API changes
None.
Beta phase evaluation
Issue category | Bug |
---|---|
Issue priority | Normal because most users will probably never hit this |
Unfrozen changes | Unfrozen because it only changes markup |
Prioritized changes | The main goal of this issue is usability |
Disruption | No disruption |
Comment | File | Size | Author |
---|---|---|---|
#2 | 2427161-1-shortcut-admin-js.patch | 2.51 KB | tstoeckler |
#1 | shortcut-after-2.png | 18.17 KB | tstoeckler |
#1 | shortcut-after-1.png | 13.43 KB | tstoeckler |
shortcut.admin_.js_.png | 25.03 KB | tstoeckler |
Comments
Comment #1
tstoecklerHere we go.
Comment #2
tstoecklerComment #3
dawehnerNice cleanup!
Comment #4
alexpottSweet patch. This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed de5d27e and pushed to 8.0.x. Thanks!