Fix PortalRoot hiding the component's menus and tooltips

compound-web 10.4.0 treats a PortalRoot whose root is null as one whose root
is not available yet, so floating-ui never mounts the portal and every tooltip
label, and with it every icon button's accessible name, is missing. The
component defaulted portalRoot to null and wrapped the call unconditionally.

Wrap the call only when the host supplied a root, keeping null as the
not-yet-available case Compound defines, and say so on the prop. Cover it in
CallPortalRoot.test.tsx. Drop the git allowBuilds entry for compound-web now
that it is a release again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Timo K.
2026-10-12 12:43:29 +02:00
co-authored by Claude Fable 5.1
parent b72493f47f
commit 9d0a12c38a
5 changed files with 91 additions and 10 deletions
-3
View File
@@ -14,9 +14,6 @@ allowBuilds:
"core-js": true
"esbuild": true
"matrix-js-sdk@git+https://github.com/matrix-org/matrix-js-sdk.git": true
# Compound is a git dependency until PortalRoot (element-hq/compound-web#562) is released; its
# `prepare` script builds it on install. pnpm matches git-hosted packages by repository URL.
"@vector-im/compound-web@git+https://github.com/element-hq/compound-web.git": true
"protobufjs": true
overrides:
# We need compatible versions of RxJS in our dependencies and LiveKit's dependencies, but