Stay closed as I browse across the admin panel without using the sidebar.
What happened
The sidebar does stay get closed (its closed state is correctly stored in localStorage and then on pageload it gets closed). But before that happens, it's visible for a second. So as you browse around without using the sidebar, everything feels a bit awkward:
What I've already tried to fix it
I remember we fixed this before, at some point (perhaps in 3.x or 4.0) but like Terminator... it's back. I assume it's because the JS doesn't get loaded fast enough. That the first paint shows the sidebar, then JS hides it.
I thought maybe if we move the JS to before_scripts the performance will be better, tried it but it didn't help... we still get the flicker...
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version the output is:
### PHP VERSION:
PHP 7.4.13 (cli) (built: Nov 30 2020 14:57:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
### LARAVEL VERSION:
v8.22.1@5c70991b96c5722afed541a996479b5112654c8b
### BACKPACK VERSION:
4.1.30@62856b1f01fc3e05c80140fc22f85ea2aac8368c
Bug report
What I did
On desktop, closed the sidebar.
What I expected to happen
Stay closed as I browse across the admin panel without using the sidebar.
What happened
The sidebar does stay get closed (its closed state is correctly stored in localStorage and then on pageload it gets closed). But before that happens, it's visible for a second. So as you browse around without using the sidebar, everything feels a bit awkward:
What I've already tried to fix it
I remember we fixed this before, at some point (perhaps in 3.x or 4.0) but like Terminator... it's back. I assume it's because the JS doesn't get loaded fast enough. That the first paint shows the sidebar, then JS hides it.
I thought maybe if we move the JS to
before_scripts
the performance will be better, tried it but it didn't help... we still get the flicker...Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is: