Skip to content

feat: let the host place the suggestion panel - #26

Merged
HumanUser merged 1 commit into
mainfrom
feat/panel-stacking
Sep 3, 2026
Merged

HumanUser merged 1 commit into
mainfrom
feat/panel-stacking

Conversation

@HumanUser

@HumanUser HumanUser commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Why

The suggestion panel is portalled to document.body with a literal z-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 (default 100) — places the panel in the stacking order from the same place a host already remaps the other --flyql-* variables.
  • panelContainer prop on FlyqlEditor and FlyqlColumns, both packages (default body). 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-panel on the portalled node, so hosts that dismiss an overlay on outside-mousedown no longer depend on an internal class name. With panelContainer set the panel is a descendant of the overlay and needs no such check at all.

Container resolution is forgiving on purpose: Vue's Teleport resolves 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 to body when unresolvable.

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.
@HumanUser
HumanUser merged commit 5293436 into main Sep 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant