Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the miss due to which other class was not getting added to the very first article & that's the latest article was not listed #558

Closed
wants to merge 1 commit into from

Conversation

meejain
Copy link

@meejain meejain commented Jan 11, 2024

… first index = 0 for any feed-newsroom block & that's why very first article was not listed

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after), along with a short summary of changes:

Issue

Fixes #557

Changelog:

Please enter each change as a new bullet point

Test URLs:

Library

  • New Blocks introduced in this PR
    If yes, please provide details below
    Block Name : For e.g. cards

  • Documented in sidekick library

  • New variations introduced in this PR
    Variation Name : For e.g. cards (grid)

  • Documented in sidekick library

  • New mixins introduced in this PR
    Mixin Name : For e.g. compact, white

  • Documented in sidekick library

… first index = 0 for any feed-newsroom block & that's why very first article was not listed
@meejain meejain self-assigned this Jan 11, 2024
Copy link

aem-code-sync bot commented Jan 11, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

aem-code-sync bot commented Jan 11, 2024

Page Scores Audits Google
/newsroom PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@jindaliiita
Copy link

AFAIR we have to raise PR in https://github.com/sunstar-global/sunstar

@@ -6,7 +6,10 @@ export default async function decorate(block) {
others.classList.add('others');
block.querySelectorAll(':scope > div').forEach((div, index) => {
if (index === 0) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified version

if (index === 0 && !hideSpotlight) {
spotlight = div;
} else {
div.classList.add('other');
others.appendChild(div);
}

Copy link

@sdmcraft sdmcraft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@meejain could you shift this PR against https://github.com/sunstar-global/sunstar

@meejain
Copy link
Author

meejain commented Jan 12, 2024

PR raised in sunstar global - sunstar-global#18. Hence closing this

@meejain meejain closed this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

newsroom page - Not showing latest news articles for en & jp URL's
3 participants