Problem/Motivation
We wanna improve the UX (usability) to allow users to be warned when a block that is supposed to be shown is not going to do it. The feedback to the user will be done using warning messages
A language switcher block would not show any language if:
A. There is only 1 language configured (no languages to switch between).
B. There is no URL detection method configured (no method to switch languages via links).
This is correct. However users still enable the language switcher block and then get confused that it does not display. People assume it may be due to visibility settings, permissions, etc.
Proposed resolution
Add some helpful hint/text to the block config form that says why it would not show.
- (no) When user goes to the block layout and add the block, a warning message is showed in the modal window.
That way will warning the user before add the block - (yes) When the user goes to block layout, the block will not be able to be added. Could be showed with a tooltip or we could show a warning in the page or we could update the page description explaining this behavior.
That way warning the user from the beginning. - (yes) When user goes to the block layout and add a block, after submitting the configuration modal page, a warning message will be showed in the top of block layout page.
That way will warning the user after add it.
Remaining tasks
We need to add the patch the availability to show both message if both are happening. Right now, just show one of them.
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | ||
Reroll the patch if it no longer applies. | Instructions | ||
Update the issue summary | Instructions | Yes | |
Update the issue summary noting if allowed during the beta | Instructions | ||
Add automated tests | Instructions |
User interface changes
A new hint on why the block would not show.
API changes
No.
Beta phase evaluation
Issue category | Task, because we are adding string messages in the UI to clarify the blocks behavior. |
---|---|
Issue priority | Normal, because we are improving the usability only in one small part, and not across many parts of core. |
Prioritized changes | This issue improve the UX (usability). |
Disruption | Not disruptive because we are changing LanguageBlock::constructor and LanguageBlock::create methods and its scope are just the language block, so will no affect to other classes, D8 beta sites or documentation (just the constructor comment block) |