[Django] #36004: Fixing Icons: auto, sun, and moon

7 views
Skip to first unread message

Django

unread,
Dec 12, 2024, 9:40:49 AM12/12/24
to django-...@googlegroups.com
#36004: Fixing Icons: auto, sun, and moon
-------------------------------------+-------------------------------------
Reporter: Pablo Bengoechea | Type:
| Cleanup/optimization
Status: new | Component:
| contrib.admin
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Regarding ticket #35829, which addresses the migration of icons from the
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 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
--
Ticket URL: <https://code.djangoproject.com/ticket/36004>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 12, 2024, 9:58:13 AM12/12/24
to django-...@googlegroups.com
#36004: Fixing Icons: auto, sun, and moon
-------------------------------------+-------------------------------------
Reporter: Pablo Bengoechea | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Description changed by Pablo Bengoechea:

Old description:

> Regarding ticket #35829, which addresses the migration of icons from the
> 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 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

New description:

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

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

Django

unread,
Dec 12, 2024, 11:09:49 AM12/12/24
to django-...@googlegroups.com
#36004: Fixing Icons: auto, sun, and moon
-------------------------------------+-------------------------------------
Reporter: Pablo Bengoechea | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Tim Graham):

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
--
Ticket URL: <https://code.djangoproject.com/ticket/36004#comment:2>

Django

unread,
Dec 12, 2024, 11:28:03 AM12/12/24
to django-...@googlegroups.com
#36004: Fixing Icons: auto, sun, and moon
-------------------------------------+-------------------------------------
Reporter: Pablo Bengoechea | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Pablo Bengoechea):

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 define them as symbols, and if I can't, I will close this
ticket and change the source of the icons in the other ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/36004#comment:3>

Django

unread,
Dec 13, 2024, 6:38:30 AM12/13/24
to django-...@googlegroups.com
#36004: Fixing Icons: auto, sun, and moon
-------------------------------------+-------------------------------------
Reporter: Pablo Bengoechea | Owner: (none)
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: dev
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* resolution: => invalid
* status: new => closed

Comment:

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`
--
Ticket URL: <https://code.djangoproject.com/ticket/36004#comment:4>
Reply all
Reply to author
Forward
0 new messages