Add an equal height setting

Created on 18 March 2021, almost 4 years ago
Updated 16 February 2023, almost 2 years ago

We should provide some kind of "equal height groups". To do so Foundation provides the Equalizer script: https://get.foundation/sites/docs/equalizer.html

Equal Height Group:
- A boolean / checkbox: "Equalize height with sibling contents" => Automatically find other childrens inside this container
- An additional "Height Group Name/ID" text - or even better - autocomplete (with existing values) field, to define custom groups, if the automatism fails

Feature request
Status

Fixed

Version

4.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • This becomes more.. important now, because a customer asked for this feature.

    An additional "Height Group Name/ID" text - or even better - autocomplete (with existing values) field, to define custom groups, if the automatism fails

    Reading the ideas here again, my favorite is this solution, because its very flexible to use. Gave the same "id" to each paragraph which should have the same height, JS detects the heighest one and updates an according CSS variable. No brainer. We might need to update this on screen resize (https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver).

    Improving the min-height setting is also a thing, but not that important, and of course not a replacement for this JS solution.

  • Assigned to Anybody
  • Status changed to Active almost 2 years ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Okay, let's implement this. Autocomplete would make sense, but will cost some time to implement, so this might be a follow-up (for in years, not months ;)).

    I'll prepare a MR.

  • @anybody opened merge request.
  • Assigned to thomas.frobieter
  • Status changed to Needs review almost 2 years ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @thomas.frobieter here we go.

    I added the field, its schema and it's now added as data-equal-height-group="VALUE" attribute.
    I wasn't sure about that part, but at least that should make clear, how to use it. Perhaps that kind of neutral attribute is also a good idea, or perhaps not.

    I guess you can now make the next steps from here.

    Everything else not implemented here, but still making sense, should then be transfered into a separate follow-up task, so we can close this one fixed when the feature is merged.

  • Assigned to Anybody
  • Status changed to Active almost 2 years ago
  • Sounds very good, data-attribute is exactly what I've imagined. I'll add the JS part and we are done :)

    I agree, we should split the other ideas into seperate tasks, I will do this later!

  • Assigned to thomas.frobieter
  • Assigned to Anybody
  • Done! Please review :)

    We might should improve it.. by also comparing the getBoundingClientRect().top values inside one group. This would be a pretty simple streightforward way to make this more mobile friendly, by adressing only the current layout row, instead of all cells in all rows... mhm.

  • Assigned to thomas.frobieter
  • Status changed to Needs work almost 2 years ago
  • 🇩🇪Germany Anybody Porta Westfalica

    @thomas.frobieter review done! Nice work! :)

    Please fix the clear issues and afterwards please assign @Grevil for his comments. I don't have the time to check for the correct implementation details in the loops. But we should be 100% sure to use it correctly for performance and functionality reasons.

  • Assigned to Grevil
  • Status changed to Needs review almost 2 years ago
  • First commit to issue fork.
  • Status changed to RTBC almost 2 years ago
  • 🇩🇪Germany Grevil

    LGTM! Just a few minor adjustments. :)

  • Status changed to Needs work almost 2 years ago
  • 🇩🇪Germany Grevil

    Uncaught TypeError: el.style is undefined

  • Status changed to Fixed almost 2 years ago
  • Updated Issue description and moved the min-height setting improvements to: https://www.drupal.org/project/drowl_paragraphs/issues/3342355 Improve the min-height setting Active

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024