Skip to content

Commit a067a9e

Browse files
hellendagDagster Devtools
authored andcommitted
[ui] Allow creating a saved selection from lineage view (#25415)
## Summary & Motivation When clicking "Save selection" from the Asset Graph Explorer, the catalog view dialog was not capturing the current graph's asset selection (the `opsQuery` from the explorer path). Instead, it relied solely on `currentAssetSelection` from the `CatalogViewContext`, which may not reflect what's displayed in the graph. This fix passes the `explorerPath.opsQuery` directly to `CreateCatalogViewButton` as an `assetSelection` prop. When provided, the button sets the internal asset selection before opening the create view dialog, ensuring the correct selection is pre-populated. The visibility logic also now uses this explicit selection when determining whether to render the button. Additionally, the default label casing was corrected from `'Save Selection'` to `'Save selection'`. ![Screenshot 2026-06-09 at 09.21.59.png](https://app.graphite.com/user-attachments/assets/272228ca-f0b0-44b5-b2aa-de1524994594.png) ## Test Plan - Open the Asset Graph Explorer with an asset selection query active - Verify the "Save selection" button appears and, when clicked, opens the create view dialog with the correct asset selection pre-filled - Verify the button still behaves correctly when no `assetSelection` prop is provided (falls back to `currentAssetSelection`) ## Changelog [ui] When filtering assets in the lineage view with the selection input, a "Save selection" button will allow creating a saved selection directly from the input value. Internal-RevId: 4bcd45a7c0406f60c64aedd443ed3d8e756e1c22
1 parent 82c0555 commit a067a9e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

js_modules/ui-core/src/asset-graph/AssetGraphExplorer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,11 @@ const AssetGraphExplorerWithData = ({
831831
}}
832832
/>
833833
</div>
834-
<CreateCatalogViewButton />
834+
<CreateCatalogViewButton
835+
assetSelection={
836+
viewType === AssetGraphViewType.GLOBAL ? explorerPath.opsQuery : undefined
837+
}
838+
/>
835839
<AssetLiveDataRefreshButton />
836840
</>
837841
)}

0 commit comments

Comments
 (0)