diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fdbefeb9821..3856fc8a65de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 8.1.2 + +- Angular: Fix filtering of workspace config styles - [#27108](https://github.com/storybookjs/storybook/pull/27108), thanks @valentinpalkovic! +- Next.js: Avoid interfering with the svgr loader - [#27198](https://github.com/storybookjs/storybook/pull/27198), thanks @seanparmelee! + ## 8.1.1 - Docgen: Only add react-docgen info when a component is defined in the file - [#26967](https://github.com/storybookjs/storybook/pull/26967), thanks @glenjamin! diff --git a/code/addons/a11y/src/a11yRunner.ts b/code/addons/a11y/src/a11yRunner.ts index ec33803558c3..82a851b89b05 100644 --- a/code/addons/a11y/src/a11yRunner.ts +++ b/code/addons/a11y/src/a11yRunner.ts @@ -17,9 +17,9 @@ const defaultParameters = { config: {}, options: {} }; * Handle A11yContext events. * Because the event are sent without manual check, we split calls */ -const handleRequest = async (storyId: string, input: A11yParameters = defaultParameters) => { +const handleRequest = async (storyId: string, input: A11yParameters | null) => { if (!input?.manual) { - await run(storyId, input); + await run(storyId, input ?? defaultParameters); } }; diff --git a/code/frameworks/nextjs/src/swc/loader.ts b/code/frameworks/nextjs/src/swc/loader.ts index c9ca896d533b..cf01a604da8d 100644 --- a/code/frameworks/nextjs/src/swc/loader.ts +++ b/code/frameworks/nextjs/src/swc/loader.ts @@ -24,7 +24,7 @@ export const configureSWCLoader = async ( ); if (rawRule && typeof rawRule === 'object') { - rawRule.test = /^(?!__barrel_optimize__)/; + rawRule.exclude = /^__barrel_optimize__/; } baseConfig.module?.rules?.push({ diff --git a/code/lib/types/src/modules/core-common.ts b/code/lib/types/src/modules/core-common.ts index f16ef638cbf4..7addf01fcb5e 100644 --- a/code/lib/types/src/modules/core-common.ts +++ b/code/lib/types/src/modules/core-common.ts @@ -582,4 +582,4 @@ export interface CoreCommon_StorybookInfo { * const framework: Framework = '@storybook/nextjs'; // valid and will be autocompleted * const framework: Framework = path.dirname(require.resolve(path.join("@storybook/nextjs", "package.json"))) // valid */ -export type CompatibleString = T | (string & Record); +export type CompatibleString = T | (string & {}); diff --git a/code/renderers/svelte/template/components/Pre.svelte b/code/renderers/svelte/template/components/Pre.svelte index dd7bc5718d05..856448c220f5 100644 --- a/code/renderers/svelte/template/components/Pre.svelte +++ b/code/renderers/svelte/template/components/Pre.svelte @@ -12,7 +12,7 @@ */ export let text = ''; - const finalText = object ? JSON.stringify(object, null, 2) : text; + $: finalText = object ? JSON.stringify(object, null, 2) : text;
{finalText}
diff --git a/code/ui/blocks/src/blocks/Story.stories.tsx b/code/ui/blocks/src/blocks/Story.stories.tsx index b3f8108feb23..6dcd2bfa9fb7 100644 --- a/code/ui/blocks/src/blocks/Story.stories.tsx +++ b/code/ui/blocks/src/blocks/Story.stories.tsx @@ -171,6 +171,9 @@ export const WithInteractionsAutoplayInParameters: Story = { export const ForceInitialArgs: Story = { ...StoryComponentStories.ForceInitialArgs, + parameters: { + chromatic: { disableSnapshot: true }, + }, args: { of: ButtonStories.Primary, storyExport: ButtonStories.Primary, diff --git a/code/ui/blocks/src/components/Story.stories.tsx b/code/ui/blocks/src/components/Story.stories.tsx index fa1767d747af..b393a7e4614d 100644 --- a/code/ui/blocks/src/components/Story.stories.tsx +++ b/code/ui/blocks/src/components/Story.stories.tsx @@ -82,6 +82,9 @@ export const ForceInitialArgs = { forceInitialArgs: true, renderStoryToElement, }, + parameters: { + chromatic: { disableSnapshot: true }, + }, // test that it ignores updated args by emitting an arg update and assert that it isn't reflected in the DOM play: async ({ args, canvasElement, loaded }: PlayFunctionContext) => { const docsContext = loaded.docsContext as DocsContextProps; diff --git a/code/ui/blocks/src/controls/Date.tsx b/code/ui/blocks/src/controls/Date.tsx index 53eedf56c50c..938fc8c8c33b 100644 --- a/code/ui/blocks/src/controls/Date.tsx +++ b/code/ui/blocks/src/controls/Date.tsx @@ -74,15 +74,16 @@ export const DateControl: FC = ({ name, value, onChange, onFocus, onB useEffect(() => { if (valid !== false) { if (dateRef && dateRef.current) { - dateRef.current.value = formatDate(value); + dateRef.current.value = value ? formatDate(value) : ''; } if (timeRef && timeRef.current) { - timeRef.current.value = formatTime(value); + timeRef.current.value = value ? formatTime(value) : ''; } } }, [value]); const onDateChange = (e: ChangeEvent) => { + if (!e.target.value) return onChange(); const parsed = parseDate(e.target.value); const result = new Date(value); result.setFullYear(parsed.getFullYear(), parsed.getMonth(), parsed.getDate()); @@ -92,6 +93,7 @@ export const DateControl: FC = ({ name, value, onChange, onFocus, onB }; const onTimeChange = (e: ChangeEvent) => { + if (!e.target.value) return onChange(); const parsed = parseTime(e.target.value); const result = new Date(value); result.setHours(parsed.getHours()); diff --git a/code/ui/blocks/src/controls/types.ts b/code/ui/blocks/src/controls/types.ts index 26460ff6184c..4da8dc198977 100644 --- a/code/ui/blocks/src/controls/types.ts +++ b/code/ui/blocks/src/controls/types.ts @@ -5,7 +5,7 @@ export interface ControlProps { value?: T; defaultValue?: T; argType?: ArgType; - onChange: (value: T) => T | void; + onChange: (value?: T) => T | void; onFocus?: (evt: any) => void; onBlur?: (evt: any) => void; } diff --git a/docs/contribute/RFC.md b/docs/contribute/RFC.md index 96b93158d07d..ecb3283b0946 100644 --- a/docs/contribute/RFC.md +++ b/docs/contribute/RFC.md @@ -32,7 +32,7 @@ _Details matter_: RFCs that do not present convincing motivation, demonstrate a RFCs tend to remain in this stage for a while, giving the community and core team members time to weigh in. During this period, the author of an RFC should be prepared to revise the proposal, integrate feedback, and build consensus. RFCs that have broad support are much more likely to make progress than those that don't receive any comments. -Every Monday at 11 a.m. (EST), the Storybook core team conducts a weekly triage meeting to review open RFCs as part of the meeting's agenda. The meeting is held in the [Storybook Discord's Watercooler channel](https://discord.com/channels/486522875931656193/486522876388704260). We invite the RFC author(s) and interested members of the community to participate and engage in a more detailed discussion of the RFC. If a core team member deems it necessary, they will be assigned as the "champion" of the RFC. The champion will collaborate with the RFC author and assist them throughout the RFC process. +Every week, the Storybook core team conducts a triage meeting to review open RFCs as part of the meeting's agenda. The event is publicly scheduled in the [Storybook Discord](https://discord.gg/storybook) and held in the [Storybook Discord's Watercooler channel](https://discord.com/channels/486522875931656193/486522876388704260). We invite the RFC author(s) and interested members of the community to participate and engage in a more detailed discussion of the RFC. If a core team member deems it necessary, they will be assigned as the "champion" of the RFC. The champion will collaborate with the RFC author and assist them throughout the RFC process. ### 3. `Status: accepted/rejected` diff --git a/docs/contribute/roadmap.md b/docs/contribute/roadmap.md new file mode 100644 index 000000000000..509f71b07164 --- /dev/null +++ b/docs/contribute/roadmap.md @@ -0,0 +1,43 @@ +--- +title: 'Roadmap' +hideRendererSelector: true +--- + +The Storybook team maintains a [public roadmap](https://github.com/orgs/storybookjs/projects/20/views/1) in the form of a GitHub project. This page explains what's in the roadmap, how to interpret it, and how to contribute to it. + +## What's in the roadmap? + +Each card represents a Storybook project. The columns represent how larger changes make their way from idea to shipped feature. Projects typically start as an [Request for Comment (RFC)](./RFC.md), then evolve into a [tracking issue](https://github.com/storybookjs/storybook/issues?q=is%3Aissue++sort%3Aupdated-desc+label%3ATracking+) once the team has fully scoped what it entails. We ship a Storybook [minor version](https://semver.org/) every eight weeks, and a major version once per year, typically in Feb/Mar. + +### Candidates + +These cards are ideas on our radar that we are considering for the current major release. For example, if `8.0` is the most recent major version, these would be ideas for `8.x` or `9.0`. The ideas in this column are the fuzziest and may come and go depending on our priorities. + +### Under consideration + +These are projects being discussed for the next dev cycle. For example, if the most recent minor version is `8.1`, and we are currently working on `8.2`, the projects in this column would be under consideration for `8.3`. Unlike the candidates column, which can contain any idea, the projects under consideration must be documented with an [RFC](./RFC.md). + +### In progress + +These are projects that we are currently working on. There are two kinds of projects in this column: + +1. **[Tracking issues](https://github.com/storybookjs/storybook/issues?q=is%3Aissue++sort%3Aupdated-desc+label%3ATracking+)**: Fully scoped projects expected to ship in the next minor release. For example, if the most recent minor is `8.1`, these should ship in `8.2`, eight weeks after `8.1`. +2. **Other projects**: Community projects facilitated by the core team and side projects. These don't have an ETA but we will push to have them ready as part of the current major. For example, if `8.0` is the most recent major version, these should ship in `8.x` or `9.0`. + +### Done + +These projects are completed, documented, and released. We follow a "fixed time, variable scope" policy for core projects, which means we scope a project into milestones to provide the most value to users as early as possible and cut scope if necessary to ship on time. If a feature has been scoped out of a project, we might try to fit it into a follow-up project, treat it as general maintenance work, or forget about it. Storybook is open source, so PR contributions are always welcome! + +## Frequently asked questions + +### When will project X be available? + +This roadmap is an estimation, not a commitment. In general, every tracking issue "in progress" should be available in the next two months. Everything else on the board has a decent chance of getting into the next major release. For example, if `8.0` is the most recent major release, we will try to ship everything on the board as part of `8.x` or `9.0`. If we don't think a project is likely for the next major, we will kick it off the board. + +### What about issue Y or discussion Z? + +The Storybook core team and our community members continuously contribute bug fix bugs and smaller product improvements. The projects here are larger chunks of work. In some cases they may close out certain issues, and when possible we will call those out in the RFC or project tracking issue. + +### How do I get something onto the board? + +If there's a significant product improvement that you want to see, and there is currently an issue or an [RFC](./RFC.md) for it, upvote that issue/discussion, and comment on it with more information about your need or use case if it's not currently captured. If you don't see anything that's quite right, please feel free to [submit an RFC](https://github.com/storybookjs/storybook/discussions/new?category=rfc). We prioritize based on a combination of user/contributor interest (upvotes, comments, [Discord](https://discord.gg/storybook) conversations, etc.) and our own strategic ambitions for the project. diff --git a/docs/toc.js b/docs/toc.js index 8915f1148f61..86e654d8f8f7 100644 --- a/docs/toc.js +++ b/docs/toc.js @@ -846,6 +846,11 @@ module.exports = { title: 'Reproduce', type: 'link', }, + { + pathSegment: 'roadmap', + title: 'Roadmap', + type: 'link', + }, ], }, {