Skip to content

Commit

Permalink
[ui] Move CodeMirror-based components out of main ui-components export
Browse files Browse the repository at this point in the history
  • Loading branch information
hellendag committed Dec 5, 2024
1 parent f6686c6 commit a33571a
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 26 deletions.
4 changes: 4 additions & 0 deletions js_modules/dagster-ui/packages/ui-components/CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion js_modules/dagster-ui/packages/ui-components/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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. `<GlobalGeist />`.
'fonts/GlobalGeistMono': './src/fonts/GlobalGeistMono.tsx',
Expand Down
4 changes: 4 additions & 0 deletions js_modules/dagster-ui/packages/ui-components/src/editor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './components/ConfigEditorDialog';
export * from './components/ConfigEditorWithSchema';
export * from './components/NewConfigEditor';
export * from './components/StyledRawCodeMirror';
4 changes: 0 additions & 4 deletions js_modules/dagster-ui/packages/ui-components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand All @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
3 changes: 2 additions & 1 deletion js_modules/dagster-ui/packages/ui-core/src/plugins/sql.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit a33571a

Please sign in to comment.