diff --git a/js_modules/dagster-ui/packages/eslint-config/rules/missing-shared-import.js b/js_modules/dagster-ui/packages/eslint-config/rules/missing-shared-import.js index 1513911c2bbb1..ad678619f6761 100644 --- a/js_modules/dagster-ui/packages/eslint-config/rules/missing-shared-import.js +++ b/js_modules/dagster-ui/packages/eslint-config/rules/missing-shared-import.js @@ -69,6 +69,19 @@ module.exports = createRule({ }); } } + + if (importPath.startsWith('js_modules/dagster-ui/packages/ui-core/src')) { + context.report({ + node, + messageId: 'invalidSharedImport', + fix: (fixer) => { + return fixer.replaceText( + node.source, + `'${importPath.replace('js_modules/dagster-ui/packages/ui-core/src', 'shared')}'`, + ); + }, + }); + } } return { diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphAssetSelectionInput.oss.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphAssetSelectionInput.oss.tsx new file mode 100644 index 0000000000000..a5b480a3efe91 --- /dev/null +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphAssetSelectionInput.oss.tsx @@ -0,0 +1,9 @@ +import {ComponentProps} from 'react'; + +import {GraphQueryInput} from '../ui/GraphQueryInput'; + +export const AssetGraphAssetSelectionInput = ( + props: Omit, 'type'>, +) => { + return ; +}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx index b0069c6834c74..f8973d4240ed3 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphExplorer.tsx @@ -16,6 +16,7 @@ import uniq from 'lodash/uniq'; import without from 'lodash/without'; import * as React from 'react'; import {useLayoutEffect, useMemo, useState} from 'react'; +import {AssetGraphAssetSelectionInput} from 'shared/asset-graph/AssetGraphAssetSelectionInput.oss'; import {useAssetGraphExplorerFilters} from 'shared/asset-graph/useAssetGraphExplorerFilters.oss'; import styled from 'styled-components'; @@ -71,7 +72,6 @@ import { } from '../pipelines/GraphNotices'; import {ExplorerPath} from '../pipelines/PipelinePathUtils'; import {StaticSetFilter} from '../ui/BaseFilters/useStaticSetFilter'; -import {GraphQueryInput} from '../ui/GraphQueryInput'; import {Loading} from '../ui/Loading'; type AssetNode = AssetNodeForGraphQueryFragment; @@ -721,14 +721,13 @@ const AssetGraphExplorerWithData = ({ )}
{filterButton}
- - onChangeExplorerPath({...explorerPath, opsQuery}, 'replace') - } + onChange={(opsQuery: string) => { + onChangeExplorerPath({...explorerPath, opsQuery}, 'replace'); + }} popoverPosition="bottom-left" /> diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphFilterBar.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphFilterBar.oss.tsx similarity index 100% rename from js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphFilterBar.tsx rename to js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetGraphFilterBar.oss.tsx diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphExplorerFilters.oss.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphExplorerFilters.oss.tsx index a1749864a8e8b..0a83eacca9ab2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphExplorerFilters.oss.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/useAssetGraphExplorerFilters.oss.tsx @@ -1,6 +1,6 @@ +import {AssetGraphFilterBar} from 'shared/asset-graph/AssetGraphFilterBar.oss'; import {useAssetCatalogFiltering} from 'shared/assets/useAssetCatalogFiltering.oss'; -import {AssetGraphFilterBar} from './AssetGraphFilterBar'; import {AssetGraphViewType, GraphNode} from './Utils'; type Props = { diff --git a/js_modules/dagster-ui/packages/ui-core/src/hooks/useQueryPersistedState.tsx b/js_modules/dagster-ui/packages/ui-core/src/hooks/useQueryPersistedState.tsx index f48fd1cfac1dc..e540d3acd32c8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/hooks/useQueryPersistedState.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/hooks/useQueryPersistedState.tsx @@ -113,10 +113,12 @@ export function useQueryPersistedState( // the `replace` so that we surface any unwanted loops during development. if (process.env.NODE_ENV !== 'production' || !areQueriesEqual(currentQueryString, next)) { currentQueryString = next; - history.replace(`${location.pathname}?${qs.stringify(next, {arrayFormat: 'brackets'})}`); + history.replace( + `${history.location.pathname}?${qs.stringify(next, {arrayFormat: 'brackets'})}`, + ); } }, - [history, encode, location.pathname, options], + [history, encode, options], ); if (!isEqual(valueRef.current, qsDecoded)) { diff --git a/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx b/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx index 9c551db8c192a..76d7a43434dfe 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/ui/GraphQueryInput.tsx @@ -28,7 +28,7 @@ import {dynamicKeyWithoutIndex, isDynamicStep} from '../gantt/DynamicStepSupport import {GraphExplorerSolidFragment} from '../pipelines/types/GraphExplorer.types'; import {workspacePipelinePath} from '../workspace/workspacePath'; -interface GraphQueryInputProps { +export interface GraphQueryInputProps { intent?: Intent; items: GraphQueryItem[]; value: string;