Skip to content

Conversation

@RamdathDylan
Copy link

feature(explore): set browser tab title to chart name in explore view

SUMMARY

This pull request adds dynamic browser tab title management for charts in explore view and enhances the existing dashboard tab title behavior with blur/focus functionality.

  • Created a reusable useDocumentTitle hook that manages document titles with automatic blur/focus behavior
  • Updated ExploreViewContainer to set the browser tab title to the chart name when viewing charts
  • Refactored DashboardPage to use the new hook for consistency
  • Added comprehensive test coverage (10 tests)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Before 1 Before 2 After: After 1 After 2

TESTING INSTRUCTIONS

Run Tests:
cd superset-frontend
npm test -- useDocumentTitle.test.ts
Expected: All 10 tests pass

TypeScript test:
cd superset-frontend
npm run type

Video:
https://youtu.be/kqPNHrYvcjc

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Fixes: #20

michael-s-molina and others added 30 commits February 3, 2025 14:07
… the SQL query (apache#30903)

Co-authored-by: Kamil Gabryjelski <[email protected]>
(cherry picked from commit f3e7c64)
…ns (apache#32218)

Co-authored-by: Erkka Tahvanainen <[email protected]>
(cherry picked from commit 9da3095)
msyavuz and others added 30 commits May 23, 2025 09:42
Co-authored-by: Amaan Nawab <[email protected]>
Co-authored-by: Geido <[email protected]>
… in caret style (apache#30514) (apache#30577)

Co-authored-by: garriscp <[email protected]>
(cherry picked from commit b7d3ff1)
Co-authored-by: richardfn <[email protected]>
(cherry picked from commit 38868f9)
…#33285)

Co-authored-by: Michael S. Molina <[email protected]>
Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit 57183da)
This commit adds dynamic browser tab title management for charts in explore view
and enhances the existing dashboard tab title behavior.

Changes:
- Created useDocumentTitle hook to manage document titles with blur/focus behavior
- Updated ExploreViewContainer to set tab title to chart name when viewing charts
- Refactored DashboardPage to use the new hook for consistency
- Tab title resets to Superset when switching to another browser tab
- Tab title restores when returning to the Superset tab
- For unsaved charts, displays Superset as the default title
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.

Issue #7 - Browser tab title not updating to chart name when opening charts