-
Notifications
You must be signed in to change notification settings - Fork 436
feat(onboarding): add Storybook components #2564
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
Draft
elizabetdev
wants to merge
12
commits into
main
Choose a base branch
from
elizabet/onboarding-storybook-components
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f944060
feat(onboarding): add Storybook components
elizabetdev b3831d5
feat(onboarding): add integrations drawer with inline SDK guides
elizabetdev bfc3fc5
refactor(onboarding): make IntegrationsDrawer reusable and use it in β¦
elizabetdev 6717b01
refactor(onboarding): rename Integrations component folder
elizabetdev 56e5e8c
chore(onboarding): add integration-guides generator and docs proposal
elizabetdev d390000
feat(integrations): support brand SVG logos and add Vector logo
elizabetdev 044787b
feat(integrations): use brand SVG logos for all catalog items
elizabetdev b3e38ca
feat(integrations): show connection panel in drawer instead of plain β¦
elizabetdev ee9cd37
feat(integrations): signal chips in guides and external-link hint on β¦
elizabetdev f0ea690
fix(integrations): symmetric body padding in IntegrationsDrawer
elizabetdev 3b36d1f
fix(onboarding): restore dismiss link and symmetric drawer padding inβ¦
elizabetdev dd54110
feat(integrations): render setup docs from the ClickStack docs source
elizabetdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| # Proposal: a machine-readable "Quickstart" contract for ClickStack SDK docs | ||
|
|
||
| **Status:** Draft / internal β not yet shared with the docs team **Owner:** _add | ||
| your name_ **Audience:** ClickStack docs maintainers | ||
| (`ClickHouse/mintlify-docs-dev`), HyperDX app team, web/marketing **Related | ||
| code:** | ||
| [`packages/app/src/components/Integrations/useIntegrationDoc.ts`](../packages/app/src/components/Integrations/useIntegrationDoc.ts), | ||
| [`packages/app/src/components/Integrations/IntegrationDocMarkdown.tsx`](../packages/app/src/components/Integrations/IntegrationDocMarkdown.tsx), | ||
| [`packages/app/src/components/Integrations/integrationsCatalog.tsx`](../packages/app/src/components/Integrations/integrationsCatalog.tsx) | ||
|
|
||
| > This document lives in the HyperDX repo as a place to draft what we want to | ||
| > ask the docs team to adopt. **Nothing here has been contributed to | ||
| > `mintlify-docs-dev` yet** β it's the proposal to bring to that team. | ||
|
|
||
| --- | ||
|
|
||
| ## 0. Context: how the drawer reads docs today | ||
|
|
||
| The **"Send data to ClickStack"** integrations drawer renders each SDK's setup | ||
| guide **directly from the ClickStack docs source** at render time | ||
| (`useIntegrationDoc` fetches the markdown, `IntegrationDocMarkdown` renders it). | ||
| We deliberately do **not** pre-generate or restructure the content, and we no | ||
| longer substitute the team's endpoint / ingestion key into the snippets β the | ||
| drawer shows the docs verbatim and a note tells the user to replace the | ||
| placeholder values with the ones in the Connection panel. This follows the | ||
| direction in | ||
| [hyperdxio/hyperdx#2564](https://github.com/hyperdxio/hyperdx/pull/2564): | ||
| render the docs' own markdown in-product rather than scrape a structure out of | ||
| prose that has none. | ||
|
|
||
| Today we read the raw MDX from | ||
| `ClickHouse/mintlify-docs-dev/clickstack/ingesting-data/sdks/*.mdx` and strip | ||
| the MDX-isms (frontmatter, `import`/`export`, `<Tabs>`/`<Tab>` wrappers) client | ||
| side. That works, but it's why this proposal exists: a small amount of | ||
| structure at the source would make the in-product rendering cleaner and unlock | ||
| reuse. **None of it blocks the current drawer.** | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Why | ||
|
|
||
| The same doc content is (or will be) reused across several surfaces: | ||
|
|
||
| - **HyperDX onboarding** β the integrations drawer (current consumer). | ||
| - **A dedicated integrations page** β a fuller browse/setup surface planned to | ||
| render the same docs. | ||
| - **Marketing / product pages** β "Get started in 3 steps" blocks on | ||
| clickhouse.com landing pages, comparison pages, etc. | ||
| - **CLI / MCP** β a `hdx` quickstart command or an MCP "how do I instrument X" | ||
| answer could read the same source of truth. | ||
|
|
||
| One canonical, structured definition β many surfaces, always in sync with the | ||
| docs. | ||
|
|
||
| ## 2. The problem today | ||
|
|
||
| The MDX is written for human reading, not extraction/embedding, so a consumer | ||
| has to compensate: | ||
|
|
||
| - **No served-markdown endpoint (yet).** Appending `.md` to a docs URL serves | ||
| clean per-page markdown only behind the Mintlify preview flag; publicly it | ||
| still returns the SPA HTML, so we read the raw MDX from GitHub instead and | ||
| strip MDX components ourselves. A stable, public `.md` (or `.mdx`) endpoint | ||
| would let us drop the GitHub-raw dependency and the client-side cleanup. | ||
| - **MDX components don't render as plain markdown.** `<Tabs>`/`<Tab>`, | ||
| `<Steps>`, `<CodeGroup>`, etc. have to be flattened. Tabbed variants (npm | ||
| **and** yarn, CJS **and** ESM, Managed **vs** OSS) all collapse into the | ||
| inline view. | ||
| - **Placeholders are inconsistent**, which is why we no longer substitute them. | ||
| Real examples currently in the docs: | ||
|
|
||
| | Concept | Variants seen in the MDX today | | ||
| | ------------- | ---------------------------------------------------------------------------------------------------------- | | ||
| | Endpoint | `http://localhost:4318`, `http://your-otel-collector:4318`, `https://your-otel-collector:4318` | | ||
| | Ingestion key | `YOUR_INGESTION_API_KEY`, `<YOUR_INGESTION_API_KEY>`, `<YOUR_INGESTION_KEY>`, `**YOUR_INGESTION_API_KEY**` | | ||
| | Service name | `<NAME_OF_YOUR_APP_OR_SERVICE>`, `<MY_SERVICE_NAME>`, `<YOUR_APP_NAME>` | | ||
|
|
||
| (The `**β¦**` form is a markdown-bold artifact that leaks literal asterisks | ||
| into code β a good example of why consistent tokens beat prose.) | ||
|
|
||
| ## 3. Proposal | ||
|
|
||
| Two complementary asks for the docs team, in order of effort: | ||
|
|
||
| ### 3a. A stable per-page markdown endpoint | ||
|
|
||
| Serve clean markdown for each page at a predictable URL (e.g. `<page-url>.md`) | ||
| in production, not just under the preview flag. That lets in-product consumers | ||
| fetch and render the docs' own content without depending on GitHub raw or | ||
| re-implementing MDX flattening. | ||
|
|
||
| ### 3b. Standard placeholder tokens (low effort, high value) | ||
|
|
||
| Adopt a single set of tokens everywhere a snippet needs a value the user must | ||
| fill in. Suggested tokens: | ||
|
|
||
| | Token | Meaning | | ||
| | ----------------------- | ----------------------------- | | ||
| | `{{OTEL_ENDPOINT}}` | OTLP/HTTP endpoint | | ||
| | `{{INGESTION_API_KEY}}` | Ingestion / authorization key | | ||
| | `{{SERVICE_NAME}}` | User's service name | | ||
|
|
||
| Consistent tokens make the drawer's "replace these values" note unambiguous and | ||
| would let any consumer highlight or (optionally) substitute them deterministically. | ||
|
|
||
| ### 3c. Lightweight structured frontmatter (preferred end state) | ||
|
|
||
| Add a small structured block to each page's frontmatter so downstream surfaces | ||
| (the drawer, the future integrations page, marketing, CLI) can build catalogs | ||
| and filters without hard-coding them app-side: | ||
|
|
||
| ```yaml | ||
| --- | ||
| slug: /use-cases/observability/clickstack/sdks/python | ||
| title: 'Python' | ||
| sdk: | ||
| id: python | ||
| category: languages # languages | frameworks | infrastructure | cloud | collectors | ||
| signals: [logs, metrics, traces] | ||
| setup_minutes: 3 | ||
| --- | ||
| ``` | ||
|
|
||
| Today the app hard-codes `category` and `signals` in `integrationsCatalog.tsx`; | ||
| sourcing them from frontmatter keeps the catalog in sync with the docs and lets | ||
| new SDKs show up with fewer app changes. | ||
|
|
||
| ## 4. Suggested rollout | ||
|
|
||
| 1. Ship a public per-page `.md` endpoint (Β§3a); switch `docSourceUrl` in | ||
| [`integrationsCatalog.tsx`](../packages/app/src/components/Integrations/integrationsCatalog.tsx) | ||
| to it and drop the client-side MDX cleanup in | ||
| [`useIntegrationDoc.ts`](../packages/app/src/components/Integrations/useIntegrationDoc.ts). | ||
| 2. Agree on the token set (Β§3b) and search/replace existing SDK pages. | ||
| 3. Add the structured frontmatter (Β§3c) to high-traffic SDKs first | ||
| (`nodejs`, `python`, `golang`, `java`, `browser`, `nextjs`), then backfill. | ||
| 4. Have the app read `category`/`signals` from frontmatter instead of the | ||
| hard-coded maps in the catalog. | ||
|
|
||
| ## 5. Open questions / TODO | ||
|
|
||
| - [ ] Identify the docs-repo owner to pitch this to. | ||
| - [ ] Confirm a public `.md` endpoint is feasible (URL shape, caching, CORS). | ||
| - [ ] Confirm the canonical token names with docs + SDK teams. | ||
| - [ ] Confirm marketing's interest so the schema covers their needs too (e.g. | ||
| per-step descriptions, links). | ||
| - [ ] Align SDK ids/categories with the app catalog in | ||
| [`integrationsCatalog.tsx`](../packages/app/src/components/Integrations/integrationsCatalog.tsx). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.