Opened 8 years ago

Closed 8 years ago

Last modified 3 years ago

#26872 closed Bug (fixed)

Django Admin filter choice list can overflow the whole page

Reported by: Damien Owned by: Kenneth
Component: contrib.admin Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: yes

Description

In the django admin model listing interface, if the length of a filter choice is too big, it's gonna overflow the whole page.

https://imgur.com/DBCtz6W.png

The solution here can be to do:

#changelist-filter a {
    ....
    text-overflow: ellipsis;
    overflow: hidden;
}

But the user is loosing the full value, so a title should be added too to the link

Change History (10)

comment:1 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Kenneth, 8 years ago

Owner: changed from nobody to Kenneth
Status: newassigned

comment:3 by Kenneth, 8 years ago

Has patch: set

comment:4 by Tim Graham, 8 years ago

Patch needs improvement: set

A few test failures need to be fixed.

in reply to:  4 comment:5 by Kenneth, 8 years ago

Sorry this is my first time contributing to Django. Do you think I need to write a separate test for my patch or just fix the existing ones?

Replying to timgraham:

A few test failures need to be fixed.

comment:6 by Tim Graham, 8 years ago

Fixing the existing ones should cover the change.

in reply to:  6 comment:7 by Kenneth, 8 years ago

Fixed.

Replying to timgraham:

Fixing the existing ones should cover the change.

comment:8 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 2f587737:

Fixed #26872 -- Fixed text overflow in ModelAdmin.list_filter.

comment:9 by Damien, 8 years ago

Thanks, that was fast ! I was first planning on submitting the PR myself but it got picked up so quickly :)

comment:10 by GitHub <noreply@…>, 3 years ago

In 361bb8f7:

Refs #26872 -- Fixed wrapping of long choices in ModelAdmin.list_filter.

Regression in 269a76714616fd7ad166a14113f3354bab8d9b65.

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