fix(site): keep phase cards visible after renderPhases re-render#107
fix(site): keep phase cards visible after renderPhases re-render#107pzy0006 wants to merge 1 commit into
Conversation
renderPhases() rebuilds the .toc-row nodes via innerHTML, but the IntersectionObserver in initFadeObserver() only watches the original rows from page load. When AIFSProgress.onChange fires (e.g. on a storage event after returning from lesson.html), the new rows are not observed and stay at opacity:0 under 'body.js-anim .toc-row', making the curriculum cards disappear. After re-rendering, re-apply stagger delays and, if the reveal has already initialised (body.js-anim is set), mark the rebuilt rows .in-view .visible immediately so they don't get stuck hidden.
|
@pzy0006 is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe PR adds post-render handling to ChangesPhase Grid Rendering
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
renderPhases() rebuilds the .toc-row nodes via innerHTML, but the IntersectionObserver in initFadeObserver() only watches the original rows from page load. When AIFSProgress.onChange fires (e.g. on a storage event after returning from lesson.html), the new rows are not observed and stay at opacity:0 under 'body.js-anim .toc-row', making the curriculum cards disappear.
After re-rendering, re-apply stagger delays and, if the reveal has already initialised (body.js-anim is set), mark the rebuilt rows .in-view .visible immediately so they don't get stuck hidden.
What this PR does
Kind of change
Checklist
LESSON_TEMPLATE.mdstructure[Name](phases/...)), not bare textdocs/en.mdclaimsPhase / lesson
Notes for reviewer
Summary by CodeRabbit