Opened 12 years ago

Closed 12 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 12 years ago.
messages_level_new.png (3.1 KB ) - added by Kaspars Sprogis 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Kaspars Sprogis, 12 years ago

Owner: changed from nobody to Kaspars Sprogis
Status: newassigned

comment:2 by Kaspars Sprogis, 12 years ago

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

by Kaspars Sprogis, 12 years ago

Attachment: messages_level_old.png added

by Kaspars Sprogis, 12 years ago

Attachment: messages_level_new.png added

comment:3 by Kaspars Sprogis, 12 years ago

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 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedAccepted

comment:5 by Kaspars Sprogis, 12 years ago

comment:6 by twoolie, 12 years ago

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 by Kaspars Sprogis <darklow@…>, 12 years ago

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