#16659 closed Cleanup/optimization (fixed)
Change-list toplinks (date drilldown) should not have fixed width
Reported by: | Sindre Sorhus | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | admin, list_filter, default |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description
Right now the toplinks are displayed using a fixed width and floated. The problem with this is that they use more space then they should, since every link has the width of the widest. It also doesn't look good. I propose we set them to inline-blocks to give them a variable width. This also fixes a problem of the some of the month names being longer than the fixed width (happens with norwegians dates, might be more, haven't tested, see "bug.png"), and then wrapping over two lines. In my opinion, it looks a lot cleaner using variable widths.
I have included 2 simple patches for this super small change. Also see the before and after screenshots.
Attachments (6)
Change History (15)
by , 13 years ago
by , 13 years ago
Attachment: | before.png added |
---|
by , 13 years ago
by , 13 years ago
Attachment: | changelists.css.patch added |
---|
comment:1 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
I like the idea.
Have you checked the result for RTL languages? Just set you LANGUAGE_CODE to "he" and see what happens. You may need to tweak rtl.css too.
Regarding the patch, could you:
- upload only one diff with all the changes, relative the the "trunk" directory of Django's source tree?
- avoid insignificant whitespace changes (you removed a newline at the end of ie.css)?
Thanks for your contribution!
by , 13 years ago
Attachment: | 16659.diff added |
---|
comment:2 by , 13 years ago
Tested with "he" language code. Removed a superfluous float and created one diff. The changelist page is broken in RTL (the listfilter is above the list), but the cause is not this patch.
comment:3 by , 13 years ago
Patch needs improvement: | unset |
---|
comment:4 by , 13 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Applied patch and looks good.
comment:5 by , 13 years ago
Patch needs improvement: | unset |
---|
comment:7 by , 13 years ago
Thank you, mofle, for the report and patch, and sorry that I forgot to mention you in the commit message.
comment:8 by , 13 years ago
No problem. Thank for committing it ;)
Patch