Repository navigation
feat: let the host place the suggestion panel - #26
Merged
Merged
Conversation
The panel is portalled to document.body with a literal z-index of 100, so an editor inside a host overlay that outranks it was hidden completely while still working. Drawers and modals commonly sit well above 100, and raising the literal only moves the problem to another host. --flyql-panel-z-index places the panel in the stacking order. A panelContainer prop on FlyqlEditor and FlyqlColumns takes a selector or an element and portals the panel there instead, inheriting that element's stacking context. The target is re-resolved on every open and falls back to body when missing, since Vue's Teleport resolves once at mount and throws on an overlay that mounts later. The portalled node now carries data-flyql-panel, so outside-click handlers no longer depend on an internal class name. Bumps to 1.4.0.
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.
Why
The suggestion panel is portalled to
document.bodywith a literalz-index: 100. An editor inside a host overlay that outranks it is hidden completely - the query still parses and suggestions are still computed, but nothing is visible, so the field reads as broken. Drawers and modals in the common toolkits all default well above 100, and raising the literal would only move the problem to a different host.What
--flyql-panel-z-index(default100) — places the panel in the stacking order from the same place a host already remaps the other--flyql-*variables.panelContainerprop onFlyqlEditorandFlyqlColumns, both packages (defaultbody). Takes a selector or an element; the panel portals there and inherits that element's stacking context, so no z-index arithmetic is needed.data-flyql-panelon the portalled node, so hosts that dismiss an overlay on outside-mousedownno longer depend on an internal class name. WithpanelContainerset the panel is a descendant of the overlay and needs no such check at all.Container resolution is forgiving on purpose: Vue's
Teleportresolves its target once at mount and throws when it is missing - which a host overlay mounting after the editor triggers routinely - so the target is re-resolved on every open and falls back tobodywhen unresolvable.