Skip to content

feat(portal-provider): Add portal layer provider#1080

Open
kunalpanchal wants to merge 1 commit into
mainfrom
kunal/cui-179-portal-layer-provider
Open

feat(portal-provider): Add portal layer provider#1080
kunalpanchal wants to merge 1 commit into
mainfrom
kunal/cui-179-portal-layer-provider

Conversation

@kunalpanchal

@kunalpanchal kunalpanchal commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a ClickUI portal provider API for detached panels and other layered surfaces.

  • Adds PortalProvider, usePortalContainer, and useResolvedPortalContainer
  • Lets overlay components use an explicit provider container while preserving existing per-component container overrides
  • Wires provider fallback through portal-based components including Select, Popover, Tooltip, Dropdown, AutoComplete, DatePicker, ContextMenu, HoverCard, Dialog, and Flyout
  • Adds focused tests for provider placement and explicit container override
  • Adds a minor changeset for the new public API

Context

This supports CUI-179 and avoids product code needing to target Radix internals or inject global z-index CSS for detached panels.


Note

Medium Risk
Touches portal mounting across many overlay components; wrong container choice could affect stacking, focus, or clipping in embedded panels, though behavior is backward-compatible when no provider is used.

Overview
Introduces PortalProvider and useResolvedPortalContainer so layered UI can default to a shared DOM mount point instead of only per-component Radix portals.

Wrap overlay Select, Popover, Tooltip, Dropdown, AutoComplete, DatePicker, ContextMenu, HoverCard, Dialog, and Flyout so their portal container comes from the provider when a content prop does not pass container explicitly; passing container on a component still wins. Tooltip gains a container prop on content (types moved to Tooltip.types.ts). The public package exports PortalProvider, usePortalContainer, useResolvedPortalContainer, and related types, with a minor changeset and integration tests for provider placement and override behavior.

Reviewed by Cursor Bugbot for commit 0902a00. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0902a00

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kunalpanchal kunalpanchal changed the title Add portal layer provider feat(portal-provider): Add portal layer provider Jun 17, 2026
@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-4c0pg5ax5-clickhouse.vercel.app

Built from commit: f25115d199ec496b546adcc8cb43d21d81524f7e

@kunalpanchal kunalpanchal marked this pull request as ready for review June 17, 2026 11:48
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