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

[MWPW-161858] - fix: [Sticky bottom issues with high resolution with short content page] #3191

Closed
wants to merge 1 commit into from

Conversation

saugatmalla
Copy link
Contributor

@saugatmalla saugatmalla commented Nov 13, 2024

From MWPW-161858: When the footer is in the view screen, a block with sticky-bottom to add "hide-sticky-section" and display none.

Resolves: MWPW-161858

Test URLs:

added addtional check for footer
@saugatmalla saugatmalla requested review from aishwaryamathuria and a team November 13, 2024 16:49
Copy link
Contributor

aem-code-sync bot commented Nov 13, 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

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.37%. Comparing base (1fa592a) to head (7017b24).
Report is 731 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #3191      +/-   ##
==========================================
+ Coverage   95.69%   96.37%   +0.68%     
==========================================
  Files         165      245      +80     
  Lines       43542    56613   +13071     
==========================================
+ Hits        41668    54563   +12895     
- Misses       1874     2050     +176     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

Comment on lines +21 to +26

if (entry.target === document.querySelector('footer')) {
isFooterStart = entry.isIntersecting;
}

if (entry.isIntersecting || abovePromoStart || isFooterStart) el.classList.add('hide-sticky-section');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can reduce the complexity for this, and not cache isFooterStart:

Suggested change
if (entry.target === document.querySelector('footer')) {
isFooterStart = entry.isIntersecting;
}
if (entry.isIntersecting || abovePromoStart || isFooterStart) el.classList.add('hide-sticky-section');
if (entry.isIntersecting ||
abovePromoStart ||
(entry.target === document.querySelector('footer') && entry.isIntersecting)) {
el.classList.add('hide-sticky-section');
}

@NadiiaSokolova NadiiaSokolova self-assigned this Nov 26, 2024
Copy link
Contributor

github-actions bot commented Dec 4, 2024

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added Stale and removed Stale labels Dec 4, 2024
Copy link
Contributor

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added the Stale label Dec 13, 2024
@robert-bogos
Copy link
Contributor

A new PR was opened for this issue: #3402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants