Make WordPress Core

07/01/2015 01:30:23 AM (9 years ago)

List tables: A better responsive view.

Instead of truncating columns, the data that's already in the markup can now be toggled into view. Only seems appropriate to celebrate four years of contributing by finally doing the first thing I ever mocked up.

Known issues / concerns:

  • Custom list tables that don't define a primary column will show nothing at all. These are not extremely common, as WP_List_Table isn't really recommended for plugin consumption, but it happens. We need to come up with some kind of fallback.
  • Some visual elements, particularly whitespace, could use refining.
  • Needs a11y review.
  • Touch performance on iOS feels sluggish - is there anything we can do about that?
  • Would this be better accordion-style (only one expanded at a time)?
  • Is wp_strip_all_tags() good enough for column titles that have HTML in them? It's essentially a workaround for the fact that core's comments column does that for the icon, which maybe it shouldn't. Perhaps worth another ticket, as a markup change would be fairly independent.
  • Visual hierarchy is not great when expanded (also worthy of another ticket).
  • Quick edit now becomes noticeably more annoying to cancel out of, as you have to scroll all the way down and you lose your position from before it was opened. Again, worthy of another ticket.

props Michael Arestad, helen.
see #32395.

1 edited


  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r32757 r33016  
    337337            }
    339             $attributes = "class='$classes'";
     339            $data = 'data-colname="' . wp_strip_all_tags( $column_display_name ) . '"';
     341            $attributes = "class='$classes' $data";
    341343            if ( 'cb' === $column_name ) {
Note: See TracChangeset for help on using the changeset viewer.