feat(dashboards): add full-screen kiosk mode#2703
Conversation
Co-authored-by: Mike Shi <mike@hyperdx.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 858ab2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryThis PR adds a fullscreen kiosk mode for dashboards. The main changes are:
Confidence Score: 4/5This is close, but the fullscreen exit state should be fixed before merging.
packages/app/src/hooks/useDashboardKioskMode.ts Important Files Changed
Reviews (2): Last reviewed commit: "chore(dashboards): format kiosk test" | Re-trigger Greptile |
| if (document.fullscreenElement == null) { | ||
| void document.documentElement.requestFullscreen?.().catch(() => { | ||
| // Fullscreen requires browser support and a user gesture. The | ||
| // URL-backed kiosk layout remains active when it is unavailable. | ||
| }); |
There was a problem hiding this comment.
When browser fullscreen is exited outside the React exit button, such as with browser UI or F11, this hook does not observe the fullscreenchange event. The URL can remain at kiosk=true, so the dashboard stays in the read-only kiosk layout with nav/query controls hidden and live refresh forced even though native fullscreen has ended.
E2E Test Results❌ 1 test failed • 243 passed • 1 skipped • 799s
Tests ran across 4 shards in parallel. |
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
| } | ||
| }, [setIsKioskMode]); | ||
|
|
||
| useHotkeys([['Escape', exitKioskMode]]); |
There was a problem hiding this comment.
The Escape hotkey only clears kiosk mode for the keyboard path. If the user exits browser fullscreen through browser UI or F11, document.fullscreenElement changes but this hook never observes fullscreenchange, so ?kiosk=true stays in the URL. The dashboard remains in the kiosk layout with navigation, query controls, and editing controls hidden even though native fullscreen has ended.
Summary
Add a shareable, URL-backed kiosk mode for dashboards intended for static displays. Kiosk mode requests browser fullscreen, reduces the page to the dashboard name and live/read-only status, locks all dashboard authoring controls, and forces automatic refresh including live behavior for trace/search tiles.
The saved dashboard is never changed by kiosk mode; tab and group expansion remain viewer-only URL state.
Screenshots or video
dashboard_kiosk_mode_clean_demo.mp4
How to test on Vercel preview
Preview routes: /dashboards
Steps:
/dashboards, select Create New Saved Dashboard, and add a chart tile.kiosk=true, browser fullscreen is requested, and only the dashboard name, Live · Read-only status, exit control, and dashboard tiles remain visible.Validation
References
To show artifacts inline, enable in settings.