Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Leverage mh-group to reduce the size needed for news item #175

Closed
chrisguindon opened this issue Oct 21, 2020 · 1 comment · Fixed by EclipseFdn/solstice-assets#183
Closed
Assignees

Comments

@chrisguindon
Copy link
Member

chrisguindon commented Oct 21, 2020

We currently make all news items the same height using https://github.com/liabru/jquery-match-height.

Because of this, the page can become very long if we have 1 news item with a lot of text.

Screen Shot 2020-10-21 at 7 35 03 AM

Requirement:

  • Drop match-height for news on sites with only 1 column for news-item. This must be configurable from the shortcode.

  • If we have 2 columns, like on eclipse.org and jakarta.ee, we need to create an mh-group for each news-item row. The goal is not to set the same height for all news items but only the ones that are side-by-side:

    • News 1 (mh-group: news-summary-item-1) | Community News 1 (mh-group: news-summary-item-1)
    • News 2 (mh-group: news-summary-item-2) | Community News 2 (mh-group: news-summary-item-2)
    • News 3 (mh-group: news-summary-item-3) | Community News 3 (mh-group: news-summary-item-3)
    • News 4 (mh-group: news-summary-item-4) | Community News 4 (mh-group: news-summary-item-4)
@chrisguindon chrisguindon changed the title Leverage my-group to reduce the size needed for news item Leverage mh-group to reduce the size needed for news item Oct 21, 2020
@flora8984461
Copy link
Contributor

the 3 pr is for this issue
EclipseFdn/solstice-assets#183
jakartaee/jakarta.ee#922
EclipseFdn/jquery-eclipsefdn-api#30

Reference:
liabru/jquery-match-height#177 is similar to my issue,
The answer proposed the following:

$('[data-mh]').matchHeight({ remove: true });
$.fn.matchHeight._maintainScroll = true;
$.fn.matchHeight._applyDataApi();

But for me I just need:
$.fn.matchHeight._applyDataApi();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants