Skip to content

Commit c09f77c

Browse files
committed
fix lineage
1 parent a73a0e5 commit c09f77c

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

Diff for: js_modules/dagster-ui/packages/ui-core/src/assets/AssetCatalogAssetGraph.tsx

+19-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, {useCallback, useMemo} from 'react';
22
import {useHistory} from 'react-router';
33

44
import {assetDetailsPathForKey} from './assetDetailsPathForKey';
5+
import {useStateWithStorage} from '../../../../../../../internal/dagster-cloud/js_modules/app-cloud/dagster/js_modules/dagster-ui/packages/ui-core/src/hooks/useStateWithStorage';
56
import {AssetGraphExplorer} from '../asset-graph/AssetGraphExplorer';
67
import {AssetGraphViewType} from '../asset-graph/Utils';
78
import {AssetLocation} from '../asset-graph/useFindAssetLocation';
@@ -46,7 +47,23 @@ export const AssetCatalogAssetGraph = React.memo(
4647
[history, openInNewTab],
4748
);
4849

49-
const fetchOptions = React.useMemo(() => ({loading: false}), []);
50+
const [hideEdgesToNodesOutsideQuery, setHideEdgesToNodesOutsideQuery] = useStateWithStorage(
51+
'hideEdgesToNodesOutsideQuery',
52+
(json) => {
53+
if (json === 'false' || json === false) {
54+
return false;
55+
}
56+
return true;
57+
},
58+
);
59+
60+
const fetchOptions = React.useMemo(
61+
() => ({
62+
loading: false,
63+
hideEdgesToNodesOutsideQuery,
64+
}),
65+
[hideEdgesToNodesOutsideQuery],
66+
);
5067

5168
const lineageOptions = React.useMemo(
5269
() => ({preferAssetRendering: true, explodeComposites: true}),
@@ -73,6 +90,7 @@ export const AssetCatalogAssetGraph = React.memo(
7390
viewType={AssetGraphViewType.CATALOG}
7491
isFullScreen={isFullScreen}
7592
toggleFullScreen={toggleFullScreen}
93+
setHideEdgesToNodesOutsideQuery={setHideEdgesToNodesOutsideQuery}
7694
/>
7795
);
7896
},

Diff for: js_modules/dagster-ui/packages/ui-core/src/assets/AssetCatalogTableV2.tsx

+22-3
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,16 @@ export const AssetsCatalogTableV2Impl = React.memo(
144144
);
145145
}
146146

147+
const extraStyles =
148+
selectedTab === 'lineage'
149+
? {
150+
gridTemplateColumns: 'minmax(500px, 1fr)',
151+
display: 'grid',
152+
gridTemplateRows: 'repeat(2, auto) minmax(0, 1fr)',
153+
}
154+
: {};
147155
return (
148-
<Box flex={{direction: 'column'}} style={{height: '100%', minHeight: 600}}>
156+
<Box flex={{direction: 'column'}} style={{height: '100%', minHeight: 600, ...extraStyles}}>
149157
<Box
150158
flex={{direction: 'row', alignItems: 'center', gap: 8}}
151159
padding={{vertical: 12, horizontal: 24}}
@@ -196,7 +204,13 @@ const Table = React.memo(
196204
);
197205

198206
return (
199-
<div style={{display: 'grid', gridTemplateRows: 'minmax(0, 1fr)', height: '100%'}}>
207+
<div
208+
style={{
209+
display: 'grid',
210+
gridTemplateRows: 'minmax(0, 1fr)',
211+
height: '100%',
212+
}}
213+
>
200214
<div
201215
// style={{
202216
// display: 'grid',
@@ -205,7 +219,12 @@ const Table = React.memo(
205219
// }}
206220
>
207221
<div
208-
style={{display: 'grid', gridTemplateRows: 'auto minmax(500px, 1fr)', height: '100%'}}
222+
style={{
223+
display: 'grid',
224+
gridTemplateRows: 'auto minmax(500px, 1fr)',
225+
height: '100%',
226+
gridTemplateColumns: 'minmax(500px, 1fr)',
227+
}}
209228
>
210229
<Box
211230
flex={{direction: 'row', alignItems: 'center', justifyContent: 'space-between'}}

0 commit comments

Comments
 (0)