({
+ queryKey: 'selectedTab',
+ decode: (qs) =>
+ qs.selectedTab && typeof qs.selectedTab === 'string' ? qs.selectedTab : undefined,
+ encode: (b) => ({selectedTab: b || undefined}),
});
- return byStatus;
- }, [liveDataByNode]);
- const [selectedTab, setSelectedTab] = useState<'Catalog' | 'Lineage' | 'Insights'>('Catalog');
+ const setCurrentPage = useSetRecoilState(currentPageAtom);
+ const {path} = useRouteMatch();
+ useEffect(() => {
+ setCurrentPage(({specificPath}) => ({
+ specificPath,
+ path: `${path}?view=AssetCatalogTableV2&selected_tab=${selectedTab}`,
+ }));
+ }, [path, setCurrentPage, selectedTab]);
- const content = useMemo(() => {
- switch (selectedTab) {
- case 'Catalog':
- return ;
- case 'Lineage':
- return Lineage
;
- case 'Insights':
- return Insights
;
+ const content = useMemo(() => {
+ switch (selectedTab) {
+ case 'lineage':
+ return (
+
+ );
+ case 'insights':
+ return Insights
;
+ default:
+ return ;
+ }
+ }, [
+ selectedTab,
+ filtered,
+ groupedByStatus,
+ loading,
+ assetSelection,
+ setAssetSelection,
+ isFullScreen,
+ toggleFullScreen,
+ ]);
+
+ if (error) {
+ return ;
}
- }, [selectedTab, filtered, groupedByStatus, loading]);
- if (error) {
- return ;
- }
+ if (!assets?.length && !loading) {
+ return (
+
+
+
+ );
+ }
- if (!assets?.length && !loading) {
return (
-
-
-
- );
- }
-
- return (
-
-
- {filterInput}
-
-
-
-
-
+
-
-
-
-
+ {filterInput}
+
+
+ {selectedTab === 'catalog' ? (
+
+ ) : null}
+
+ {isFullScreen ? null : (
+
+
+
+
+
+ )}
+
+ {content}
- {content}
-
- );
-});
+ );
+ },
+);
const Table = React.memo(
({
@@ -163,12 +198,11 @@ const Table = React.memo(
return (
-
- test
-
+ {/*
+ Sidebar
+ */}
);
diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalog.tsx
index 97b630460a27a..9853fb893b881 100644
--- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalog.tsx
+++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetsCatalog.tsx
@@ -1,11 +1,11 @@
import {Box} from '@dagster-io/ui-components';
import React, {useEffect} from 'react';
import {useRouteMatch} from 'react-router-dom';
-import {useSetRecoilState} from 'recoil';
-import {AssetGlobalLineageLink} from 'shared/assets/AssetPageHeader.oss';
+import {useRecoilState, useSetRecoilState} from 'recoil';
import {ViewBreadcrumb} from 'shared/assets/ViewBreadcrumb.oss';
import {AssetsCatalogTableV2Impl} from './AssetCatalogTableV2';
+import {isFullScreenAtom} from '../app/AppTopNav/AppTopNavContext';
import {currentPageAtom} from '../app/analytics';
export const AssetsCatalog = React.memo(() => {
@@ -15,6 +15,8 @@ export const AssetsCatalog = React.memo(() => {
setCurrentPage(({specificPath}) => ({specificPath, path: `${path}?view=AssetCatalogTableV2`}));
}, [path, setCurrentPage]);
+ const [isFullScreen, setIsFullScreen] = useRecoilState(isFullScreenAtom);
+
return (
{
border="top"
>
-
-
+
setIsFullScreen(!isFullScreen)}
+ />
);
});