Skip to content

Conversation

@akirk
Copy link
Member

@akirk akirk commented Jan 21, 2026

Motivation for the change, related issues

This PR extracts shared overlay components from the saved-playgrounds-overlay to enable reuse across different overlay implementations. This is preparatory work for the persistent deployment feature, which will introduce a new overlay with similar structure but different content.

Implementation details

Creates a new components/overlay/ module with reusable primitives:

  • Overlay - Base container with escape key handling and fade-in animation
  • OverlayHeader - Header with optional logo, title, back button, and close button
  • OverlayBody - Scrollable body container
  • OverlaySection - Section with optional title and description

The saved-playgrounds-overlay is refactored to use these new components, reducing code duplication and making the overlay structure consistent.

Changes:

  • New: components/overlay/index.tsx and style.module.css
  • Modified: saved-playgrounds-overlay/index.tsx - now uses shared overlay components
  • Modified: saved-playgrounds-overlay/style.module.css - removed styles that moved to shared overlay

This is a pure refactor with no functional changes.

Testing Instructions (or ideally a Blueprint)

  1. Open the Playground website
  2. Click the Playground logo/menu to open the site manager overlay
  3. Verify the overlay displays correctly with:
    • Logo and close button in the header
    • "Start a new Playground" section
    • "Start from a Blueprint" section with preview cards
    • "Your Playgrounds" section with site list
  4. Click "View all X blueprints" to enter the blueprints gallery view
  5. Verify the back button and title appear correctly
  6. Test escape key closes the overlay
  7. Test that sub-modals (like "WordPress PR") still work correctly

@akirk akirk requested a review from adamziel January 21, 2026 11:09
Base automatically changed from fix-nx-undefined to trunk January 21, 2026 12:16
akirk added 2 commits January 21, 2026 17:49
Creates reusable Overlay, OverlayHeader, OverlayBody, and OverlaySection
components that can be shared across different overlay implementations.
This refactor prepares for the persistent deployment overlay.
@akirk akirk force-pushed the persistent/overlay-refactor branch from 9863d74 to 02c9df6 Compare January 21, 2026 16:49
@adamziel adamziel merged commit 243e90c into trunk Jan 21, 2026
34 checks passed
@adamziel adamziel deleted the persistent/overlay-refactor branch January 21, 2026 16:57
@adamziel adamziel changed the title Refactor out an Overlay component from saved-playgrounds-overlay [website] Refactor out an Overlay component from saved-playgrounds-overlay Jan 21, 2026
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.

3 participants