Commit a067a9e
[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'`.

## 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: 4bcd45a7c0406f60c64aedd443ed3d8e756e1c221 parent 82c0555 commit a067a9e
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
835 | 839 | | |
836 | 840 | | |
837 | 841 | | |
| |||
0 commit comments