Opened 6 years ago
Closed 5 years ago
#43703 closed defect (bug) (fixed)
Edit Category screen - Error shown in green and admin notice not dismissible.
Reported by: | birgire | Owned by: | pento |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch has-screenshots ux-feedback |
Focuses: | administration | Cc: |
Description
When we edit a category, on the Edit Category screen, then there are two things that need adjustments:
- The
"Category updated."
admin notice is currently not dismissible. - The
"Category not updated."
admin notice is currently shown in green (not red).
To replicate part 2, one can e.g. disable JS and update the term without a name.
Example location:
/wp-admin/term.php?taxonomy=category&tag_ID=123
The corresponding part that displays the message for categories, tags and other terms:
https://core.trac.wordpress.org/browser/tags/4.9.5/src/wp-admin/edit-tag-form.php#L73-L82
Attachments (7)
Change History (16)
#1
@
6 years ago
43703.diff is a suggested patch that:
- let's the admin notice have the
error
class (displayed as red) if the$msg
index is 5 for not updated), else theupdated
class (displayed as green). - adds the
notice is-dismissible
classes to the admin notice. - escapes the message output.
#4
@
5 years ago
- Keywords ux-feedback added
Not sure it is meant to be dismissible, as it contains a link to "go back" to avoid a dead end for users. See #26758 (ticket number on the changeset [34202] is wrong). Asking for UX feedback.
The green color on the error notice need to be fixed though :)
[Edit] Also, the CSS classes error
and updated
are legacy: the new classes notice-error
and notice-success
should be used instead.
This ticket was mentioned in Slack in #design by afercia. View the logs.
5 years ago
#6
@
5 years ago
Yes, as @afercia mentioned the error message should have a red strip instead of green but I think the message bar should not be dismissible as there is a link to go back.
#7
@
5 years ago
Thanks @afercia and @jaymanpandya for the review.
I updated the patch in 43703-2.2.diff with:
- Notice is not dismissable.
- Uses
notice notice-success
andnotice notice-error
CSS classes.
The screenshot in edit-category-success-notice-with-43703-2.2.diff.jpg shows the notice when a category is updated.
Dismissible admin notice