[Django] #31986: Django Admin filter sidebar does not scroll

29 views
Skip to first unread message

Django

unread,
Sep 8, 2020, 4:36:41 AM9/8/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll
-----------------------------------------+------------------------
Reporter: haki | 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: 0 |
-----------------------------------------+------------------------
Starting at Django 3.1, when the Django admin filter sidebar is very long,
it does not scroll.

For example:

https://imgur.com/jwnFmYo

Notice how the filter overflows the screen, making the filters on the
bottom unreachable.

I've only witnessed this behavior starting at Django 3.1, when the layout
of the screen changes for the sidebar.

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

Django

unread,
Sep 8, 2020, 6:04:10 AM9/8/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
---------------------------------+------------------------------------

Reporter: haki | 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: 0
---------------------------------+------------------------------------
Changes (by felixxm):

* cc: 007, Tom Carrick (added)
* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Thanks for this report.

Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c (Django 3.1.1).

Reproduced at 5ea1621c724e765c9a642a1b3b6e83419fda920b.

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

Django

unread,
Sep 8, 2020, 7:02:08 AM9/8/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
---------------------------------+------------------------------------

Reporter: haki | 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: 0
---------------------------------+------------------------------------

Comment (by 007):

At first, I solved the problem with absolute positioning. But it doesn't
look very beautiful. So we use `overflow:hidden` to trigger
[https://developer.mozilla.org/en-
US/docs/Web/Guide/CSS/Block_formatting_context BFC] solve the problem.
But unfortunately it led to other problems. So go back to the absolute
positioning solution.

[https://github.com/django/django/pull/13397 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/31986#comment:2>

Django

unread,
Sep 8, 2020, 7:24:39 AM9/8/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
---------------------------------+------------------------------------
Reporter: haki | Owner: 007
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: 0
---------------------------------+------------------------------------
Changes (by felixxm):

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


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

Django

unread,
Sep 10, 2020, 4:15:44 PM9/10/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
---------------------------------+------------------------------------
Reporter: haki | Owner: 007
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: 0
---------------------------------+------------------------------------

Comment (by john-parton):

Here's a really quick and dirty fix. It requires the browser to support
CSS grids.


{{{
{% extends "admin/base_site.html" %}

{% block extrahead %}
{{ block.super }}

<style>
@media (min-width: 768px) {
#changelist {
display: grid;
grid-template-columns: 1fr 240px;
grid-template-rows: auto auto 1fr;
grid-column-gap: 40px;
grid-row-gap: 0px;
}

#changelist > * {
grid-column-start: 1;
grid-column-end: 1;
margin-right: 0 !important; /* hax :( */
}

#changelist-form > * {
margin-right: 0 !important; /* more hax :( */
}

#changelist #changelist-filter {
position: relative;
grid-area: 1 / 2 / 4 / 3;
}
}
</style>

{% endblock %}-
}}}

The wildcard patterns are to reset margins.

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

Django

unread,
Sep 30, 2020, 6:11:32 AM9/30/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
-------------------------------------+-------------------------------------

Reporter: haki | Owner: 007
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: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


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

Django

unread,
Sep 30, 2020, 3:49:04 PM9/30/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
-------------------------------------+-------------------------------------
Reporter: haki | Owner: 007
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: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822" 8ee4bb6f]:
{{{
#!CommitTicketReference repository=""
revision="8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822"
Fixed #31986 -- Fixed admin filter sidebar scrolling.

Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c.

Thanks haki for the report.
}}}

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

Django

unread,
Sep 30, 2020, 3:49:49 PM9/30/20
to django-...@googlegroups.com
#31986: Django Admin filter sidebar does not scroll.
-------------------------------------+-------------------------------------
Reporter: haki | Owner: 007
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: 0
-------------------------------------+-------------------------------------

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

In [changeset:"57b359343bb3ee733ec8dfaf40be55be4d6d3c5d" 57b3593]:
{{{
#!CommitTicketReference repository=""
revision="57b359343bb3ee733ec8dfaf40be55be4d6d3c5d"
[3.1.x] Fixed #31986 -- Fixed admin filter sidebar scrolling.

Regression in 2bc38bc7cae002f949157d95e3f0c19ea6b8ca5c.

Thanks haki for the report.

Backport of 8ee4bb6ffcb3346c0fa8fb194986fbf9edadc822 from master
}}}

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

Reply all
Reply to author
Forward
0 new messages