Repository navigation
The custom-rule editor is a real child window, not a dialog - #25
Merged
Merged
Conversation
The rule being written is about a field the person can still see, select and reread while they write it — so the editor now opens through the shell's own windowing, `windowManager.openChild()`, as a window the builder owns: its own chrome, drag, resize, minimize and taskbar entry, centered over the builder, which stays scrollable and readable beside it but can never sit above its child. Save and the title-bar X both funnel through the window's close; `onClose` is the one place that decides whether that was a cancel, so the picker reverts however the window goes away. The overlay remains as the fallback on the plain admin page, where there is no shell to ask. The editor's UI is built once, by one function, into whichever host is showing it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
Three refinements from live review: The editor's host is now pinned absolutely to the window body instead of sized 100% — the body is a flex item with overflow hidden and no explicit height, so the percentage could resolve against nothing and the content grew past the window with the Save button clipped somewhere nobody could reach. Save and Cancel ride the bottom of the scrollport as a sticky bar with a top border, so in a window the person sizes themselves, "scroll to find Save" stops being a step at all. The condition row's dropdowns are the shell's own <os-select> when its components are loaded — the same control the inspector uses, so nothing on the card reads as a foreign widget — with the free-text value input and the chips raised to the trigger's scale and the row centered as one line. The compact native select remains as the fallback for the plain admin page, now with the 30px wp-admin floor explicitly zeroed, which is what had it towering over its own row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
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.
Follow-up to #24, on review feedback: the custom validation editor opened as an overlay dialog, but OpenStation offers real child windows — so now it uses them.
What changed
openValidationEditor()now asks the shell first: it resolves the builder's window id (windowIdOf) and opens the editor viawp.os.windowManager.openChild()— a native child window owned by the builder:ephemeral: truesays so explicitly).onCloseis the single place that decides whether that was a cancel, so the inspector's picker reverts however the window goes away.baseId.The overlay dialog remains only as the fallback on the plain admin page, where there is no shell. The editor UI itself (blocks, expression tab, plain-words summary, playground) is built once by one function into whichever host shows it — no duplication between the two modes.
QA (8889, live)
wp-window-allterrain-forms-validation-f3with full chrome, no overlay/backdrop.Tests: 337 vitest pass; no PHP changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp