This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new bb6bd85c1d fix(chart): set tab name as chart name (#33694)
bb6bd85c1d is described below
commit bb6bd85c1d66a3a4c2fb8827ad95477e7c5de9f5
Author: Phuc Hung Nguyen <[email protected]>
AuthorDate: Mon Jun 9 19:07:44 2025 -0400
fix(chart): set tab name as chart name (#33694)
Co-authored-by: Phuc Hung Nguyen <[email protected]>
---
superset-frontend/src/dashboard/containers/DashboardPage.tsx | 4 +---
.../src/explore/components/ExploreViewContainer/index.jsx | 9 +++++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
index fb8bb6c05d..e56c400c32 100644
--- a/superset-frontend/src/dashboard/containers/DashboardPage.tsx
+++ b/superset-frontend/src/dashboard/containers/DashboardPage.tsx
@@ -71,8 +71,6 @@ const DashboardBuilder = lazy(
),
);
-const originalDocumentTitle = document.title;
-
type PageProps = {
idOrSlug: string;
};
@@ -204,7 +202,7 @@ export const DashboardPage: FC<PageProps> = ({ idOrSlug }:
PageProps) => {
document.title = dashboard_title;
}
return () => {
- document.title = originalDocumentTitle;
+ document.title = 'Superset';
};
}, [dashboard_title]);
diff --git
a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
index 822a54ecaf..af71b790ec 100644
--- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
@@ -269,6 +269,15 @@ function ExploreViewContainer(props) {
const theme = useTheme();
+ useEffect(() => {
+ if (props.sliceName) {
+ document.title = props.sliceName;
+ }
+ return () => {
+ document.title = 'Superset';
+ };
+ }, [props.sliceName]);
+
const addHistory = useCallback(
async ({ isReplace = false, title } = {}) => {
const formData = props.dashboardId