You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-1Lines changed: 43 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,8 @@ snapped to any corner. Runtime choices are persisted in the browser's `localStor
204
204
the config until "Reset to config defaults" is clicked in the popover. The URL params
205
205
`?pp-dev-panel=show` / `?pp-dev-panel=hide` set a persistent override too — handy for restoring a
206
206
hidden panel or taking clean screenshots. Note that `localStorage` is origin-scoped, so overrides
207
-
apply to every pp-dev app served on the same host and port.
207
+
apply to every pp-dev app served on the same host and port. See the [Dev Panel](#dev-panel)
208
+
section for the full feature description.
208
209
209
210
### Validation
210
211
@@ -406,6 +407,47 @@ module.exports = withPPDev({
406
407
407
408
For custom build configuration, create a `vite.config` file. See [Vite Configuration](https://vitejs.dev/config/) for details.
408
409
410
+
## Dev Panel
411
+
412
+
pp-dev injects a floating dev panel into every served page. It shows the package name and version, the backend URL, the template mode and the App ID, and hosts the template **Sync** button. Since 1.0 the panel is fully repositionable and can be hidden.
413
+
414
+
### Position
415
+
416
+
The panel can be anchored to any of the four screen corners (default: bottom-right). Three ways to move it:
417
+
418
+
-**Drag & snap** — grab the grip handle (six dots on the panel's left side) and drag; on release the panel snaps to the nearest corner. Dragging works across iframes and is cancelled with <kbd>Escape</kbd>.
419
+
-**Settings popover** — click the gear icon and pick a corner in the 2×2 grid.
420
+
-**Config default** — set `devPanel.position` in `pp-dev.config` (see below).
421
+
422
+
The minimize arrow, the panel's shadow, rounded corner and slide direction all mirror automatically for left/top placements. Sync notification popups stack from the screen edge opposite the panel so they never cover it.
423
+
424
+
### Auto-hide
425
+
426
+
Toggle **Auto-hide** in the settings popover (or set `devPanel.autoHide: true`). The panel slides behind the nearest screen edge leaving a 4px accent strip; hovering the strip for ~300 ms slides it out, and it hides again ~500 ms after the pointer leaves. Keyboard focus inside the panel keeps it revealed. While auto-hide is active the minimize arrow acts as a **pin** button that returns the panel to normal mode.
427
+
428
+
### Hiding and restoring
429
+
430
+
**Hide panel** in the settings popover (or `devPanel.hidden: true`) removes the panel from view entirely. To bring it back, open any page with `?pp-dev-panel=show` in the URL — the override persists across reloads. The symmetric `?pp-dev-panel=hide` hides it, which is handy for demos and clean screenshots.
431
+
432
+
### State persistence
433
+
434
+
Runtime choices are saved in the browser's `localStorage` (`pp-dev-info-position`, `pp-dev-info-auto-hide`, `pp-dev-info-hidden`) and take precedence over config values. **Reset to config defaults** in the settings popover clears all overrides. Storage is origin-scoped: overrides apply to every pp-dev app served on the same host and port, and a Metric Insights page that clears origin storage will reset them to config defaults.
hidden: false, // hide the panel entirely (restore with ?pp-dev-panel=show)
444
+
autoHide: false, // slide behind the screen edge, reveal on hover
445
+
},
446
+
});
447
+
```
448
+
449
+
See the [`devPanel` option reference](#devpanel--dev-panel-appearance) for details.
450
+
409
451
## Request Inspector
410
452
411
453
pp-dev includes a built-in request inspector that captures every proxied and locally-served HTTP request made during development. It is enabled by default.
0 commit comments