[Website] Position WordPress notices above the floating Dock - #4237
Open
adamziel wants to merge 2 commits into
Open
[Website] Position WordPress notices above the floating Dock#4237adamziel wants to merge 2 commits into
adamziel wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
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-dockattribute 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.htmlon different origins. Confirm that the notice stays clear of the Dock and returns to WordPress's native spacing when the iframe is resized.