Opened 4 years ago
Closed 23 months ago
#31641 closed Bug (fixed)
Admin Sidebar flashes when page loads
Reported by: | Collin Anderson | Owned by: | Collin Anderson |
---|---|---|---|
Component: | contrib.admin | Version: | 3.1 |
Severity: | Release blocker | Keywords: | |
Cc: | cmawebsite@…, Tom Carrick | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
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:
- Move the sidebar javascript to
<head>
with the rest of the scripts instead of just below</body>
. Because the<script>
isasync
, there's still a chance it will flash, but it should happen less often. It'sasync
so it shouldn't cause the page to slow down too much.
- 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.
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Cc: | added |
---|---|
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
Agreed, I think we should implement the 1st proposition. Collin, would you like to prepare a patch?
comment:4 by , 4 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:5 by , 4 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:8 by , 23 months ago
Resolution: | fixed |
---|---|
Status: | closed → new |
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.
comment:9 by , 23 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Gavin, please open a new ticket.
Replying to Collin Anderson: