Repository navigation
Conversation
Radix Popover content also carries role="dialog", so the plugin dialog selector matched open plugin popovers and hid the page, unlike host popovers. Exclude popper content (data-side) and include alert dialogs. Test with real plugin-scoped Dialog, AlertDialog, and Popover content. Co-Authored-By: Claude Opus 5.5 <[email protected]>
In compact viewports plugin popovers, menus, and dialogs all render as the same persistent drawer, so the plugin dialog selector hid browser views for any of them while host popover drawers leave the page alone. Only dialog drawers carry aria-describedby, so match those and keep other plugin drawers visible like their host counterparts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
This is an automated message. We have closed this pull request because it has been open for more than two weeks. |
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.
Human comments
What was wrong
A Browser tab's native view paints above all renderer DOM, so bb hides it while
useIsBrowserDimmingModalOpen()is true. Only host overlays raise that counter: the app build swaps in the realuseBrowserDimmingModal, but plugins vendor the registry's no-op flavor, so a pluginDialognever hides the view and sits under the page. Reported in #3812; this implements the host-side observer VKirill proposed there on 2026-09-23, scoped to dialogs.What changed
useIsBrowserDimmingModalOpeninapps/app/src/hooks/useBrowserDimmingModal.tsnow also reports true while an open plugin dialog portal is in the document: a plugin-rooted, portaledrole="dialog"withoutdata-side, a compact-viewport dialog drawer, orrole="alertdialog". One sharedMutationObserver, read throughuseSyncExternalStore, tracks those portals and notifies subscribers only for mutations that touch a plugin portal. The existing browser-view coordinator does the hiding and restoring. Already-shipped plugins benefit without a rebuild, and the host counter is unchanged. No wire, CLI, or SDK change.Deviations from the proposal in #3812:
role="dialog",menu, orlistbox, and adds nodata-bb-browser-dimmingmarker, so unrelated DOM can't toggle the view.role="dialog". It is excluded via Popper'sdata-side, so plugin popovers and menus behave like host ones: the shared dropdown, context menu, and popover don't hide the view (onlyPaneMaximizeButton's menu opts in). Covering menus everywhere is a separate change, as Hide the native browser view behind any overlay that covers it #3755 attempted.aria-describedby(in shared-ui and the vendored registry copy), so only it hides the view, matching host drawers.Because #3812's original repro is a plugin context menu built from plain DOM, this PR references the issue rather than closing it.
How you verified
apps/app/src/components/ui/dialog.browser-dimming.test.tsxrenders real plugin-scoped content (insidePluginContext):Dialoghides the view until it closes or unmounts. This failed on upstreammainand passes now.Popoverleaves the view visible.The AlertDialog, Popover, and compact Popover cases each failed before their fix and pass after it.
pnpm exec turbo run test --filter=@bb/appon that file plusPaneMaximizeButton,portal-scope,BrowserTabContent, andresponsive-overlaytests (66/66),pnpm exec turbo run typecheck --filter=@bb/app, andoxfmt --checkpass. Supersedes #4444, which the contributor gate closed. Motivating plugin: Ribbon's dialogs, e.g. the action editor in ariofrio/ribbon#121.Refs #3812
Written by Claude and Codex
🤖 Generated with Claude Code