Skip to content

Stabilize catalog previews while scrolling - #751

Merged
kkd16 merged 1 commit into
mainfrom
fix-catalog-preview-scroll
Aug 4, 2026
Merged

Stabilize catalog previews while scrolling#751
kkd16 merged 1 commit into
mainfrom
fix-catalog-preview-scroll

Conversation

@kkd16

@kkd16 kkd16 commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • rank intersecting preview cards by distance to the viewport center
  • recalculate handoff as intersection ratios change during scrolling
  • keep the existing two-iframe limit from Optimize catalog preview loading #750

This fixes incoming previews loading late and disappearing shortly afterward because cards already above the viewport retained the two available slots.

Verification

  • node --check assets/catalog.js
  • git diff origin/main...HEAD --check
  • node scripts/build-site.mjs --catalog-only (47 projects published, 0 rejected)
  • DevTools trace across 15 scroll positions confirmed each incoming row receives both slots while entering the viewport and retains them through its visible pass

Scope

This branch starts from current origin/main after #750 and changes only assets/catalog.js (10 additions, 2 deletions). It requires manual admin merge because the project-only auto-merge gate intentionally rejects catalog-shell changes.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 Out of scope. changes outside a project folder are never auto-merged (e.g. "assets/catalog.js")

Change only one projects/<slug>/ folder, then push again. Run node scripts/verify-project.mjs <slug> first — it catches this locally.

@kkd16
kkd16 merged commit 9d9b7a3 into main Aug 4, 2026
1 of 2 checks passed
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.

1 participant