backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 40 forks source link

[D10] Views: (even more) responsive grid format #5719

Open klonos opened 2 years ago

klonos commented 2 years ago

This is the respective issue as Create new “Views Responsive Grid” format for Views Core

I know that we have implemented #479 many years ago, and that we also have issues like #4375 and #4560, but I just came across this: Views Responsive Grid added to Drupal 10 core article, and it seems to me that what our Drupal brethren have implemented would work better and more intuitively:

Earlier today a new killer feature was committed to Drupal 10 core: Views Responsive Grids. But, it’s more than that. ... The styles make use of new modern CSS that enable super cool features.

Instead of specifying the number of columns, and screen widths, we specify:

  1. the maximum number of columns, and
  2. the minimum grid cell width.
  3. the gutter spacing

This is way more flexible than the former method!

The CSS works in such a way that when the grid cells resize to a point where they’re below the minimum width, the grid will reflow to have less columns. Alternatively, the grid will expand to fit in as many columns as permitted, while keeping the grid width above the minimum value!

Also, because the CSS is not reliant on the viewport width, the same grid view display is able to be used in a large region (and show more columns) and a narrow region (which would show less columns)! It will adjust automagically!

...

Here it is in action:

grid-view-horiz

grid-view-vert

https://herchel.com/sites/default/files/2022-08/grid-view.mp4

One thing to consider is that such a feature would not work with IE11. ...but is that even an issue nowadays, with most of the world using either Chrome or Edge?

indigoxela commented 2 years ago

Yes, I agree that could be a nice addition to core. When adding the cards view to core, we already discovered some flaws of our current grid display format.

But it could also be a contrib candidate - might depend on more feedback we get here.

Note: we should not touch the existing grid format to not break existing sites, but add a completely new one.

... such a feature would not work with IE11 ...but is that even an issue nowadays

Not a big issue anymore, now that MS dropped support.