briancwald / material_admin

Drupal 8 Admin Theme
GNU General Public License v2.0
48 stars 15 forks source link

Views table bulk operations and filters layout #18

Closed briancwald closed 7 years ago

briancwald commented 7 years ago

The views tables that have bulk operations and/or filters (such as admin/content) cause a bulky and disorganized header.

These should follow the table pattern defined by Material Design and add a button for filtering and bulk operations should only appear after you have selected a checkbox.

briancwald commented 7 years ago

Here is the concept for this:

https://sketch.cloud/s/bggOj/all/table/table

mortenson commented 7 years ago

I'm working on this in https://github.com/briancwald/material_admin/tree/views-improvements-11, so far I just have the collapsed filter part done but haven't worked on the exposed filters yet.

Some questions:

  1. In your mockup, the ellipsis icon works as a dropbutton, instantly choosing to perform the bulk operation when a selection is made. The bulk operations form uses a select list and button by default, so this is going to require custom JS to do. I'll work on it but just wanted to make sure that's what we want. Another option is to use another collapsible area.
  2. If an exposed form is submitted, should it be expanded on the next page load? In my branch it's always collapsed regardless of state.
briancwald commented 7 years ago
  1. Yes, I think that makes sense it instantly goes on select, you can only select a single option and it takes you to a confirmation page. It follows this pattern here in 'alternative headers' https://material.io/guidelines/components/data-tables.html#data-tables-tables-within-cards

  2. In an ideal world, it would show the active filters as https://material.io/guidelines/components/chips.html you could clear, while the form itself would be closed unless clicked. That obviously is custom js and may be tricky.. so we may need to explore other options. let me know what you think.

mortenson commented 7 years ago

I like the concept of 2, but it might have to be a follow up if it ends up being too difficult.