Opened 28 hours ago

Last modified 28 hours ago

#36850 new Bug

Django Admin filter sidebar wraps if its inner content becomes too large

Reported by: Mark Owned by:
Component: contrib.admin Version: 6.0
Severity: Normal Keywords: css
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Mark)

In the course of ticket #36511 the layout of the changelist and its filter sidebar has been changed so that the sidebar seemingly should have a fixed width of 240px.

The flex-base property does not necessarily restrict the width of the sidebar if it's content demands more (which happens eg. for dropdowns with large titles). Combined with the flex: wrap attribute, the sidebar wraps if the table also demands more width than available and looks broken (see attachment).

This behavior can be simulated by giving a sidebar's and changelist's children some fixed, large width:

#changelist-filter-extra-actions {
  width: 290px;
}
#toolbar {
  width: 1000px;
}

The problem could be resolved by reverting to the previous flex layout, but the motivation for those changes is unclear to me from the ticket and related pr.

Should the width of the sidebar stick to 240px or - at it has been before - should the sidebar grow if necessary?

Does the new flex layout have any advantages to how it was in django <6?

Attachments (1)

Screenshot from 2026-01-07 15-00-57.png (53.2 KB ) - added by Mark 28 hours ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Mark, 28 hours ago

Summary: Django Admin filter sidebar wraps if it's inner content becomes to largeDjango Admin filter sidebar wraps if it's inner content becomes too large

comment:2 by Mark, 28 hours ago

Description: modified (diff)

comment:3 by Mark, 28 hours ago

Description: modified (diff)

comment:4 by Mark, 28 hours ago

Description: modified (diff)
Summary: Django Admin filter sidebar wraps if it's inner content becomes too largeDjango Admin filter sidebar wraps if its inner content becomes too large
Note: See TracTickets for help on using tickets.
Back to Top