Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
64d84eb
Docs: route ArgTypes and Controls through docgen service when flag en…
JReinhold Jun 9, 2026
16ef4a8
Merge branch 'next' into split/docgen-ui-consumption
JReinhold Jun 9, 2026
3db3de0
Docs: back useServiceDocgen with useSyncExternalStore
JReinhold Jun 9, 2026
bdfa809
Merge branch 'next' into split/docgen-ui-consumption
JReinhold Jun 10, 2026
6e4e579
feat(docgen): disable build-time docgen injection when service is ena…
JReinhold Jun 11, 2026
93b8b74
Merge remote-tracking branch 'origin/next' into split/docgen-ui-consu…
JReinhold Jun 12, 2026
20c456f
chore: disable experimentalDocgenServer in internal Storybook
JReinhold Jun 12, 2026
b8fc9ef
fix(docgen-ui): resolve CI lint, snapshot, and story test failures
JReinhold Jun 12, 2026
208891a
fix(docgen-ui): address service controls review feedback
JReinhold Jun 12, 2026
ef57591
fix(controls): keep delayed object controls in rich mode
JReinhold Jun 12, 2026
5a9480c
fix(controls): preserve rich object mode after delayed data
JReinhold Jun 12, 2026
19a3dfd
fix(controls): wait for prepared story and docgen before service table
JReinhold Jun 12, 2026
65d5017
Merge branch 'next' into split/docgen-ui-consumption
JReinhold Jun 12, 2026
356d6d3
docs(agents): require running fmt:write after edits
JReinhold Jun 12, 2026
616e24f
fix(docgen-ui): preserve newlines in service-derived descriptions
JReinhold Jun 12, 2026
176296f
Merge branch 'next' into split/docgen-ui-consumption
JReinhold Jun 12, 2026
3e9e4d6
refactor(docs): extract ControlsTables component from render helper
JReinhold Jun 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Do **not** use `/tmp` paths or replace `node:fs/promises` with a full async fact

After changing files:

1. Format with `yarn fmt:write` (run from the repo root)
1. **Always** format with `yarn fmt:write`, run from the `code/` directory (`cd code && yarn fmt:write`), once you are done editing. The repo uses `oxfmt`, so hand-written formatting will frequently be wrong — do not skip this step.
2. Lint with `yarn --cwd code lint:js:cmd <file-relative-to-code-folder> --fix` or `cd code && yarn lint:js:cmd <file-relative-to-code-folder>`
3. Run relevant tests before submitting a PR

Expand Down
4 changes: 3 additions & 1 deletion code/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ const config = defineMain({
features: {
developmentModeForBuild: true,
experimentalTestSyntax: true,
experimentalDocgenServer: true,
// Disabled for now: the docgen service does not yet work in production builds. Keeping it off
// ensures this branch exercises the normal (non-experimental) docgen path without regressions.
experimentalDocgenServer: false,
experimentalReactComponentMeta: true,
changeDetection: true,
},
Expand Down
73 changes: 73 additions & 0 deletions code/addons/docs/src/blocks/blocks/ArgTypes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { Meta } from '@storybook/addon-docs/blocks';

import * as ArgTypesStories from './ArgTypes.stories.tsx';
import * as ExampleStories from '../examples/ArgTypesParameters.stories';
import * as SubcomponentsExampleStories from '../examples/ArgTypesWithSubcomponentsParameters.stories';

import { ArgTypes } from './ArgTypes';

<Meta of={ArgTypesStories} />

# ArgTypes block (MDX)

Each section below uses the `ArgTypes` block the same way as the matching story in `ArgTypes.stories.tsx`.

## OfComponent

<ArgTypes of={ExampleStories.default.component} />

## OfMeta

<ArgTypes of={ExampleStories.default} />

## OfStory

<ArgTypes of={ExampleStories.NoParameters} />

## IncludeProp

<ArgTypes of={ExampleStories.NoParameters} include={['a']} />

## IncludeParameter

<ArgTypes of={ExampleStories.Include} />

## ExcludeProp

<ArgTypes of={ExampleStories.NoParameters} exclude={['a']} />

## ExcludeParameter

<ArgTypes of={ExampleStories.Exclude} />

## SortProp

<ArgTypes of={ExampleStories.NoParameters} sort="alpha" />

## SortParameter

<ArgTypes of={ExampleStories.Sort} />

## Categories

<ArgTypes of={ExampleStories.Categories} />

## SubcomponentsOfMeta

<ArgTypes of={SubcomponentsExampleStories.default} />

## SubcomponentsOfStory

<ArgTypes of={SubcomponentsExampleStories.NoParameters} />

## SubcomponentsIncludeProp

<ArgTypes of={SubcomponentsExampleStories.NoParameters} include={['a', 'f']} />

## SubcomponentsExcludeProp

<ArgTypes of={SubcomponentsExampleStories.NoParameters} exclude={['a', 'c', 'f', 'g']} />

## SubcomponentsSortProp

<ArgTypes of={SubcomponentsExampleStories.NoParameters} sort="alpha" />
22 changes: 10 additions & 12 deletions code/addons/docs/src/blocks/blocks/ArgTypes.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import React from 'react';

/** Custom docs page: {@link ./ArgTypes.mdx} (attached via `<Meta of={...} />`). */
import type { PlayFunctionContext } from 'storybook/internal/csf';

import type { Meta, StoryObj } from '@storybook/react-vite';

import { within } from 'storybook/test';

import * as ExampleStories from '../examples/ArgTypesParameters.stories';
import * as SubcomponentsExampleStories from '../examples/ArgTypesWithSubcomponentsParameters.stories';
import { ArgTypes } from './ArgTypes';

const meta: Meta<typeof ArgTypes> = {
const meta = {
title: 'Blocks/ArgTypes',
component: ArgTypes,
parameters: {
Expand All @@ -21,7 +18,8 @@ const meta: Meta<typeof ArgTypes> = {
],
docsStyles: true,
},
};
} satisfies Meta<typeof ArgTypes>;

export default meta;

type Story = StoryObj<typeof meta>;
Expand Down Expand Up @@ -108,7 +106,7 @@ export const Categories: Story = {
};

const findSubcomponentTabs = async (
canvas: ReturnType<typeof within>,
canvas: Parameters<NonNullable<Story['play']>>[0]['canvas'],
step: PlayFunctionContext['step']
) => {
let subcomponentATab: HTMLElement | null = null;
Expand All @@ -124,26 +122,26 @@ export const SubcomponentsOfMeta: Story = {
args: {
of: SubcomponentsExampleStories.default,
},
play: async ({ canvasElement, step }) => {
const canvas = within(canvasElement);
play: async ({ canvas, step }) => {
await findSubcomponentTabs(canvas, step);
},
};

export const SubcomponentsOfStory: Story = {
...SubcomponentsOfMeta,
args: {
of: SubcomponentsExampleStories.NoParameters,
},
play: async ({ canvas, step }) => {
await findSubcomponentTabs(canvas, step);
},
};

export const SubcomponentsIncludeProp: Story = {
args: {
of: SubcomponentsExampleStories.NoParameters,
include: ['a', 'f'],
},
play: async ({ canvasElement, step }) => {
const canvas = within(canvasElement);
play: async ({ canvas, step }) => {
const { subcomponentBTab } = await findSubcomponentTabs(canvas, step);
if (subcomponentBTab) {
await (subcomponentBTab as HTMLElement & { click: () => Promise<void> }).click();
Expand Down
Loading