Skip to content

[Website] Position WordPress notices above the floating Dock - #4237

Open
adamziel wants to merge 2 commits into
trunkfrom
adamziel/move-notices-above-dock
Open

[Website] Position WordPress notices above the floating Dock#4237
adamziel wants to merge 2 commits into
trunkfrom
adamziel/move-notices-above-dock

Conversation

@adamziel

@adamziel adamziel commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

WordPress editor notices now stay above the floating Dock. The website measures the Dock and passes its bottom offset through the Playground client; the remote frame relays it to WordPress with postMessage, so no frame needs cross-origin DOM access.

Before After
WordPress notice hidden by the floating Dock WordPress notice positioned above the floating Dock

Testing

In the Site Editor or Post Editor, trigger a notice and switch the Dock between full-width, floating, and collapsed modes. Repeat with the website and remote.html on different origins. Confirm that the notice stays clear of the Dock and returns to WordPress's native spacing when the iframe is resized.

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.

Adjusts WordPress editor notice/snackbar positioning so they remain visible above the floating Playground Dock by exposing a stable DOM hook in the Dock and adding an MU-plugin that dynamically offsets notices based on the Dock’s live geometry.

Changes:

  • Added a stable data-playground-dock attribute to the Dock element for host/MU-plugin discovery.
  • Injected admin-footer CSS/JS in the MU-plugin to detect Dock overlap across iframe layers and adjust snackbar bottom spacing accordingly.

Reviewed changes

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

File Description
packages/playground/website/src/components/dock/dock.tsx Exposes a stable DOM hook (data-playground-dock) for the MU-plugin to locate the Dock.
packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Adds admin-footer logic to track Dock position and push editor snackbars above it when overlapping.

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

Comment thread packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Outdated
Comment thread packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Outdated
Comment thread packages/playground/remote/src/lib/playground-mu-plugin/0-playground.php Outdated
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.

2 participants