Skip to content

Conversation

@alok87
Copy link
Contributor

@alok87 alok87 commented Jan 9, 2026

🎯 Overview

Fixes #1573

This PR adds a fullscreen panel mode for dashboard charts, similar to Grafana's "View" mode but with a cleaner YouTube-style approach.

Screenshot 2026-01-09 at 6 25 44 PM
Screen.Recording.2026-01-09.at.6.23.50.PM.mov
Press f while hovering over a panel to toggle fullscreen
Press f or ESC while in fullscreen to exit

✨ Features Added

1. Fullscreen Panel View

  • Click the expand icon to view any dashboard chart in fullscreen
  • Clean, distraction-free view for analyzing detailed visualizations
  • Modal automatically adjusts to full viewport height

2. YouTube-Style Expand Button

  • Added IconArrowsMaximize button to chart hover toolbar
  • Positioned after the copy button for easy access
  • Tooltip shows "View Fullscreen (f)" hint

3. Keyboard Shortcuts

  • Press f while hovering over a panel to toggle fullscreen
  • Press f or ESC while in fullscreen to exit
  • Works exactly like YouTube's fullscreen feature
  • Uses Mantine's useHotkeys hook for consistency

4. Universal Chart Support

Works with all chart types:

  • ✅ Line charts
  • ✅ Stacked bar charts
  • ✅ Table views
  • ✅ Number displays
  • ✅ Markdown panels
  • ✅ Search results

🏗️ Technical Implementation

Files Changed

  1. packages/app/src/DBDashboardPage.tsx

    • Added fullscreen state management (isFullscreen, isFocused)
    • Implemented keyboard shortcut handler using useHotkeys
    • Created renderChartContent() helper to avoid code duplication
    • Added unique keys for tile vs fullscreen rendering to prevent React reconciliation issues
    • Integrated FullscreenPanelModal component
  2. packages/app/src/components/FullscreenPanelModal.tsx (NEW)

    • Fullscreen modal wrapper component
    • Uses Mantine Modal with fullScreen prop
    • Implements keyboard shortcuts (f and ESC)
    • Proper styling with overflow handling and scroll locking
    • withinPortal, trapFocus={false}, and lockScroll for better UX
  3. .changeset/dashboard-fullscreen-panel.md (NEW)

    • Changeset documenting the feature for release notes

Code Quality

  • ✅ Follows existing codebase patterns (Mantine components, useHotkeys)
  • ✅ No linter errors
  • ✅ Formatted with Prettier
  • ✅ Proper TypeScript types
  • ✅ Consistent button styling and positioning
  • ✅ Error boundaries for safe rendering

🎮 How to Use

Method 1: Click Button

  1. Hover over any dashboard panel
  2. Click the expand icon (📐) in the toolbar
  3. Panel opens in fullscreen
  4. Press ESC or click close (X) to exit

Method 2: Keyboard Shortcut

  1. Hover over any dashboard panel
  2. Press f key
  3. Panel toggles fullscreen
  4. Press f or ESC to exit

📸 Demo

The expand button appears in the hover toolbar between Copy and Edit buttons. When clicked or when f is pressed while hovering, the chart expands to fullscreen with the same interactivity and functionality as the tile view.

🧪 Testing

Tested with:

  • ✅ Line charts with multiple series
  • ✅ Stacked bar charts
  • ✅ Table views with sorting
  • ✅ Number displays
  • ✅ Keyboard shortcuts (f key)
  • ✅ ESC key to close
  • ✅ Modal close button
  • ✅ All chart types render correctly in fullscreen

📝 Notes

  • Button order: Alert → Copy → Expand → Edit → Delete
  • Keyboard shortcut only activates when hovering over panel (prevents conflicts)
  • Chart re-renders with unique key in fullscreen to prevent shaking/glitching
  • Follows YouTube's UX pattern for familiarity

🔗 Related

- Add YouTube-style fullscreen mode for dashboard charts
- Add expand button in toolbar (positioned after copy button)
- Implement 'f' keyboard shortcut to toggle fullscreen
- Support ESC key to exit fullscreen
- Works with all chart types (Line, Bar, Table, Number, Markdown, Search)
- Use Mantine useHotkeys pattern for keyboard shortcuts
- Improved modal rendering to prevent screen shake

Fixes hyperdxio#1573
@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: 4775f03

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor

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

@vercel
Copy link

vercel bot commented Jan 9, 2026

@alok87 is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
hyperdx-v2-oss-app Error Error Jan 9, 2026 7:50pm

@alok87
Copy link
Contributor Author

alok87 commented Jan 11, 2026

The conflict is due to the base branch being outdated. I'll update the branch to resolve conflicts with the latest main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Dashboards "Full-screen panel mode" or "View mode".

1 participant