Skip to content

Implement infinite scroll for learning paths#382

Merged
Aditya948351 merged 2 commits into
devpathindcommunity-india:masterfrom
nancy-verma780:feat-infinite-scroll
May 31, 2026
Merged

Implement infinite scroll for learning paths#382
Aditya948351 merged 2 commits into
devpathindcommunity-india:masterfrom
nancy-verma780:feat-infinite-scroll

Conversation

@nancy-verma780
Copy link
Copy Markdown
Contributor

Description

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Local testing
  • Vercel Preview Deployment

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have checked that the "DevPath India" branding remains intact

Copy link
Copy Markdown
Collaborator

@Aditya948351 Aditya948351 left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

However, there are a few architectural issues with this implementation that need to be addressed:

  1. Horizontal vs Vertical Observer Placement: The LearningPaths component is a horizontal carousel. Placing the IntersectionObserver anchor div below the carousel means it will trigger immediately as soon as the section comes into vertical view, instantly loading the paths and completely defeating the purpose of lazy scrolling. For a horizontal carousel, the observer target needs to be placed inside the scrollable flex container at the very right end.
  2. Issue Linking: Please update the PR description to explicitly link the correct issue number (Fixes #(issue)) so it is tracked correctly.

Could you please update the observer logic to trigger based on the horizontal scroll position within the carousel container?

@nancy-verma780
Copy link
Copy Markdown
Contributor Author

Hi @Aditya948351, thank you for pointing that out! That makes total sense—since the layout flows horizontally, a standard vertical bottom anchor would trip instantly.I have refactored the layout logic inside LearningPaths.tsx. The IntersectionObserver element anchor has been moved directly inside the horizontal carousel flexbox row at the far right end. It now monitors tracking intersections along the x-axis loop context parameters safely.I have also updated the PR description header block to link directly with issue #372. Could you please take another look? Thank you!

Copy link
Copy Markdown
Collaborator

@Aditya948351 Aditya948351 left a comment

Choose a reason for hiding this comment

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

Reviewed the updated changes! The IntersectionObserver logic looks functional for lazy loading the horizontal carousel items. @nancy-verma780 Approved!

@Aditya948351 Aditya948351 merged commit b0687a1 into devpathindcommunity-india:master May 31, 2026
@nancy-verma780 nancy-verma780 deleted the feat-infinite-scroll branch May 31, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants