Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

[Django] #36386: New styles for admin INFO and DEBUG messages

16 views
Skip to first unread message

Django

unread,
May 12, 2025, 9:41:33 PMMay 12
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Type: New
| feature
Status: new | Component:
| contrib.admin
Version: 5.2 | Severity: Normal
Keywords: admin message level | Triage Stage:
info debug | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Would you be open to consider adding new styles for INFO and DEBUG
messages levels in admin site? Currently they default to the green success
one. Implementation would be very easy, and this addition would also be
backwards compatible if the success one would be the default in e.g.
`modeladmin.message_user(...)`.

I include screenshots to how this could look like:
[[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033033.png)]]
[[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033317.png)]]

If this gets accepted I would be happy to be assigned to this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/36386>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 12, 2025, 9:44:03 PMMay 12
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: (none)
Type: New feature | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage:
info debug | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Description changed by Michał Pokusa:

Old description:

> Would you be open to consider adding new styles for INFO and DEBUG
> messages levels in admin site? Currently they default to the green
> success one. Implementation would be very easy, and this addition would
> also be backwards compatible if the success one would be the default in
> e.g. `modeladmin.message_user(...)`.
>
> I include screenshots to how this could look like:
> [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
> tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033033.png)]]
> [[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
> tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033317.png)]]
>
> If this gets accepted I would be happy to be assigned to this issue.

New description:

Would you be open to consider adding new styles for INFO and DEBUG
messages levels in admin site? Currently they default to the green success
one. Implementation would be very easy, and this addition would also be
backwards compatible if the success one would be the default in e.g.
`modeladmin.message_user(...)`.

The main reason for this would be that there are separate styles for 3/5
`DEFAULT_LEVELS` from `django.contrib.messages.constants` and two are left
without implementation.

I include screenshots to how this could look like:
[[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033033.png)]]
[[Image(https://raw.githubusercontent.com/michalpokusa/static-django-
tickets/refs/heads/main/36386/Screenshot%202025-05-13%20033317.png)]]

If this gets accepted I would be happy to be assigned to this issue.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:1>

Django

unread,
May 13, 2025, 3:30:28 AMMay 13
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: (none)
Type: New feature | Status: new
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* stage: Unreviewed => Accepted

Comment:

New icons for errors and warnings was added in #12803, it's not clear why
info and debug were excluded (I assume these having a tick is less strange
than an error or warning)
I think it makes sense for styles to be added here as it feels like
something that was missed. You will need to check the color contrast for
accessibility purposes
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:2>

Django

unread,
May 13, 2025, 5:42:50 AMMay 13
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: Michał
| Pokusa
Type: New feature | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Antoliny):

* owner: (none) => Michał Pokusa
* status: new => assigned

Comment:

I think it's a good idea, and I really like the example images :)
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:3>

Django

unread,
May 13, 2025, 3:50:43 PMMay 13
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: Michał
| Pokusa
Type: New feature | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Michał Pokusa):

Regarding the contrast, all combinations pass the AA requirements.

DEBUG (light theme): https://contrastchecker.com/?c=333333&b=e3e3e3
DEBUG (dark theme): https://contrastchecker.com/?c=eeeeee&b=4e4e4E
INFO (light theme): https://contrastchecker.com/?c=333333&b=ccefff
INFO (dark theme): https://contrastchecker.com/?c=eeeeee&b=265895

Also, do you think its worth to do a cleanup of `.svg` file names?
`icon-yes.svg` -> `icon-success.svg`
`icon-alert.svg` -> `icon-warning.svg`
`icon-no.svg` -> `icon-error.svg`
and following this naming, the following two would be added:
`icon-debug.svg`
`icon-info.svg`
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:4>

Django

unread,
May 13, 2025, 4:17:54 PMMay 13
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: Michał
| Pokusa
Type: New feature | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Michał Pokusa):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:5>

Django

unread,
May 16, 2025, 8:59:14 AMMay 16
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: Michał
| Pokusa
Type: New feature | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

Comment:

> Also, do you think its worth to do a cleanup of .svg file names?

I think these are also used for things like a boolean in the list view
(hence "yes/no"). I would worry if these names are depended on in other
places, so I would keep them
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:6>

Django

unread,
May 26, 2025, 8:07:54 PMMay 26
to django-...@googlegroups.com
#36386: New styles for admin INFO and DEBUG messages
-------------------------------------+-------------------------------------
Reporter: Michał Pokusa | Owner: Michał
| Pokusa
Type: New feature | Status: assigned
Component: contrib.admin | Version: 5.2
Severity: Normal | Resolution:
Keywords: admin message level | Triage Stage: Accepted
info debug |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Michał Pokusa):

* needs_better_patch: 1 => 0

Comment:

I have commented on the prevoius review and suggested fixes for problems
that were noticed.

In order to proceed I would need someone to review the comments and decide
on the next steps.
--
Ticket URL: <https://code.djangoproject.com/ticket/36386#comment:7>
Reply all
Reply to author
Forward
0 new messages