Skip to content
Source
Sign inSign up
TanStack/devtools

fix(devtools): respect URL gating for the modal host #580

Openpcbeingused33(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/580/headopened View on GitHub

Showing 4 changed files with 20 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
5 additions and 0 deletions.changeset/quiet-dialog-flag.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+"@tanstack/devtools": patch
+---
+​
+Keep app dialogs interactive when the required URL flag hides the devtools panel in modal mode.
1 addition and 0 deletionse2e/apps/react-vite/src/main.tsxModified
View file
@@ -26,6 +26,7 @@
<TanStackDevtools
config={{
theme: 'dark',
+ defaultOpen: new URLSearchParams(location.search).has('default-open'),
requireUrlFlag: new URLSearchParams(location.search).has('gated'),
hideInAutomation: new URLSearchParams(location.search).has(
'automation-hidden',
14 additions and 0 deletionse2e/apps/react-vite/tests/open-as-modal.spec.tsModified
View file
@@ -29,6 +29,20 @@
​
test.describe('openAsModal', () => {
+ test('the app dialog stays interactive without the required URL flag', async ({
+ page,
+ }) => {
+ const dt = new DevtoolsPage(page)
+ await dt.goto('/?gated&open-as-modal&default-open')
+ await expect(page.getByTestId('tanstack_devtools')).toBeAttached()