Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Move CodeMirror-based components out of main ui-components export #26304

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

hellendag
Copy link
Member

@hellendag hellendag commented Dec 5, 2024

Summary & Motivation

The CodeMirror-based components in ui-components are adding quite a bit of CSS bloat via automatic imports, and the implicit use of navigator breaks static rendering in Next.js apps.

Split them out into an editor export, which can be used via @dagster-io/ui-components/lib/editor.

It would probably be good to split the library up further, but this is at least a step in the right direction.

How I Tested These Changes

TS, lint, jest. yarn build for the component library, verify that it builds correctly and that CM-based components are split out of index.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@hellendag hellendag marked this pull request as ready for review December 5, 2024 23:07
Copy link

github-actions bot commented Dec 5, 2024

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-hu70pie60-elementl.vercel.app
https://dish-separate-codemirror-from-ui-components.components-storybook.dagster-docs.io

Built with commit 59d304b.
This pull request is being automatically deployed with vercel-action

@hellendag hellendag requested a review from dliu27 December 6, 2024 16:12
@hellendag
Copy link
Member Author

Going to push up an additional change to fix the build.

@hellendag hellendag force-pushed the dish/separate-codemirror-from-ui-components branch from a33571a to aab3109 Compare December 6, 2024 19:39
Copy link

github-actions bot commented Dec 6, 2024

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-nqr9x2vdm-elementl.vercel.app
https://dish-separate-codemirror-from-ui-components.core-storybook.dagster-docs.io

Built with commit 59d304b.
This pull request is being automatically deployed with vercel-action

@hellendag hellendag force-pushed the dish/separate-codemirror-from-ui-components branch 2 times, most recently from 2aee32e to 45160d8 Compare December 6, 2024 20:13
format: 'cjs',
sourcemap: true,
{
input: './src/editor.ts',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce!

[INTERNAL_BRANCH=dish/plus-components-editor]
@hellendag hellendag force-pushed the dish/separate-codemirror-from-ui-components branch from 45160d8 to 59d304b Compare December 9, 2024 22:10
Copy link
Member Author

hellendag commented Dec 9, 2024

Merge activity

  • Dec 9, 4:40 PM CST: A user started a stack merge that includes this pull request via Graphite.
  • Dec 9, 4:41 PM CST: A user merged this pull request with Graphite.

@hellendag hellendag merged commit d5c901b into master Dec 9, 2024
3 checks passed
@hellendag hellendag deleted the dish/separate-codemirror-from-ui-components branch December 9, 2024 22:41
pskinnerthyme pushed a commit to pskinnerthyme/dagster that referenced this pull request Dec 16, 2024
dagster-io#26304)

## Summary & Motivation

The CodeMirror-based components in `ui-components` are adding quite a bit of CSS bloat via automatic imports, and the implicit use of `navigator` breaks static rendering in Next.js apps.

Split them out into an `editor` export, which can be used via `@dagster-io/ui-components/lib/editor`.

It would probably be good to split the library up further, but this is at least a step in the right direction.

## How I Tested These Changes

TS, lint, jest. `yarn build` for the component library, verify that it builds correctly and that CM-based components are split out of `index`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants