Opened 4 years ago

Closed 4 years ago

#20111 closed Cleanup/optimization (fixed)

Admin message levels are too ambigious

Reported by: Kaspars Sprogis Owned by: Kaspars Sprogis
Component: contrib.admin Version: 1.5
Severity: Normal Keywords: messages
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently admin uses messages.INFO level for both - info messages and success messages.
But even text states it should be messages.SUCCESS instead of messages.INFO:
"The %(name)s "%(obj)s" was added successfully"

Therefore it is impossible to use different styles for these levels.

One more example:
In changelist, if you don't choose any checkbox and use some action, you receive message:
"Items must be selected in order to perform actions on them..."
which looks exactly like success messages and gives us feeling everything went ok, but it wasn't and this is confusing.

I suggest to correct these message levels, so that they are more precise and we could style them separately.
Patch is on it's way.

Attachments (2)

messages_level_old.png (3.2 KB) - added by Kaspars Sprogis 4 years ago.
messages_level_new.png (3.1 KB) - added by Kaspars Sprogis 4 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by Kaspars Sprogis

Owner: changed from nobody to Kaspars Sprogis
Status: newassigned

comment:2 Changed 4 years ago by Kaspars Sprogis

Patch is available on my github branch. Opened PR.
See diff: https://github.com/darklow/django/compare/ticket_20111

Changed 4 years ago by Kaspars Sprogis

Attachment: messages_level_old.png added

Changed 4 years ago by Kaspars Sprogis

Attachment: messages_level_new.png added

comment:3 Changed 4 years ago by Kaspars Sprogis

Since success and info message style are identical in admin, only noticable changes for users in current admin version will be warning messages.

I think this is more appropriate and precise:

Than current version:

comment:4 Changed 4 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted

comment:5 Changed 4 years ago by Kaspars Sprogis

comment:6 Changed 4 years ago by twoolie

Triage Stage: AcceptedReady for checkin

I've looked over the patch. It's simple and solid. No tests/docs needed.

Marking Ready For Checkin as per https://docs.djangoproject.com/en/dev/internals/contributing/triaging-tickets/#ready-for-checkin

comment:7 Changed 4 years ago by Kaspars Sprogis <darklow@…>

Resolution: fixed
Status: assignedclosed

In 3be368c73e8e6696e7cc74421aeb4d06d8e828c8:

Fix #20111 Added more precise message level for succcess and warning messages

Note: See TracTickets for help on using tickets.
Back to Top