Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Discussed with @miro_dietiker and @berdir, so would be useful to make different style of error message. Currently we have only warning message that is not very useful for some cases (see image). So discuss/offer new style of error messages.
Comment | File | Size | Author |
---|---|---|---|
#15 | Screenshot from 2016-12-08 13-49-59.png | 13.27 KB | ModernMantra |
#15 | interdiff-2832049-13-15.txt | 579 bytes | ModernMantra |
#15 | paragraphs_warning-2832049-15.patch | 827 bytes | ModernMantra |
#13 | Screenshot from 2016-12-08 11-01-33.png | 13.72 KB | ModernMantra |
#13 | paragraphs_warning-2832049-13.patch | 849 bytes | ModernMantra |
Comments
Comment #2
miro_dietikerThose are warnings, not errors.
Comment #3
johnchqueI see that an image field adds warning messages on its parent form, I would vote to make them to be like those ones.
Comment #4
ModernMantra CreditAttribution: ModernMantra at MD Systems GmbH for MD Systems GmbH commentedSo, here is the patch for new ui warning. IMHO, we should not have 'exactly' the same warning as core, can be confusing for users.
Comment #5
miro_dietikerThe message "Warning: this content must be saved to reflect changes on this Paragraph item." seems overlengthy to me. Less text is more.
I would prefer a general statement "You have unsaved changes."
"Warning" is superfluous, it's a warning message.
In TMGMT we are using this in JobItemForm.php:
This needs no custom CSS and triggers core warning appearance.
Comment #6
miro_dietikerTesting alternative conversion.
Comment #10
miro_dietikerCommitting, with the fixes in Drupal\paragraphs\Tests\ParagraphsWidgetButtonsTest
Comment #12
miro_dietikerThis issue switched many plain informational messages into a warning display.
Currently, only the factual info that no paragraph was added yet appears as warning.
These should be degraded to an info and only use the warning level in case of severity.
Comment #13
ModernMantra CreditAttribution: ModernMantra at MD Systems GmbH for MD Systems GmbH commentedChecked in core, and it looks like there are only three types of messages
status
,error
andwarning
. So proposed solution would be to revert to oldcolor-warning
message that is very often displayed and does not need core style warning level ('No paragraph added yet'). Rechecked other messages and seems ok to keep core style warning level.Comment #14
johnchqueDo we really need to style a status message with a color-warning? It just says that there are no paragraphs added, that should be just normal text without any color.
Comment #15
ModernMantra CreditAttribution: ModernMantra at MD Systems GmbH for MD Systems GmbH commentedCorrect @yongt, looks simpler and better only text.
Comment #17
miro_dietikerOK committed to revert back how it looked before for the info message.
Comment #19
frederickjhHi!
I think that this issue got side tracked and then derailed from the original posters request.
I think that we need to differentiate between Warning and Information messages.
is a Warning message and should use the Drupal Warning messages like this:
(By the way, is not a correct english phrase. No paragraphs added yet. would be correct.) is a Information message and for that the
<em>
tag is enough.Please reopen this issue. I am sure that without this change more than one end user will exit the page with unsaved work and most likely not be real happy with the developers.
Thanks!
Frederick
Comment #20
frederickjhSorry, just did a deeper dive into the code and I see that only one section of the code was pulled back out. Please do not reopen this issue.
Frederick