Skip to content

[core] Add Storybook stories for MulitstepDialog#8039

Open
cameronjoyner wants to merge 16 commits intodevelopfrom
stories/multistep-dialog
Open

[core] Add Storybook stories for MulitstepDialog#8039
cameronjoyner wants to merge 16 commits intodevelopfrom
stories/multistep-dialog

Conversation

@cameronjoyner
Copy link
Copy Markdown
Contributor

Summary

  • Extracted Storybook stories for MultistepDialog component
  • Stories provide visual regression testing coverage

Files

  • MultistepDialog.stories.tsx

Test plan

  • pnpm install && pnpm -w run storybook
  • Verify stories render correctly in Storybook
  • Check all story variants display properly in light and dark themes

🤖 Generated with Claude Code

@changelog-app
Copy link
Copy Markdown

changelog-app bot commented Apr 8, 2026

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

[core] Add Storybook stories for MulitstepDialog

Check the box to generate changelog(s)

  • Generate changelog entry

@blueprint-previews
Copy link
Copy Markdown

Revert "removed multistep dialog"

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

lint fix

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

set isOpen={true} && set title to title:Core/Overlays/MultistepDialog

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

Copy link
Copy Markdown
Contributor

@mm-wang mm-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion here for the ineraction, otherwise LGTM

export const OpenDialog: Story = {
render: renderMultistepDialog(),
play: async ({ canvas, userEvent, step }) => {
await step("Dialog is not visible initially", async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: This is no longer true if you are setting isOpen to true on open. You will want to set the arg for isOpen to false for this test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I ended up doing here is keeping this test, but ensuring a precursor step of exiting the default-open dialog. I did that because they all default to open.

export const OpenDialog: Story = {
    render: renderMultistepDialog(),
    play: async ({ canvas, userEvent, step }) => {
        // dialog is open on all example on render
        await step("Escape key closes dialog", async () => {
            await userEvent.keyboard("{Escape}");
            await waitFor(() => expect(screen.queryByText("This is the content for step 1.")).toBeNull());
        });

        await step("Click open button shows dialog at step 1", async () => {
            await userEvent.click(canvas.getByText("Open Multistep Dialog"));
            await waitFor(() => expect(screen.getByText("This is the content for step 1.")).toBeVisible());
            const selectStep = screen.getByText("Select items").closest(".bp6-dialog-step-container");
            await expect(selectStep).toHaveClass("bp6-active");
        });
    },
};

@blueprint-previews
Copy link
Copy Markdown

wrong syntax

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

adding not.toBeInTheDocument()

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

Merge branch 'develop' into stories/multistep-dialog

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@blueprint-previews
Copy link
Copy Markdown

Merge branch 'develop' into stories/multistep-dialog

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants