Opened 8 days ago

Closed 8 days ago

#36004 closed Cleanup/optimization (invalid)

Fixing Icons: auto, sun, and moon

Reported by: Pablo Bengoechea Owned by:
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Pablo Bengoechea)

Regarding ticket #35829, which addresses the migration of icons from the https://github.com/Rush/Font-Awesome-SVG-PNG library to the main Font Awesome repository, the following has been identified:

The icons icon-sun, icon-moon, and icon-auto are not stored in the img folder within the directory contrib/admin/static/admin/img.

These icons are directly called from the django/contrib/admin/templates/admin/base.html file.

It is unclear which library these icons originate from, as I did not find them in the https://github.com/Rush/Font-Awesome-SVG-PNG library.

My proposal to address this issue is as follows:

Identify the original source of the icon-sun, icon-moon, and icon-auto icons in Font Awesome version 6.7.1, download these icons from this version in an appropriate format (SVG), and store them in the img folder within the directory contrib/admin/static/admin/img. Then, update the base.html file to reference these icons from the new location.

Finally, test the changes to ensure that the icons load correctly and retain their functionality in the relevant views. I am not sure if it would be best to combine this with ticket #35829

Change History (4)

comment:1 by Pablo Bengoechea, 8 days ago

Description: modified (diff)

comment:2 by Tim Graham, 8 days ago

I'm not sure what you mean by "fixing icons". What is the problem here? That the icons may come from an unlicensed source?

Here is some discussion regarding the original implementation that may be relevant: https://github.com/django/django/pull/15843#discussion_r920937095

comment:3 by Pablo Bengoechea, 8 days ago

What I mean is that we should organize all the icons and save them in the contrib/admin/static/admin/img folder. Also, I don't know where those icons come from. I'm going to check if

it's possible to call them externally, and if I can't, I will close this ticket and change the source of the icons in the other ticket.

Last edited 8 days ago by Pablo Bengoechea (previous) (diff)

comment:4 by Sarah Boyce, 8 days ago

Resolution: invalid
Status: newclosed

The icons are defined in django/contrib/admin/templates/admin/base.html
https://github.com/django/django/blob/78a55a04c9e6591167e1993c35d3737a705c6ec9/django/contrib/admin/templates/admin/base.html#L116-L122

I think if any changes are required, they can be a part of #35829. I don't think these necessarily have to be pulled out and stored in directory contrib/admin/static/admin/img

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