[Django] #31641: Admin Sidebar flashes when page loads

10 views
Skip to first unread message

Django

unread,
May 29, 2020, 10:13:07 PM5/29/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------------+------------------------
Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.1
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 |
-------------------------------------------+------------------------
Hi All, If you have the Admin Sidebar closed, it's actually open when the
page loads, and quickly the flashes closed. This feels really clunky.

I see two possible solutions to this:

1. Move the sidebar javascript to `<head>` with the rest of the scripts
instead of just below `</body>` . Because the `<script>` is `async`,
there's still a chance it will flash, but it should happen less often.
It's `async` so it shouldn't cause the page to slow down too much.

2. Just have it always hidden by default, no between-page state. It ends
up being more of a hidden feature, but as I've been using it, I _always_
close it so I have more room to see the rest of the page, but maybe that's
because I'm a power user.

--
Ticket URL: <https://code.djangoproject.com/ticket/31641>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 30, 2020, 7:06:27 AM5/30/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
---------------------------------+--------------------------------------

Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.1
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 DuP-491):

Replying to [ticket:31641 Collin Anderson]:


> Hi All, If you have the Admin Sidebar closed, it's actually open when
the page loads, and quickly the flashes closed. This feels really clunky.
>
> I see two possible solutions to this:
>
> 1. Move the sidebar javascript to `<head>` with the rest of the scripts
instead of just below `</body>` . Because the `<script>` is `async`,
there's still a chance it will flash, but it should happen less often.
It's `async` so it shouldn't cause the page to slow down too much.
>
> 2. Just have it always hidden by default, no between-page state. It ends
up being more of a hidden feature, but as I've been using it, I _always_
close it so I have more room to see the rest of the page, but maybe that's
because I'm a power user.

> Greetings,I am new to open source development, I have experience with
python and I would like to contribute towards community ,can anyone please
guide me how do I get started?thank you in advance

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

Django

unread,
Jun 1, 2020, 2:36:40 PM6/1/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
---------------------------------+------------------------------------

Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 3.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
---------------------------------+------------------------------------

Comment (by Collin Anderson):

Ok here's a pull request: https://github.com/django/django/pull/13003

--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:3>

Django

unread,
Jun 1, 2020, 2:45:20 PM6/1/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.1

Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by felixxm):

* owner: nobody => Collin Anderson
* status: new => assigned
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:4>

Django

unread,
Jun 3, 2020, 3:20:34 AM6/3/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: assigned
Component: contrib.admin | Version: 3.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by felixxm):

* stage: Accepted => Ready for checkin


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

Django

unread,
Jun 3, 2020, 9:27:13 AM6/3/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"5b3886d091008361d2a05329acd7b51b91a8fdde" 5b3886d0]:
{{{
#!CommitTicketReference repository=""
revision="5b3886d091008361d2a05329acd7b51b91a8fdde"
[3.1.x] Fixed #31641 -- Improved loading of navigation sidebar in admin.

Backport of 4ae9a2b18e2b558df2c084064c42faecac2d75c1 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:6>

Django

unread,
Jun 3, 2020, 9:27:24 AM6/3/20
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.1

Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4ae9a2b18e2b558df2c084064c42faecac2d75c1" 4ae9a2b1]:
{{{
#!CommitTicketReference repository=""
revision="4ae9a2b18e2b558df2c084064c42faecac2d75c1"


Fixed #31641 -- Improved loading of navigation sidebar in admin.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:7>

Django

unread,
Nov 2, 2022, 6:30:57 PM11/2/22
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: new
Component: contrib.admin | Version: 3.1
Severity: Release blocker | Resolution:

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Gavin Wahl):

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


Comment:

This doesn't fix the bug because the sidebar still renders before the
script runs, because it has the defer attribute on it. The correct way to
do this would be to load nav_sidebar.js right after the sidebar html is
rendered.

https://github.com/django/django/pull/16248

--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:8>

Django

unread,
Nov 3, 2022, 1:07:13 AM11/3/22
to django-...@googlegroups.com
#31641: Admin Sidebar flashes when page loads
-------------------------------------+-------------------------------------
Reporter: Collin Anderson | Owner: Collin
| Anderson
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

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


Comment:

Gavin, please open a new ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:9>

Reply all
Reply to author
Forward
0 new messages