Skip to content

[Website] Move Playground tools into the bottom Dock - #4009

Merged
adamziel merged 8 commits into
trunkfrom
dock-ui-product-wiring
Jul 15, 2026
Merged

[Website] Move Playground tools into the bottom Dock#4009
adamziel merged 8 commits into
trunkfrom
dock-ui-product-wiring

Conversation

@adamziel

@adamziel adamziel commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Replaces the former Playground with a Dock:

New Playground gallery

Rationale

The current Playground UI is fragmented between sidebars, modals, and popovers. Features are difficult to discover and difficult to find. Users are getting confused about why the browser bar is a part of the WP Admin bar, which it isn't but it certainly blends in:

CleanShot 2026-07-15 at 20 00 37@2x

The dock solves these problems by surfacing the tools in a single UI area. It covers a part of the Playground site, so it offers a few ways of getting it our of the way:

  • It can be maximized, which then pushes the entire site above it.
  • It can be dragged, literally moving it out of the way.
  • It can be made smaller by hiding the tools.
  • It can be dragged all the way to the side, where it becomes a small badge.

UI walkthroughs

Startup and Site details

Startup and Site details

Dock navigation and operation errors

Dock navigation and operation errors

Files in the Dock

Operation error above Playgrounds

Operation error retained above the Dock

Testing

Spend time using the Dock UI in your local Playground, open PRs to fix rough edges.

@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from c83c44d to bd9a706 Compare July 11, 2026 10:31
Base automatically changed from file-editor-filesystem-ownership to trunk July 11, 2026 10:44
@adamziel
adamziel requested review from a team and bgrgicak July 11, 2026 10:44
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from bd9a706 to 141fd1e Compare July 11, 2026 10:45
Copilot AI review requested due to automatic review settings July 11, 2026 11:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Moves the Playground website’s tool surfaces (new/playgrounds, editors, database/logs, export, navigation/status) into a unified bottom Dock, replacing the legacy toolbar/sidebar/overlay shells while preserving existing underlying implementations.

Changes:

  • Introduces a new Dock component that routes all tool destinations through a single pane with support for mobile/full-width/collapsed/dragged/cornered layouts.
  • Refactors Site Manager panels to stay mounted after first open (preserving drafts/editor state) and adds a new “Export” (share) pane.
  • Updates Blueprint/file editor persistence behavior (debounced flush + serialized filesystem writes) and aligns Playwright/Cypress tests to the new UI.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/playground/website/src/lib/state/redux/slice-ui.ts Expands SiteManagerSection destinations and updates initial pane/overlay open behavior.
packages/playground/website/src/lib/hooks/use-debounced-callback.ts Adds flushable debounced callback to support “save on unmount” behavior.
packages/playground/website/src/components/toolbar-buttons/download-as-zip.tsx Exposes ZIP download helper for reuse in the Dock export pane.
packages/playground/website/src/components/site-manager/style.module.css Adjusts site manager container styling for Dock-pane hosting.
packages/playground/website/src/components/site-manager/site-share-panel/style.module.css New styles for the export/share pane.
packages/playground/website/src/components/site-manager/site-share-panel/index.tsx New export pane (ZIP download, setup URL copy, GitHub export modal).
packages/playground/website/src/components/site-manager/site-info-panel/style.module.css Updates visibility handling and small-screen header layout.
packages/playground/website/src/components/site-manager/site-info-panel/index.tsx Keeps tool tabs mounted while routing visibility via Dock destination.
packages/playground/website/src/components/site-manager/index.tsx Routes Dock destinations to saved-playgrounds, share, and site tools surfaces.
packages/playground/website/src/components/site-manager/blueprints-panel/style.module.css Adjusts blueprint gallery panel styling for Dock layout.
packages/playground/website/src/components/site-manager/blueprints-panel/index.tsx Simplifies Blueprint panel API and changes fetch URL.
packages/playground/website/src/components/saved-playgrounds-panel/style.module.css Removes overlay-specific styles and adds Dock-pane container styles.
packages/playground/website/src/components/saved-playgrounds-panel/index.tsx Reworks saved playgrounds UI to be a Dock pane; embeds blueprint gallery.
packages/playground/website/src/components/layout/style.module.css Updates layout styling to integrate Dock and blurred/inert preview behavior.
packages/playground/website/src/components/layout/index.tsx Replaces legacy chrome with Dock; manages inert/blur + click-to-dismiss surface.
packages/playground/website/src/components/dock/style.module.css Adds Dock layout, pane transitions, disabled states, and mobile behavior.
packages/playground/website/src/components/dock/index.ts Re-exports the new Dock component.
packages/playground/website/src/components/dock/dock.tsx New Dock implementation (routing, focus, drag, collapse/full-width, overlay param cleanup).
packages/playground/website/src/components/dock/dock-toggle-pill.tsx Disables/hints collapse while pane close is blocked.
packages/playground/website/src/components/dock/dock-item-button.tsx Adds disabled support for Dock tool buttons.
packages/playground/website/src/components/browser-chrome/style.module.css Removes obsolete toolbar styling now that Dock owns chrome.
packages/playground/website/src/components/browser-chrome/index.tsx Reduces BrowserChrome to preview wrapper only.
packages/playground/website/src/components/blueprint-editor/blueprint-editor-filesystem.ts Adds queued filesystem wrapper to prevent reads overtaking pending writes.
packages/playground/website/src/components/blueprint-editor/blueprint-editor-filesystem.spec.ts Adds test ensuring remount waits for pending write.
packages/playground/website/src/components/blueprint-editor/SiteBlueprintBundleEditor.tsx Uses queued filesystem wrapper (OPFS + in-memory) for editor correctness.
packages/playground/website/src/components/blueprint-editor/BlueprintBundleEditor.tsx Flushes debounced writes on unmount and before running Blueprint.
packages/playground/website/src/components/address-bar/style.module.css Improves focus-visible styling and input focus outline.
packages/playground/website/src/components/address-bar/index.tsx Adds disabled state plumbing for address bar controls.
packages/playground/website/playwright/website-page.ts Updates test helpers to operate via Dock destinations/panes.
packages/playground/website/playwright/e2e/website-ui.spec.ts Adds Dock-focused E2E coverage and migrates existing tests from tabs/overlay.
packages/playground/website/playwright/e2e/vanilla-wordpress-screenshot.spec.ts Updates screenshot path to renamed saved-playgrounds component directory.
packages/playground/website/playwright/e2e/opfs.spec.ts Migrates OPFS flows to Dock destinations; updates ZIP import close-block behavior.
packages/playground/website/playwright/e2e/deployment.spec.ts Updates offline-mode shell assertion to use Dock presence.
packages/playground/website/cypress/e2e/query-api.cy.ts Migrates Cypress selectors/flows to Dock export/new tools.
packages/playground/components/src/PlaygroundFileEditor/playground-file-editor.tsx Prevents hidden-but-mounted editor from stealing focus when Dock switches panes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/playground/website/src/components/layout/index.tsx
Comment thread packages/playground/website/src/components/dock/dock.tsx
Comment thread packages/playground/website/src/components/site-manager/index.tsx
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from e126c6d to 1e00362 Compare July 12, 2026 22:13
@adamziel
adamziel changed the base branch from trunk to startup-progress-card July 13, 2026 11:44
Base automatically changed from startup-progress-card to trunk July 13, 2026 14:32
@adamziel
adamziel changed the base branch from trunk to website-playgrounds-new-panel July 13, 2026 16:05
@adamziel
adamziel requested a review from Copilot July 13, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 73 out of 73 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

packages/playground/website/src/components/saved-playgrounds-panel/index.tsx:1456

  • This flow still uses a blocking alert for success messaging while other operations were migrated to Dock operation notices. Consider replacing the alert with the same non-blocking notice mechanism (e.g., setDockOperationNotice or an existing toast/notice component) to keep UX consistent and avoid interrupting keyboard focus/automation.
							onImported={(details) => {
								githubExportSession.recordImport(details);
								// eslint-disable-next-line no-alert
								alert(
									'Import finished! Your Playground has been updated.'
								);
Comment thread packages/playground/website/src/components/address-bar/index.tsx Outdated
Comment thread packages/playground/website/src/github/github-export-session.tsx
Comment thread packages/playground/website/src/github/github-export-session.tsx Outdated
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from d4d46b5 to 0a02456 Compare July 13, 2026 20:02
@adamziel
adamziel force-pushed the website-playgrounds-new-panel branch from 9d93854 to c866c4a Compare July 14, 2026 12:32
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 0a02456 to 0e9c463 Compare July 14, 2026 12:35
@adamziel
adamziel force-pushed the website-playgrounds-new-panel branch from c866c4a to bb8383e Compare July 14, 2026 12:47
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 0e9c463 to 3ed5513 Compare July 14, 2026 12:48
@adamziel
adamziel force-pushed the website-playgrounds-new-panel branch from bb8383e to a33b221 Compare July 14, 2026 13:09
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 3ed5513 to 521f756 Compare July 14, 2026 13:10
@adamziel
adamziel force-pushed the website-playgrounds-new-panel branch from a33b221 to 270164a Compare July 14, 2026 13:29
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 521f756 to 43f7ba1 Compare July 14, 2026 13:29
@adamziel
adamziel force-pushed the website-playgrounds-new-panel branch from 270164a to 74ee85e Compare July 14, 2026 13:43
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from e4c3511 to b068170 Compare July 14, 2026 23:52
@adamziel
adamziel changed the base branch from trunk to address-bar-accessibility July 14, 2026 23:52
@adamziel
adamziel force-pushed the address-bar-accessibility branch from 384755e to 86c5475 Compare July 15, 2026 00:06
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from b068170 to 3dc6613 Compare July 15, 2026 00:06
adamziel added a commit that referenced this pull request Jul 15, 2026
This PR adds the calculations that keep bottom Dock panes and operation
notices inside the viewport.

The Dock in #4009 currently performs these calculations inside its main
component. That mixes rendering and pointer state with desktop, mobile,
narrow-viewport, and open-pane geometry.

The new module calculates pane height and position, clamps panes at both
viewport edges, places notices above an open pane, and keeps notices
on-screen when a pane consumes most of the viewport. Focused tests lock
those boundaries down.

Nothing imports the module yet, so this PR does not change the website
UI. #4009 will use it when the rest of the Dock stack lands for #3965.

Tested with:

- `npm exec nx test playground-website --
--testFile=dock-positioning.spec.ts --output-style=static`
- `npm exec nx typecheck playground-website -- --output-style=static`
- `npm exec nx lint playground-website -- --output-style=static`
adamziel added a commit that referenced this pull request Jul 15, 2026
This PR moves the five Site Manager tool bodies out of `SiteInfoPanel`
without changing the current Site Manager UI.

`SiteInfoPanel` currently owns two separate jobs: the Playground header
and actions, and the Settings, File browser, Blueprint, Database, and
Logs tab contents. The bottom Dock in #4009 needs those tool contents
without the old header.

`SiteToolPanels` now owns the existing tab contents. `SiteInfoPanel`
still owns the same `TabPanel`, passes its selected tab into the new
component, and renders the same tools with the same loading, offline,
temporary-site, and read-only states. A focused test verifies that
changing tabs hides inactive tools without unmounting them.

This is the second PR in the #4009 stack for #3965. It is based on
#4056.

Tested with:

- `npm exec nx test playground-website -- --output-style=static`
- `npm exec nx typecheck playground-website -- --output-style=static`
- `npm exec nx lint playground-website -- --output-style=static`
adamziel added a commit that referenced this pull request Jul 15, 2026
#4058)

This PR lets the address bar stay visible but disabled while a
Playground loads and makes its quick links work as an accessible
keyboard listbox.

The current quick-link menu moves keyboard focus out of the address
field. The address field now remains the focused combobox. Up and Down
select an option through `aria-activedescendant`, Enter opens it, and
Escape closes the list. Pointer selection uses the same options without
moving focus before the click.

The new `disabled` property disables both the address field and refresh
button, closes an open list, and keeps the displayed URL in sync. This
lets #4009 keep the bottom Dock layout stable while there is no
Playground client to navigate yet. The current address bar still opens
its list below the field; #4009 will move it above the field when the
bar moves to the bottom Dock.

This is the third PR in the #4009 stack for #3965. It is based on #4057.

Tested with:

- `npm exec nx test playground-website -- --output-style=static`
- `npm exec nx typecheck playground-website -- --output-style=static`
- `npm exec nx lint playground-website -- --output-style=static`
Base automatically changed from address-bar-accessibility to trunk July 15, 2026 00:09
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 3dc6613 to dcf08b3 Compare July 15, 2026 00:11
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch 2 times, most recently from 9fccf8e to 54bd711 Compare July 15, 2026 11:11
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch 2 times, most recently from 2d742a9 to 051cd97 Compare July 15, 2026 11:57
@adamziel
adamziel force-pushed the dock-ui-product-wiring branch from 051cd97 to 90b647c Compare July 15, 2026 11:58
@adamziel

Copy link
Copy Markdown
Collaborator Author

This is a large PR and some rough edges are expected. That being said, it's difficult to keep iterating within the confines of a single large PR and there aren't many more smaller changes I can carve out of this. I'll go ahead and merge, and then we'll resolve any papercuts one by one in follow-up PRs between now and the next playground.wordpress.net deployment on Tuesday July 21st.

@adamziel
adamziel merged commit 8a9a9a0 into trunk Jul 15, 2026
53 checks passed
@adamziel
adamziel deleted the dock-ui-product-wiring branch July 15, 2026 19:39
adamziel added a commit that referenced this pull request Jul 15, 2026
This keeps the Dock corner launcher clickable immediately after a drag
and adds coverage for the missing desktop-corner and mobile-close flows.

#4009 suppresses the click synthesized after dragging so a drag cannot
activate a Dock control. That listener was global. With reduced motion
enabled, the corner launcher appears immediately, and its first click
was swallowed even though the launcher is outside the Dock. This limits
suppression to click targets inside the dragged Dock.

The Playwright tests now fold and reopen the desktop Dock, confirm an
open pane prevents folding, close a mobile pane, and verify that closing
returns focus to its Dock button and makes the preview interactive
again. The flows pass in Chromium, Firefox, and WebKit.

This PR is stacked on #4009 so the production change and added coverage
do not enlarge that PR.

## Testing

- Selected corner and mobile Playwright tests: 6/6 across Chromium,
Firefox, and WebKit
- `npx nx run-many -t lint,typecheck,test -p playground-website`: 57
test files, 303 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment