diff --git a/js_modules/dagster-ui/packages/ui-components/CHANGES.md b/js_modules/dagster-ui/packages/ui-components/CHANGES.md index 17f3c1cdafd7d..52e39450f4a98 100644 --- a/js_modules/dagster-ui/packages/ui-components/CHANGES.md +++ b/js_modules/dagster-ui/packages/ui-components/CHANGES.md @@ -1,3 +1,7 @@ +# 1.2.1 (December 5, 2024) + +- Split CodeMirror-based components out of main index export + # 1.2.0 (December 5, 2024) - Migrate styled-components to v6 diff --git a/js_modules/dagster-ui/packages/ui-components/package.json b/js_modules/dagster-ui/packages/ui-components/package.json index b178ac7801105..ca29def1f1bc4 100644 --- a/js_modules/dagster-ui/packages/ui-components/package.json +++ b/js_modules/dagster-ui/packages/ui-components/package.json @@ -1,6 +1,6 @@ { "name": "@dagster-io/ui-components", - "version": "1.2.0", + "version": "1.2.1", "description": "Dagster UI Component Library", "license": "Apache-2.0", "main": "lib/index.js", diff --git a/js_modules/dagster-ui/packages/ui-components/rollup.config.js b/js_modules/dagster-ui/packages/ui-components/rollup.config.js index 10d98f392aca3..3dfb1abc37900 100644 --- a/js_modules/dagster-ui/packages/ui-components/rollup.config.js +++ b/js_modules/dagster-ui/packages/ui-components/rollup.config.js @@ -14,6 +14,7 @@ const extensions = ['.js', '.jsx', '.ts', '.tsx', '.css', '.svg']; export default { input: { index: './src/index.ts', + editor: './src/editor.ts', // Our core fonts, usable as global style components, e.g. ``. 'fonts/GlobalGeistMono': './src/fonts/GlobalGeistMono.tsx', diff --git a/js_modules/dagster-ui/packages/ui-components/src/editor.ts b/js_modules/dagster-ui/packages/ui-components/src/editor.ts new file mode 100644 index 0000000000000..62a654c369f70 --- /dev/null +++ b/js_modules/dagster-ui/packages/ui-components/src/editor.ts @@ -0,0 +1,4 @@ +export * from './components/ConfigEditorDialog'; +export * from './components/ConfigEditorWithSchema'; +export * from './components/NewConfigEditor'; +export * from './components/StyledRawCodeMirror'; diff --git a/js_modules/dagster-ui/packages/ui-components/src/index.ts b/js_modules/dagster-ui/packages/ui-components/src/index.ts index 1224d069e9637..ba72a801271cf 100644 --- a/js_modules/dagster-ui/packages/ui-components/src/index.ts +++ b/js_modules/dagster-ui/packages/ui-components/src/index.ts @@ -7,8 +7,6 @@ export * from './components/ButtonGroup'; export * from './components/ButtonLink'; export * from './components/Checkbox'; export * from './components/CollapsibleSection'; -export * from './components/ConfigEditorDialog'; -export * from './components/ConfigEditorWithSchema'; export * from './components/ConfigTypeSchema'; export * from './components/Countdown'; export * from './components/CursorControls'; @@ -25,7 +23,6 @@ export * from './components/MainContent'; export * from './components/Menu'; export * from './components/MetadataTable'; export * from './components/MiddleTruncate'; -export * from './components/NewConfigEditor'; export * from './components/NonIdealState'; export * from './components/Page'; export * from './components/PageHeader'; @@ -41,7 +38,6 @@ export * from './components/Spinner'; export * from './components/SpinnerWithText'; export * from './components/SplitPanelContainer'; export * from './components/StyledButton'; -export * from './components/StyledRawCodeMirror'; export * from './components/SubwayDot'; export * from './components/Suggest'; export * from './components/Table'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOverviewRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOverviewRoot.tsx index 1f998022e2330..db33e55e6ea8e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOverviewRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/code-location/CodeLocationOverviewRoot.tsx @@ -5,9 +5,9 @@ import { MiddleTruncate, Mono, SpinnerWithText, - StyledRawCodeMirror, Table, } from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import {useContext, useMemo} from 'react'; import {CodeLocationPageHeader} from 'shared/code-location/CodeLocationPageHeader.oss'; import {CodeLocationServerSection} from 'shared/code-location/CodeLocationServerSection.oss'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx b/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx index 8e8e256b5013c..890ec7fbc5fd4 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/configeditor/ConfigEditorUtils.tsx @@ -1,4 +1,4 @@ -import {YamlModeValidationResult} from '@dagster-io/ui-components'; +import {YamlModeValidationResult} from '@dagster-io/ui-components/lib/editor'; import yaml from 'yaml'; import {gql} from '../apollo-client'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx index f38e3f27114b1..e732782bcf381 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx @@ -17,13 +17,13 @@ import { PageHeader, Popover, Spinner, - StyledRawCodeMirror, Subheading, Table, Tag, TextInput, Tooltip, } from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import * as React from 'react'; import {Link} from 'react-router-dom'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx index 237c3ab20ddf2..ed5eae88e3913 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConfig.tsx @@ -7,9 +7,9 @@ import { Heading, PageHeader, Spinner, - StyledRawCodeMirror, Subheading, } from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import CodeMirror from 'codemirror'; import {memo, useContext, useMemo} from 'react'; import {createGlobalStyle} from 'styled-components'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadRoot.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadRoot.tsx index c5aa0ccb46657..8d21748e6cdb8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadRoot.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadRoot.tsx @@ -1,4 +1,5 @@ -import {CodeMirrorInDialogStyle, Dialog, DialogHeader} from '@dagster-io/ui-components'; +import {Dialog, DialogHeader} from '@dagster-io/ui-components'; +import {CodeMirrorInDialogStyle} from '@dagster-io/ui-components/lib/editor'; import {Redirect, useParams} from 'react-router-dom'; import {LaunchpadAllowedRoot} from './LaunchpadAllowedRoot'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx index cbb164baf6422..6546b18224fde 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/LaunchpadSession.tsx @@ -5,19 +5,21 @@ import { ButtonLink, Checkbox, Colors, - ConfigEditorHandle, - ConfigEditorHelp, - ConfigEditorHelpContext, Dialog, DialogFooter, Group, Icon, - NewConfigEditor, SplitPanelContainer, SplitPanelContainerHandle, TextInput, - isHelpContextEqual, } from '@dagster-io/ui-components'; +import { + ConfigEditorHandle, + ConfigEditorHelp, + ConfigEditorHelpContext, + NewConfigEditor, + isHelpContextEqual, +} from '@dagster-io/ui-components/lib/editor'; import uniqBy from 'lodash/uniqBy'; import * as React from 'react'; import {LaunchRootExecutionButton} from 'shared/launchpad/LaunchRootExecutionButton.oss'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/plugins/sql.tsx b/js_modules/dagster-ui/packages/ui-core/src/plugins/sql.tsx index dca45836ffdd2..4f4147d6b07ce 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/plugins/sql.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/plugins/sql.tsx @@ -1,4 +1,5 @@ -import {Button, Dialog, DialogFooter, Icon, StyledRawCodeMirror} from '@dagster-io/ui-components'; +import {Button, Dialog, DialogFooter, Icon} from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import {useEffect, useState} from 'react'; import {IPluginSidebarProps} from '../plugins'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/RunConfigDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/RunConfigDialog.tsx index 3ad2312952379..d759a7e45300b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/RunConfigDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/RunConfigDialog.tsx @@ -1,11 +1,5 @@ -import { - Box, - Button, - Dialog, - DialogFooter, - StyledRawCodeMirror, - Subheading, -} from '@dagster-io/ui-components'; +import {Box, Button, Dialog, DialogFooter, Subheading} from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import styled from 'styled-components'; import {RunTags} from './RunTags'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx index 9f6c89ceb6abd..1a2c92732aa37 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/schedules/SchedulesNextTicks.tsx @@ -14,10 +14,10 @@ import { NonIdealState, Popover, Spinner, - StyledRawCodeMirror, Subheading, Table, } from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import qs from 'qs'; import {memo, useEffect, useState} from 'react'; import {Link} from 'react-router-dom'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationMenu.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationMenu.tsx index ac60eb02aa210..d05720f788844 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationMenu.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/CodeLocationMenu.tsx @@ -6,9 +6,9 @@ import { Menu, MenuItem, Popover, - StyledRawCodeMirror, Table, } from '@dagster-io/ui-components'; +import {StyledRawCodeMirror} from '@dagster-io/ui-components/lib/editor'; import {useMemo, useState} from 'react'; import * as yaml from 'yaml';