-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[UX] Provide a hint that classes can be added to the inner wrapper of a region. #3075
Comments
...I personally like the 2nd option, because... nobody reads help text unfortunately 😞 |
Yeah second option is better. We can use #states to set enabled/disabled, but it doesn't have the ability to directly set description text. We could hide/show description text by making it a separate element, but it wouldn't be pretty, either in markup or in the UI due to extra margins. Though we could perhaps use a description like "If an inner wrapper is added, specify classes separated by spaces." |
… the inner wrapper of a region. backdrop/backdrop-issues#3075
So yeah, turns out that $form['help'] = array(
'#type' => 'help',
'#markup' => t('Separate multiple classes with spaces.'),
'#attributes' => array('class' => array('description')),
'#states' => array(
'invisible' => array(
':input[name="element"]' => array('value' => ''),
),
),
); ...in that the class is not added, and the Anyway, I went with what @quicksketch has suggested for the help text, which is a much simpler change too. Not perfect/ideal, but solves the UX/discoverability issue at hand: Suggesting 1.12.4 milestone. |
Merged backdrop/backdrop#2527 into 1.x and 1.12.x. Thanks @klonos and @herbdool! |
I have noticed this small UX problem while posting a comment in #682 (comment) ...
So by default, when one clicks the "Configure region" option of any region in the "Manage blocks" page:
...they see this:
What is not clear, is that if you select any option other than the default "no inner wrapper", you get a "CSS classes for inner wrapper" field, that allows you to add classes:
This is a very useful feature, but we are hiding it away from the user. I see 2 options that would help improve the situation:
Add some help text while the select option in the dropdown is "no inner wrapper". Something very simple like:
Here's how this would look:
"CSS classes for inner wrapper" field be rendered all the time, instead of being hidden via
#states
, but have it be disabled (with an explanation as to why), until the user has selected an option other than "no inner wrapper". Something like this:Thoughts?
PR by @klonos: backdrop/backdrop#2527
The text was updated successfully, but these errors were encountered: