Skip to content

Commit

Permalink
Merge branch 'next' into undefined-support-for-argtype
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 22, 2024
2 parents 9b58ef1 + fb8b18f commit b3cb3f7
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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!
Expand Down
4 changes: 2 additions & 2 deletions code/addons/a11y/src/a11yRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down
2 changes: 1 addition & 1 deletion code/frameworks/nextjs/src/swc/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion code/lib/types/src/modules/core-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 extends string> = T | (string & Record<string, never>);
export type CompatibleString<T extends string> = T | (string & {});
2 changes: 1 addition & 1 deletion code/renderers/svelte/template/components/Pre.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
export let text = '';
const finalText = object ? JSON.stringify(object, null, 2) : text;
$: finalText = object ? JSON.stringify(object, null, 2) : text;
</script>

<pre data-testid="pre" {style}>{finalText}</pre>
3 changes: 3 additions & 0 deletions code/ui/blocks/src/blocks/Story.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions code/ui/blocks/src/components/Story.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<WebRenderer>) => {
const docsContext = loaded.docsContext as DocsContextProps;
Expand Down
6 changes: 4 additions & 2 deletions code/ui/blocks/src/controls/Date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ export const DateControl: FC<DateProps> = ({ 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<HTMLInputElement>) => {
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());
Expand All @@ -92,6 +93,7 @@ export const DateControl: FC<DateProps> = ({ name, value, onChange, onFocus, onB
};

const onTimeChange = (e: ChangeEvent<HTMLInputElement>) => {
if (!e.target.value) return onChange();
const parsed = parseTime(e.target.value);
const result = new Date(value);
result.setHours(parsed.getHours());
Expand Down
2 changes: 1 addition & 1 deletion code/ui/blocks/src/controls/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface ControlProps<T> {
value?: T;
defaultValue?: T;
argType?: ArgType;
onChange: (value: T) => T | void;
onChange: (value?: T) => T | void;
onFocus?: (evt: any) => void;
onBlur?: (evt: any) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/RFC.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
43 changes: 43 additions & 0 deletions docs/contribute/roadmap.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions docs/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,11 @@ module.exports = {
title: 'Reproduce',
type: 'link',
},
{
pathSegment: 'roadmap',
title: 'Roadmap',
type: 'link',
},
],
},
{
Expand Down

0 comments on commit b3cb3f7

Please sign in to comment.