Skip to content

[dg] Render dg docs within the app #29233

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

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

hellendag
Copy link
Member

@hellendag hellendag commented Apr 11, 2025

Summary & Motivation

Behind a feature flag, render dg docs within the app, within code locations that have docs available.

This involved some changes to the existing dg-docs-site to reuse some pieces that are currently there but are reusable here.

Brief demo:

Screen.Recording.2025-04-11.at.15.14.08.mov

Ignore the default cursor on there -- the cursors are correct, this is just QuickTime Player acting up.

How I Tested These Changes

dg dev in dg-enabled project, then run JS dev for Dagster app.

  • Navigate to code location list. Verify that "Docs" is not present as a column. Click on a code location, verify that there is no "Docs" tab. (This is the default non-flagged state.)
  • Enable the feature flag via User Settings, navigate to code location list.
  • Verify that my project has a "View docs" button, and that I can click it to go to docs.
  • Verify correct rendering and behavior of in-app docs, including left nav collapse/show, item highlighting, component list views, and component pages.

Run dg docs serve, verify that this continues to build and render correctly.

Copy link
Member Author

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

Copy link

github-actions bot commented Apr 11, 2025

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-jugrhhsbz-elementl.vercel.app
https://dish-build-938-dg-in-app.core-storybook.dagster-docs.io

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

@hellendag hellendag marked this pull request as ready for review April 11, 2025 20:29
@hellendag hellendag force-pushed the dish/build-938-dg-in-app branch from dd4c9ed to 5851e7b Compare April 11, 2025 20:32
transpilePackages: [
'@dagster-io/ui-components',
'@dagster-io/ui-core',
'@dagster-io/dg-docs-components',
Copy link
Member Author

Choose a reason for hiding this comment

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

This package must be transpiled by app-oss Next.js config like the others, because it's a local workspace package.


if (!contents) {
return <div className={styles.emptyState}>No components found.</div>;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

We should iterate on the empty states. cc @katefarrar

background-color: var(--color-background-light-hover);
color: var(--color-text-default);
text-decoration: none;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

These are mostly copied over from existing CSS files in dg-docs-site, now moved to dg-docs-components so they can be used in the main app.

@hellendag hellendag force-pushed the dish/build-938-dg-in-app branch from 5851e7b to a355547 Compare April 11, 2025 21:09
Copy link
Member Author

hellendag commented Apr 11, 2025

Merge activity

  • Apr 11, 4:22 PM CDT: A user started a stack merge that includes this pull request via Graphite.
  • Apr 11, 4:22 PM CDT: A user merged this pull request with Graphite.

@hellendag hellendag merged commit 7d31939 into master Apr 11, 2025
6 of 7 checks passed
@hellendag hellendag deleted the dish/build-938-dg-in-app branch April 11, 2025 21:22
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.

2 participants