Skip to content

Smooth side panel transition with CSS grid animation#84

Merged
stylessh merged 1 commit intomainfrom
smooth-side-panel-transition
Apr 12, 2026
Merged

Smooth side panel transition with CSS grid animation#84
stylessh merged 1 commit intomainfrom
smooth-side-panel-transition

Conversation

@stylessh
Copy link
Copy Markdown
Owner

Summary

  • Replace flex layout with animated CSS grid (gridTemplateColumns) so the main content card resizes smoothly when navigating between pages with/without a side panel
  • Clone removed portal content into a ghost div for a visible exit animation (fade + clip) instead of instant disappearance
  • Add useMediaQuery hook to gate the panel column on the xl breakpoint

Test plan

  • Navigate from repo overview (has side panel) to another page — main card should smoothly expand
  • Navigate back to repo overview — side panel should smoothly slide in
  • Toggle side panel collapse/expand on repo overview — should animate smoothly
  • Resize window across the xl breakpoint — panel should hide/show correctly
  • Verify no layout distortion on inner page content during transitions

Replace flex layout with CSS grid and animate gridTemplateColumns
so the main content card resizes smoothly when navigating between
pages with and without a side panel. Avoids Framer Motion layout
prop which distorts inner children via scale transforms.

- Convert parent flex container to grid with spring-animated columns
- Clone removed portal content into ghost div for exit animation
- Add useMediaQuery hook to gate panel column on xl breakpoint
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
diffkit 4b00cee Commit Preview URL

Branch Preview URL
Apr 12 2026, 10:32 PM

@stylessh stylessh merged commit e669d63 into main Apr 12, 2026
4 checks passed
stylessh added a commit that referenced this pull request Apr 18, 2026
Replace flex layout with CSS grid and animate gridTemplateColumns
so the main content card resizes smoothly when navigating between
pages with and without a side panel. Avoids Framer Motion layout
prop which distorts inner children via scale transforms.

- Convert parent flex container to grid with spring-animated columns
- Clone removed portal content into ghost div for exit animation
- Add useMediaQuery hook to gate panel column on xl breakpoint
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