Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
32544d3
Initial plan
Copilot Dec 22, 2025
33f4ebd
feat(addon-docs): add MDX manifest generation
Copilot Dec 22, 2025
822d10f
style: apply prettier formatting to manifest.ts
Copilot Dec 22, 2025
865d7e1
fix: use Path type for consistency with DocsIndexEntry
Copilot Dec 22, 2025
b011a73
Merge branch 'next' into copilot/add-mdx-support-manifest
JReinhold Dec 22, 2025
493124d
basic docs manifest
JReinhold Dec 22, 2025
bf31e4b
add error handling to docs manifests
JReinhold Dec 22, 2025
8417c4e
unattached vs attached docs wip
JReinhold Dec 22, 2025
dda4c93
correctly handle attached vs unattached docs
JReinhold Dec 23, 2025
532ac71
add component manifest entries for attached mdx
JReinhold Dec 29, 2025
a7982fd
Move getStoryHref into addon-docs, simplify logic and deprecate origi…
ghengeveld Dec 23, 2025
2a864fd
Add getStoryHrefs API and use it for preview iframe URL
ghengeveld Dec 23, 2025
628f670
Add openInIsolation shortcut and update ShareMenu to utilize new API …
ghengeveld Dec 23, 2025
b9b78dd
Use getStoryHrefs for ref iframes as well, and fix types
ghengeveld Dec 23, 2025
2800dc6
Handle review comments
ghengeveld Dec 23, 2025
72174ff
nit: use same shortcut in story as elsewhere
Sidnioulz Dec 24, 2025
8ea95a9
rewrite getStoryHref docs util to use Web APIs
Sidnioulz Dec 24, 2025
7bf5c42
nit: clarify nesting options in getStoryHrefs
Sidnioulz Dec 24, 2025
e5d6628
support encoded parameters in getStoryHrefs
Sidnioulz Dec 24, 2025
d91d75c
Merge branch 'next' into copilot/add-mdx-support-manifest
JReinhold Dec 29, 2025
bdd8d96
docs: replace informal wording with standard terminology
Harshit-Mourya Jan 3, 2026
a0e3b12
docs: replace informal wording with standard terminology
Harshit-Mourya Jan 3, 2026
590848e
Docs: Fix UI library examples
jonniebigodes Jan 4, 2026
29895c2
Merge branch 'next' into docs_fix_ui_library_providers_example
jonniebigodes Jan 4, 2026
d474f5f
Consistently use 'disableSnapshot' rather than 'disable' for Chromati…
ghengeveld Dec 23, 2025
2f4abff
Added disable feature for intercations.
jeevikar14 Dec 15, 2025
73f0331
fix: resolve TypeScript errors in interactions disable feature
jeevikar14 Dec 15, 2025
200d137
refactor: extract disable logic for proper unit testing
jeevikar14 Dec 16, 2025
5d19b63
fix: prettier formatting
jeevikar14 Dec 17, 2025
c1e08b6
fix: import with js extension for ESM compat
yue4u Dec 22, 2025
f105b08
Update CHANGELOG.md for v10.1.11 [skip ci]
storybook-bot Dec 29, 2025
daa4d6a
Write changelog for 10.2.0-alpha.10 [skip ci]
storybook-bot Dec 29, 2025
9f8f895
Bump version from "10.2.0-alpha.9" to "10.2.0-alpha.10" [skip ci]
storybook-bot Dec 29, 2025
424e746
Docs: Mention Vite publicDir interference
Sidnioulz Dec 29, 2025
9a6b80a
Docs: Mention Vite publicDir interference
Sidnioulz Dec 30, 2025
1439a24
Core: Fix internal yarn build command
Sidnioulz Dec 30, 2025
fc1d08e
DX: Document yarn build options
Sidnioulz Dec 30, 2025
c9af058
Remove obsolete comments
Sidnioulz Dec 30, 2025
fd3bbc5
Use correct exit code for failed CLI run
Sidnioulz Dec 30, 2025
be9b72b
Core: Add try-catch for cross-origin access in Storybook hooks
ndelangen Dec 31, 2025
0a48d27
UI: Keep preview frame stable in overall layout
Sidnioulz Dec 30, 2025
bf55dfb
Disable open in isolation keyboard shortcut for docs pages
ghengeveld Jan 5, 2026
381ba17
Document api methods
yannbf Nov 18, 2025
2e9e276
Add missing openInEditor SubAPI typedefs
ghengeveld Jan 5, 2026
16761a3
Apply suggestions
ghengeveld Jan 5, 2026
1a9134a
Add missing guard
ghengeveld Jan 5, 2026
6f12897
Fix story parameters
ghengeveld Jan 5, 2026
d7dc2d5
Fix TS issue
ghengeveld Jan 5, 2026
e518754
Merge branch 'next' into isolation-mode-shortcut
ghengeveld Jan 5, 2026
426fa73
Merge pull request #33416 from storybookjs/isolation-mode-shortcut
ghengeveld Jan 5, 2026
896b775
Merge branch 'next' into docs_fix_ui_library_providers_example
jonniebigodes Jan 5, 2026
1d114bc
Merge pull request #33460 from storybookjs/docs_fix_ui_library_provid…
jonniebigodes Jan 5, 2026
fae5613
Merge branch 'next' into docs/improve-docs-wording
jonniebigodes Jan 5, 2026
190bbe4
Merge pull request #33459 from Harshit-Mourya/docs/improve-docs-wording
jonniebigodes Jan 5, 2026
02568bb
Merge branch 'next-release' into next
storybook-bot Jan 6, 2026
757d4b8
add early return to `storybookTest`, so when vite is running in non-v…
ndelangen Jan 6, 2026
c5dca50
The plugin should never be added if this condition is true, so it can…
ndelangen Jan 6, 2026
4021d8d
move preset evaluation of `env` down, and set `BUILD_MODE` env variab…
ndelangen Jan 6, 2026
0a404c6
replace hardcoded string literal tags with common Tag.X enum usage
JReinhold Jan 6, 2026
510bd7f
CI: Skip nx workflow on forks due to missing secrets
kasperpeulen Jan 6, 2026
75ea041
Update code/addons/vitest/src/vitest-plugin/index.ts
ndelangen Jan 6, 2026
2f7d638
fix lint
JReinhold Jan 6, 2026
e5d2edd
Merge pull request #33469 from storybookjs/norbert/improve-vitest-add…
ndelangen Jan 6, 2026
0406ca8
Merge pull request #33408 from storybookjs/copilot/add-mdx-support-ma…
JReinhold Jan 6, 2026
ae11f5d
Merge pull request #33471 from storybookjs/kasper/fix-nx-ci
kasperpeulen Jan 6, 2026
4a5d485
Write changelog for 10.2.0-alpha.12 [skip ci]
storybook-bot Jan 6, 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: 2 additions & 0 deletions .github/workflows/nx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- next
# TODO use pull_request_target in the future to also run on forks
pull_request:
types: [opened, synchronize, labeled, reopened]
schedule:
Expand All @@ -21,6 +22,7 @@ jobs:
nx:
if: >
(github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
(contains(github.event.pull_request.labels.*.name, 'ci:normal') ||
contains(github.event.pull_request.labels.*.name, 'ci:merged') ||
contains(github.event.pull_request.labels.*.name, 'ci:daily'))
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.prerelease.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 10.2.0-alpha.12

- Addon-docs: Add MDX manifest generation - [#33408](https://github.com/storybookjs/storybook/pull/33408), thanks @copilot-swe-agent!
- AddonVitest: Improve perf & fix loading incorrect `.env` file - [#33469](https://github.com/storybookjs/storybook/pull/33469), thanks @ndelangen!
- Core: Add `getStoryHrefs` manager API and add hotkey for "open in isolation" - [#33416](https://github.com/storybookjs/storybook/pull/33416), thanks @ghengeveld!

## 10.2.0-alpha.11

- Core: Add try-catch for cross-origin access in Storybook hooks - [#33448](https://github.com/storybookjs/storybook/pull/33448), thanks @ndelangen!
Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/docs/frameworks/COMMON.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {

## DocsPage

When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automatically for all your stories, available in the `Docs` tab of the Storybook UI.

## MDX

Expand Down
2 changes: 1 addition & 1 deletion code/addons/docs/docs/frameworks/REACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {

## DocsPage

When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automatically for all your stories, available in the `Docs` tab of the Storybook UI.

## Props tables

Expand Down
6 changes: 4 additions & 2 deletions code/addons/docs/src/blocks/blocks/Stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { FC, ReactElement } from 'react';
import React, { useContext } from 'react';

import { Tag } from 'storybook/internal/preview-api';

import { styled } from 'storybook/theming';

import { DocsContext } from './DocsContext';
Expand Down Expand Up @@ -43,11 +45,11 @@ export const Stories: FC<StoriesProps> = ({ title = 'Stories', includePrimary =
// The new behavior here is that if NONE of the stories in the autodocs page are tagged
// with 'autodocs', we show all stories. If ANY of the stories have autodocs then we use
// the new behavior.
const hasAutodocsTaggedStory = stories.some((story) => story.tags?.includes('autodocs'));
const hasAutodocsTaggedStory = stories.some((story) => story.tags?.includes(Tag.AUTODOCS));
if (hasAutodocsTaggedStory) {
// Don't show stories where mount is used in docs.
// As the play function is not running in docs, and when mount is used, the mounting is happening in play itself.
stories = stories.filter((story) => story.tags?.includes('autodocs') && !story.usesMount);
stories = stories.filter((story) => story.tags?.includes(Tag.AUTODOCS) && !story.usesMount);
}

if (!includePrimary) {
Expand Down
7 changes: 4 additions & 3 deletions code/addons/docs/src/blocks/blocks/usePrimaryStory.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ import { describe, expect, it, vi } from 'vitest';
import React from 'react';
import type { FC, PropsWithChildren } from 'react';

import { Tag } from 'storybook/internal/core-server';
import type { PreparedStory } from 'storybook/internal/types';

import type { DocsContextProps } from './DocsContext';
import { DocsContext } from './DocsContext';
import { usePrimaryStory } from './usePrimaryStory';

const stories: Record<string, Partial<PreparedStory>> = {
story1: { name: 'Story One', tags: ['!autodocs'] },
story2: { name: 'Story Two', tags: ['autodocs'] },
story3: { name: 'Story Three', tags: ['autodocs'] },
story1: { name: 'Story One', tags: [`!${Tag.AUTODOCS}`] },
story2: { name: 'Story Two', tags: [Tag.AUTODOCS] },
story3: { name: 'Story Three', tags: [Tag.AUTODOCS] },
story4: { name: 'Story Four', tags: [] },
};

Expand Down
3 changes: 2 additions & 1 deletion code/addons/docs/src/blocks/blocks/usePrimaryStory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useContext } from 'react';

import { Tag } from 'storybook/internal/preview-api';
import type { PreparedStory } from 'storybook/internal/types';

import { DocsContext } from './DocsContext';
Expand All @@ -11,5 +12,5 @@ import { DocsContext } from './DocsContext';
export const usePrimaryStory = (): PreparedStory | undefined => {
const context = useContext(DocsContext);
const stories = context.componentStories();
return stories.find((story) => story.tags.includes('autodocs'));
return stories.find((story) => story.tags.includes(Tag.AUTODOCS));
};
1 change: 0 additions & 1 deletion code/addons/docs/src/blocks/components/Preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ export const Preview: FC<PreviewProps> = ({
zoom={(z: number) => setScale(scale * z)}
resetZoom={() => setScale(1)}
storyId={!isLoading && childProps ? getStoryId(childProps, context) : undefined}
baseUrl="./iframe.html"
/>
)}
<ZoomContext.Provider value={{ scale }}>
Expand Down
8 changes: 3 additions & 5 deletions code/addons/docs/src/blocks/components/Story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
import type { FunctionComponent } from 'react';
import React, { useEffect, useRef, useState } from 'react';

import { ErrorFormatter, Loader, getStoryHref } from 'storybook/internal/components';
import { ErrorFormatter, Loader } from 'storybook/internal/components';
import type { DocsContextProps, PreparedStory } from 'storybook/internal/types';

import { styled } from 'storybook/theming';

import { getStoryHref } from '../getStoryHref';
import { IFrame } from './IFrame';
import { ZoomContext } from './ZoomContext';

const { PREVIEW_URL } = globalThis;
const BASE_URL = PREVIEW_URL || 'iframe.html';

interface CommonProps {
story: PreparedStory;
inline: boolean;
Expand Down Expand Up @@ -98,7 +96,7 @@ const IFrameStory: FunctionComponent<IFrameStoryProps> = ({ story, height = '500
key="iframe"
id={`iframe--${story.id}`}
title={story.name}
src={getStoryHref(BASE_URL, story.id, { viewMode: 'story' })}
src={getStoryHref(story.id, { viewMode: 'story' })}
allowFullScreen
scale={scale}
style={{
Expand Down
17 changes: 5 additions & 12 deletions code/addons/docs/src/blocks/components/Toolbar.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import type { FC, SyntheticEvent } from 'react';
import React from 'react';

import { Button, Toolbar as SharedToolbar, getStoryHref } from 'storybook/internal/components';
import { Button, Toolbar as SharedToolbar } from 'storybook/internal/components';

import { ShareAltIcon, ZoomIcon, ZoomOutIcon, ZoomResetIcon } from '@storybook/icons';

import { styled } from 'storybook/theming';

import { getStoryHref } from '../getStoryHref';

interface ZoomProps {
zoom: (val: number) => void;
resetZoom: () => void;
}

interface EjectProps {
storyId?: string;
baseUrl?: string;
}

interface BarProps {
Expand Down Expand Up @@ -52,14 +53,7 @@ const IconPlaceholder = styled.div(({ theme }) => ({
animation: `${theme.animation.glow} 1.5s ease-in-out infinite`,
}));

export const Toolbar: FC<ToolbarProps> = ({
isLoading,
storyId,
baseUrl,
zoom,
resetZoom,
...rest
}) => (
export const Toolbar: FC<ToolbarProps> = ({ isLoading, storyId, zoom, resetZoom, ...rest }) => (
<AbsoluteBar innerStyle={{ gap: 4, paddingInline: 7, justifyContent: 'space-between' }} {...rest}>
<Wrapper key="left">
{isLoading ? (
Expand Down Expand Up @@ -111,7 +105,6 @@ export const Toolbar: FC<ToolbarProps> = ({
<IconPlaceholder />
</Wrapper>
) : (
baseUrl &&
storyId && (
<Wrapper key="right">
<Button
Expand All @@ -121,7 +114,7 @@ export const Toolbar: FC<ToolbarProps> = ({
key="opener"
ariaLabel="Open canvas in new tab"
>
<a href={getStoryHref(baseUrl, storyId)} target="_blank" rel="noopener noreferrer">
<a href={getStoryHref(storyId)} target="_blank" rel="noopener noreferrer">
<ShareAltIcon />
</a>
</Button>
Expand Down
17 changes: 17 additions & 0 deletions code/addons/docs/src/blocks/getStoryHref.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Only for internal use in addon-docs code, because the parent util in `core` cannot be imported.
* Unlike the parent util, this one only returns the preview URL.
*/
export const getStoryHref = (storyId: string, additionalParams: Record<string, string> = {}) => {
const baseUrl = globalThis.PREVIEW_URL || 'iframe.html';
const [url, paramsStr] = baseUrl.split('?');
const params = new URLSearchParams(paramsStr || '');

Object.entries(additionalParams).forEach(([key, value]) => {
params.set(key, value);
});

params.set('id', storyId);

return `${url}?${params.toString()}`;
};
Loading