-
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] Support a 4th "info" type for backdrop_set_message #3155
Comments
Agreed. I suggest we use an "Info" picto, like https://fontawesome.com/icons/info-circle?style=solid |
Note that in |
Of course we should! ...I was lazy when I was putting the mockups together :) |
PR just filed: backdrop/backdrop#2217 Unfortunately, the |
Is there anywhere in core now where this could or should be used? If the answer is "no" I suspect we should be questioning if this is necessary. |
@docwilmot yes, I think I have mentioned this in another issue recently. Here are a few examples where messages we throw at the user are either not using ...or are using the status/success message type, when the user has not performed any directly related action: ^^ this is visiting the module installer page, after having installed modules that were intentionally left disabled. I have just intentionally navigated back to the Project Installer page with the intention to install additional modules that I forgot to add in the first go. ...this specific message persists across other project installer sections as status/success. Here's the same message, talking about recently installed modules, while I'm at the layouts installation page: ^^ this can a) either be considered a bug (in which case we should make sure that this message only shows in the modules installer page), or b) considered a feature (in which case the message could use the new Here's another example: ^^ ...layout templates are automatically enabled during the last step of the installer (unlike modules and themes). The first part of this message is correctly thrown as a success, the last part should be an ...here's how this story continues, if you navigate away from the layout templates page and install a theme: ^^ this is where my previous suggestion makes sense. The first message now seems like a bug, unless we have only kept the "You can manage layout templates on the layouts Settings page." as a persistent There's other examples where this could be used in core, but contrib can also use it to convey messages like additional manual steps that might be required after upgrading to a major version etc.. In general, messages that need to be shown as help text, but unlike actual help text, should not be shown all the time. |
I'm not clear on the difference between status and info though. Can we have it explicitly described and agreed on in preparation for this? |
Sure. Here's my take on this... "Sophisticated" definitions:
(overly) simplified rules:
Would be interested to know what others think. |
...having said that, I personally think that although it is good to define/document these, they should not be strict/explicit. The success messages have been abused in many cases over the years, both in Drupal and in Backdrop. The introduction of the new |
Probably because 'status' is more a 'success' message, with a green color theme and a positive check pictogram. Is it worth renaming ? |
Here is a full list of message display through |
It makes sense to me to have an "info" message separately from the "success/status" message, and @klonos's description of the difference is helpful. Other examples of "persistent" info messages that should not have a checkmark/success indicator:
|
Yes please! Love this idea, thanks @klonos :) |
@laryn ...this is my OCD talking again plus my personal preference for Backdrop CMS the product to be "intelligent", but I believe that the examples you have listed are not 100% fit for the use case. If a message has been triggered by a user action, then this should be a success message. The info type should be used in the case that we need to convey something additional to the user, or if the message we are trying to display has not been a direct consequence of the user's current action. To be more precise...
|
...another example where this can be used in contrib: The "Installation is complete." success message would suffice in this case, and the other 2 messages could be shortened to just "[module_name] does not provide any new functionality on its own but may be used by other modules.", and converted to the new info type 😉 |
Filled a related issue: [DX] Use proper 'success' message type and deprecate the ambiguous 'status' type. #3179 |
Joomla has this "messages" section that lists messages that need to be communicated to the user: ...although some of these seem that they should be warnings, respective messages about stats collection, or unsupported php versions in upcoming Backdrop releases could use this new |
...bootstrap also seems to have this 4th info alert type too: |
Add a request regarding accessibility of focused links. Easy to fix though |
Thanks @opi 👍...for posterity and so that we get some feedback from others, I am posting your comment here too:
...although from what I see we are doing the opposite everywhere else in the admin UI: links are not underlined by default, and they get underlined on hover/focus. Hmm... let me give it a bit of thought and I will update the PR ...I will probably go with your suggestion @opi unless anyone else has better ideas. @wesruv? |
Actually, the "focus" rule is not needed here, because it's already defined globally (blue outline) |
Although it's opposite, I think it's better than no hover effect. This looks so close! |
I've filed a new PR that includes the hover state: backdrop/backdrop#2291 |
Looks great. I added one more commit to add I've merged backdrop/backdrop#2291 into 1.x for 1.11.0. Thanks @klonos, @opi, @docwilmot, and @jenlampton! |
Thanks everybody for finishing this off 👍...I have plans for putting it into good use 😄 |
https://api.backdropcms.org/api/backdrop/core%21includes%21bootstrap.inc/function/backdrop_set_message/1
...we currently support only the following message types:
status:
warning:
error:
I propose supporting another type of
info
:I think that by doing this, we would also allow contrib modules to communicate info things in a standardised manner. Think Drupal webform module and the message that was added recently:
(This should not affect our backwards compatibility, as it seems like an API addition.)
PR by @klonos: backdrop/backdrop#2217PR by @jenlampton: backdrop/backdrop#2291
The text was updated successfully, but these errors were encountered: