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.
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>
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>
* owner: nobody => Collin Anderson
* status: new => assigned
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:5>
* 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>
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>
* 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>
* status: new => closed
* resolution: => fixed
Comment:
Gavin, please open a new ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/31641#comment:9>