Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {AssetGraphExplorer} from '../asset-graph/AssetGraphExplorer';
import {AssetGraphViewType} from '../asset-graph/Utils';
import {AssetLocation} from '../asset-graph/useFindAssetLocation';
import {useOpenInNewTab} from '../hooks/useOpenInNewTab';
import {useStateWithStorage} from '../hooks/useStateWithStorage';
import {ExplorerPath} from '../pipelines/PipelinePathUtils';
import {workspacePathFromAddress} from '../workspace/workspacePath';

Expand Down Expand Up @@ -46,7 +47,23 @@ export const AssetCatalogAssetGraph = React.memo(
[history, openInNewTab],
);

const fetchOptions = React.useMemo(() => ({loading: false}), []);
const [hideEdgesToNodesOutsideQuery, setHideEdgesToNodesOutsideQuery] = useStateWithStorage(
'hideEdgesToNodesOutsideQuery',
(json) => {
if (json === 'false' || json === false) {
return false;
}
return true;
},
);

const fetchOptions = React.useMemo(
() => ({
loading: false,
hideEdgesToNodesOutsideQuery,
}),
[hideEdgesToNodesOutsideQuery],
);

const lineageOptions = React.useMemo(
() => ({preferAssetRendering: true, explodeComposites: true}),
Expand All @@ -73,6 +90,7 @@ export const AssetCatalogAssetGraph = React.memo(
viewType={AssetGraphViewType.CATALOG}
isFullScreen={isFullScreen}
toggleFullScreen={toggleFullScreen}
setHideEdgesToNodesOutsideQuery={setHideEdgesToNodesOutsideQuery}
/>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,16 @@ export const AssetsCatalogTableV2Impl = React.memo(
groupedByStatus,
]);

const extraStyles =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these the css changes that fixed the zoom issue? Is AssetCatalogTableV2 used under the hood by the lineage graph then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this CSS fixes the zoom issue. The underlying component only knows about the current view because we pass a ViewType.CATALOG prop and its only used to avoid rendering a second selection syntax input

selectedTab === 'lineage'
? {
gridTemplateColumns: 'minmax(500px, 1fr)',
display: 'grid',
gridTemplateRows: 'repeat(2, auto) minmax(0, 1fr)',
}
: {};
return (
<Box flex={{direction: 'column'}} style={{height: '100%', minHeight: 600}}>
<Box flex={{direction: 'column'}} style={{height: '100%', minHeight: 600, ...extraStyles}}>
<Box
flex={{direction: 'row', alignItems: 'center', gap: 8}}
padding={{vertical: 12, horizontal: 24}}
Expand Down Expand Up @@ -200,7 +208,13 @@ const Table = React.memo(
);

return (
<div style={{display: 'grid', gridTemplateRows: 'minmax(0, 1fr)', height: '100%'}}>
<div
style={{
display: 'grid',
gridTemplateRows: 'minmax(0, 1fr)',
height: '100%',
}}
>
<div
// style={{
// display: 'grid',
Expand All @@ -209,7 +223,12 @@ const Table = React.memo(
// }}
>
<div
style={{display: 'grid', gridTemplateRows: 'auto minmax(500px, 1fr)', height: '100%'}}
style={{
display: 'grid',
gridTemplateRows: 'auto minmax(500px, 1fr)',
height: '100%',
gridTemplateColumns: 'minmax(500px, 1fr)',
}}
>
<Box
flex={{direction: 'row', alignItems: 'center', justifyContent: 'space-between'}}
Expand Down