Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#32391 closed Bug (fixed)

Replace width with flex properties for the changelist filter

Reported by: Denis Skulimovskiy Owned by: nobody
Component: contrib.admin Version: 3.1
Severity: Release blocker Keywords: changelist, css
Cc: 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 there,

I've found a CSS bug in the Django admin. When the left-side container becomes too wide, the filters become squashed. That's because the flex-grow/shrink/basis values aren't set for the filter.

https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/changelists.css#L10

I suggest replacing the width value with flex-basis and set flex-grow/shrink props to 0.
I'll try to create a pull request for this fix.

Thanks,
Denis

Change History (6)

comment:2 by Carlton Gibson, 3 years ago

Component: Uncategorizedcontrib.admin
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

OK, initial glance looks right. (I need to test more fully but...)

I think we can take this as a bug in the new sidebar feature for Django 3.1.

comment:3 by Carlton Gibson, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Carlton Gibson <carlton@…>, 3 years ago

Resolution: fixed
Status: newclosed

In 269a7671:

Fixed #32391 -- Used CSS flex properties for changelist filter.

Matched layout adjustment using flex from admin sidebar added in
d24ba1be7a53a113d19e2860c03aff9922efec24.

Filters would become squashed when viewport was
constrained or list display table became too wide.

comment:5 by Carlton Gibson <carlton.gibson@…>, 3 years ago

In d83249b0:

[3.2.x] Fixed #32391 -- Used CSS flex properties for changelist filter.

Matched layout adjustment using flex from admin sidebar added in
d24ba1be7a53a113d19e2860c03aff9922efec24.

Filters would become squashed when viewport was
constrained or list display table became too wide.

Backport of 269a76714616fd7ad166a14113f3354bab8d9b65 from master

comment:6 by Carlton Gibson <carlton.gibson@…>, 3 years ago

In 82e1294:

[3.1.x] Fixed #32391 -- Used CSS flex properties for changelist filter.

Matched layout adjustment using flex from admin sidebar added in
d24ba1be7a53a113d19e2860c03aff9922efec24.

Filters would become squashed when viewport was
constrained or list display table became too wide.

Backport of 269a76714616fd7ad166a14113f3354bab8d9b65 from master

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