Skip to content
Source
Sign inSign up
TanStack/devtools

feat(devtools): add openAsModal to use the panel over app modal dialogs #550

MergedAlemTuzlakmerged 2 commits intomain fromrefs/pull/550/headmerged by AlemTuzlak View on GitHub

Showing 7 changed files with 25 additions and 0 deletions (loading 4).

x
0 of 7 viewed, 7 left
5 additions and 0 deletions.changeset/open-as-modal.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/devtools': minor
+---
+​
+Add the `openAsModal` config option. A dialog opened with `dialog.showModal()` makes the devtools inert. With this option, the open panel moves on top of such a dialog and takes input, and the app dialog is inert until the panel closes. Open the panel with the open hotkey while the dialog is open.
6 additions and 0 deletionsdocs/configuration.mdModified
View file
@@ -71,6 +71,12 @@
{ requireUrlFlag: boolean }
```
​
+- `openAsModal` - Moves the open panel on top of a modal dialog of your app. A dialog that you open with `dialog.showModal()` makes the rest of the page inert, the devtools included. While the panel is on top, your dialog is inert. Close the panel to use your dialog again. The trigger is inert while your dialog is open, so open the panel with the open hotkey. The default is `false`.
+​
+```ts
+{ openAsModal: boolean }
+```
+​
- `triggerImage` - The image used for the dev tools trigger
​
```ts
14 additions and 0 deletionse2e/apps/react-vite/src/main.tsxModified
View file
@@ -12,10 +12,24 @@
<>
<h1>devtools e2e host</h1>
<input data-testid="text-input" placeholder="type here" />
+ <button