Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#32691 closed defect (bug) (fixed)

No-wrap the date column on post listing screens

Reported by: johnbillion Owned by: wonderboymusic
Priority: normal Milestone: 4.4
Component: Posts, Post Types Version:
Severity: normal Keywords: good-first-bug has-patch has-screenshots
Cc: Focuses: ui, administration

Description

When viewing a post listing screen in excerpt mode, the Date column can easily become very narrow. When the date text wraps, it looks awful.

Preventing wrapping in this column might be an option. Might also get messed up in some browsers due to the table-layout:fixed on the list table.

Attachments (4)

Screen Shot 2015-06-18 at 01.30.13.png (11.7 KB ) - added by johnbillion 11 years ago.
post-table-column-width-fix.32691.diff (407 bytes ) - added by gaelan 11 years ago.
before.png (49.8 KB ) - added by wonderboymusic 11 years ago.
after.png (49.0 KB ) - added by wonderboymusic 11 years ago.

Download all attachments as: .zip

Change History (15)

#1 @johnbillion
11 years ago

Screenshot of what I'm talking about

#2 @swissspidy
11 years ago

Depends on the date format settings. On my de_DE install it doesn't look bad with the date on the first line and time on the second.

With a simple

.column-date {
  white-space: nowrap;
}

the layout is quite broken:

http://i.imgur.com/gIteS2O.png

We should consider adding white-space: nowrap for the table headings though.

#3 @McGuive7
11 years ago

Agreed that the following rule makes additional styling fairly difficult to accomplish in any sort of flexible way:

table.fixed {
  table-layout: fixed;
}

Most columns seem to be set to a hard 10% with the exception of the checkbox column and the excerpt column. My question is: why is this .fixed class in use? It seems like overkill given responsive best practices and prevents natural resizing for the table. Anyone know of other screens/situations in which these hard widths are necessary?

#4 @gaelan
11 years ago

First post here, looking to start helping with bug fixes.

Simply removing the .fixed class from the table seems to help. The text wraps nicely in Excerpt mode even at very small table widths once that class is removed.

http://i.imgur.com/GiMVltf.png

But there's a lot of CSS that depends on that class being in place. If .fixed is removed, the rest of the column widths aren't declared anymore and things like the comment bubble icon get broken. I'd be hesitant to remove that class and just start rewriting all that CSS, especially as a newbie.

http://i.imgur.com/dSEPN9v.png

Changing the CSS for .fixed tables to table-layout: auto seems to work nicely, but I'm not sure what the impact of the change would be across the rest of the back-end. Can anyone confirm this suggested fix?

#5 @m00nshield
11 years ago

  • Keywords has-patch added; needs-patch removed

@wonderboymusic
11 years ago

#6 @wonderboymusic
11 years ago

  • Keywords has-screenshots added
  • Milestone Awaiting Review4.4

#7 @wonderboymusic
11 years ago

  • Owner set to wonderboymusic
  • Resolutionfixed
  • Status newclosed

In 34083:

Use table-layout: auto (instead of fixed) on table.fixed to ensure that things like date/time don't horrendously wrap on small screens. Before/After screenshots attached to the ticket.

Props gaelan.
Fixes #32691.

#8 @ocean90
11 years ago

  • Resolution fixed
  • Severity minornormal
  • Status closedreopened

[34083] will break tables which have long "words" which aren't wrapped, see screencast: https://cloudup.com/iGMeRBWfHc8.
The same happens with the Syntaxhighlighter plugin.

#9 @wonderboymusic
11 years ago

In 34709:

Revert [34083], I was willing to try this out for the greater good. The good was not greater. There is too much baggage associated with this specific change as pertains to BC and expected layout.

See #32691.

#10 @wonderboymusic
11 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 34710:

List Tables: .column-date needs to become wider at smaller screen sizes, bump it from 10% to 14% at the breakpoint to prevent wrapping.

Fixes #32691.

#11 @gaelan
11 years ago

Agreed on the fix, had a feeling changing the table layout would cause an issue.

Note: See TracTickets for help on using tickets.