Opened 3 weeks ago
Last modified 6 days ago
#36885 assigned Bug
Long verbose names in the admin filter sidebar cause main area to reduce to unusable width
| Reported by: | Jacob Walls | Owned by: | Harsh007 |
|---|---|---|---|
| Component: | contrib.admin | Version: | 5.2 |
| Severity: | Normal | Keywords: | wrap admin filter |
| Cc: | Harsh007, Varun Kasyap Pentamaraju | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | yes |
Description
The test case being added in #36850 reveals at smaller screen sizes, an infelicity where long verbose names not broken mid-word in the admin filter sidebar cause the main area to shrink to almost nothing. See screenshot.
Attachments (1)
Change History (10)
by , 3 weeks ago
| Attachment: | long-verbose-name-unusable-main-area.png added |
|---|
comment:1 by , 3 weeks ago
| Keywords: | admin filter added |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 3 weeks ago
| Cc: | added |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
I can work on this issue and will propose a patch.
comment:3 by , 3 weeks ago
| Cc: | added |
|---|
comment:4 by , 3 weeks ago
| Has patch: | set |
|---|
comment:5 by , 2 weeks ago
Hi, I’ve started looking into this ticket.
I can reproduce the issue on SQLite: using StringAgg(distinct=True) raises an exception, even though SQLite’s native GROUP_CONCAT supports DISTINCT in the form:
GROUP_CONCAT(DISTINCT expr)
This seems to be blocked because SQLite only allows DISTINCT when the aggregate has a single argument (i.e., DISTINCT cannot be used when a custom separator is passed).
A possible fix would be to allow StringAgg(distinct=True) on SQLite when no explicit delimiter is provided, and add a regression test to cover the supported DISTINCT behavior.
I’ll continue investigating the ORM aggregate SQL generation and will work on a patch + tests.
comment:6 by , 2 weeks ago
| Patch needs improvement: | set |
|---|
comment:7 by , 2 weeks ago
| Has patch: | unset |
|---|---|
| Patch needs improvement: | unset |
comment:8 by , 2 weeks ago
| Has patch: | set |
|---|
New PR opened after review cleanup and fixes: https://github.com/django/django/pull/20622
comment:9 by , 6 days ago
| Patch needs improvement: | set |
|---|
Reproduced, thank you!