Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,23 @@ module.exports = defineConfig({
|--------------|----------|-------------|-----------------------------------------|
| `backupsDir` | `string` | `'backups'` | Directory for backups from the MI server |

### `devPanel` β€” Dev panel appearance

| Field | Type | Default | Description |
|------------|-----------------------------------------------------------------|------------------|-----------------------------------------------------------------------------|
| `position` | `'top-left' \| 'top-right' \| 'bottom-left' \| 'bottom-right'` | `'bottom-right'` | Screen corner the dev panel is anchored to |
| `hidden` | `boolean` | `false` | Fully hide the panel. Restore in the browser with `?pp-dev-panel=show` |
| `autoHide` | `boolean` | `false` | Panel slides behind the screen edge leaving a thin strip; hover reveals it |

These values are **defaults**: the panel itself has a settings popover (gear icon) with a corner
picker, an auto-hide toggle and a hide button, and the panel can be dragged by its grip handle and
snapped to any corner. Runtime choices are persisted in the browser's `localStorage`
(`pp-dev-info-position`, `pp-dev-info-auto-hide`, `pp-dev-info-hidden`) and take precedence over
the config until "Reset to config defaults" is clicked in the popover. The URL params
`?pp-dev-panel=show` / `?pp-dev-panel=hide` set a persistent override too β€” handy for restoring a
hidden panel or taking clean screenshots. Note that `localStorage` is origin-scoped, so overrides
apply to every pp-dev app served on the same host and port.

### Validation

pp-dev validates your config at startup and reports problems clearly:
Expand All @@ -201,6 +218,7 @@ pp-dev validates your config at startup and reports problems clearly:
| `app.type === 'template'` without `app.id` | error |
| `app.type === 'page'` + `mi.mode === 'standalone'` without `app.id` | error |
| `app.name` missing and no `package.json#name` | error |
| `devPanel.position` not one of the four corners | error |

### Environment Variables

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@metricinsights/pp-dev",
"type": "module",
"version": "0.20.0-beta.5",
"version": "1.0.0-beta.1",
"description": "Portal Page dev build tool",
"bin": {
"pp-dev": "bin/pp-dev.js"
Expand Down
3 changes: 3 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,9 @@ cli
backendBaseURL,
templateLess,
appId,
devPanelPosition: _normalized.devPanelPosition,
devPanelHidden: _normalized.devPanelHidden,
devPanelAutoHide: _normalized.devPanelAutoHide,
});

return Buffer.from(urlReplacer(baseUrlHost, req.headers.host ?? '', withPanel));
Expand Down
Loading