Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#31576 closed Bug (fixed)

Navigation sidebar hides some elements on small windows.

Reported by: Mariusz Felisiak Owned by: Mariusz Felisiak
Component: contrib.admin Version: 3.1
Severity: Release blocker Keywords:
Cc: Tom Carrick Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

Navigation sidebar hides some elements, e.g. time/calendar pickers or filter horizontal widgets. It's a bug in a new feature, see #31034.

Attachments (2)

Screenshot_20200513_100151.png (44.4 KB ) - added by Mariusz Felisiak 5 years ago.
Screenshot_20200513_095732.png (50.8 KB ) - added by Mariusz Felisiak 5 years ago.

Download all attachments as: .zip

Change History (10)

by Mariusz Felisiak, 5 years ago

by Mariusz Felisiak, 5 years ago

comment:1 by Mariusz Felisiak, 5 years ago

Proposed solution:

diff --git a/django/contrib/admin/static/admin/css/nav_sidebar.css b/django/contrib/admin/static/admin/css/nav_sidebar.css
index 6fcfb26131..6968863e7c 100644
--- a/django/contrib/admin/static/admin/css/nav_sidebar.css
+++ b/django/contrib/admin/static/admin/css/nav_sidebar.css
@@ -93,7 +93,7 @@
     background: #ffc;
 }
 
-@media (max-width: 767px) {
+@media (max-width: 1024px) {
     #nav-sidebar, #toggle-nav-sidebar {
         display: none;
     }

comment:2 by Mariusz Felisiak, 5 years ago

Cc: Tom Carrick added
Description: modified (diff)
Owner: Mariusz Felisiak removed
Status: assignednew

comment:3 by Carlton Gibson, 5 years ago

I'm not sure that we need go as far as removing the sidebar for mid-sized screens. Shutting the sidebar is sufficient to resolve the issue, and it's a nice improvement.

Similar discussion on the PR: Tom, Mariusz. That was to do with inline scrolling but with the same conclusion, "...it can be mitigated by just closing it, so I think it's alright from the user's perspective".

The error here only shows up on the selenium headless tests. Actually using the admin on a 800px viewport is fine, great even: you just close the sidebar if you don't want it.
I'm a bit reticent to loose it for the tablet sized screen for what seems like a testing artifact. (We could either set a wider viewport in the test, or ensure the sidebar is closed on a smaller screen, to be more realistic.)


Last edited 5 years ago by Carlton Gibson (previous) (diff)

comment:4 by Carlton Gibson, 5 years ago

Triage Stage: UnreviewedAccepted

Going to accept though, as we either have to fix the test or disable the feature.

comment:5 by Tom Carrick, 5 years ago

Couple of things:

This probably isn't the right fix, but it should be possible to fix these tests by clicking the toggle after each request - actually after the first request, since it'll persist. I'm not actually sure of the persisting behaviour between tests, it might even be possible to close it once it in setUpTestData(). This affects more the tests than actual users, however (IMO).

I do plan on looking at all the various display issues on the currently supported media queries between now and the non-blocking bug freeze, but I won't assign this particular ticket to myself yet in case anyone has more time before I get a chance to do that.

Last edited 5 years ago by Tom Carrick (previous) (diff)

comment:6 by Mariusz Felisiak, 5 years ago

Has patch: set
Owner: set to Mariusz Felisiak
Status: newassigned

comment:7 by GitHub <noreply@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 18eb8528:

Fixed #31576 -- Fixed selenium tests with headless mode.

Horizontal scrollbar doesn't appear with the headless mode on small
windows, that's why window.scrollTo() is not an option for these
tests.

Tests changed after adding a navigation sidebar in
46fe506445666d8097945f0c1e8be11cfd644b28.

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In e078870:

[3.1.x] Fixed #31576 -- Fixed selenium tests with headless mode.

Horizontal scrollbar doesn't appear with the headless mode on small
windows, that's why window.scrollTo() is not an option for these
tests.

Tests changed after adding a navigation sidebar in
46fe506445666d8097945f0c1e8be11cfd644b28.
Backport of 18eb852874a073001cb509f64002b6d82bdc760b from master

Note: See TracTickets for help on using tickets.
Back to Top