Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: for the autodocs page parameters.docs.story.height doesn't work if inline is true and works if inline is false #21831

Closed
andreev-artem opened this issue Mar 30, 2023 · 4 comments · Fixed by #21870

Comments

@andreev-artem
Copy link

Describe the bug

Doesn't work:

const meta: Meta<typeof Loading> = {
    title: 'Loading',
    component: Loading,
    tags: ['autodocs'],
};

export default meta;

type Story = StoryObj<typeof Loading>;

export const Base: Story = {
    parameters: {
        docs: {
            story: {
                height: '400px',
            },
        },
    },
};

Works:

const meta: Meta<typeof Loading> = {
    title: 'Loading',
    component: Loading,
    tags: ['autodocs'],
};

export default meta;

type Story = StoryObj<typeof Loading>;

export const Base: Story = {
    parameters: {
        docs: {
            story: {
                inline: false,
                height: '400px',
            },
        },
    },
};

To Reproduce

No response

System

Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (4) x64 Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz
  Binaries:
    Node: 18.15.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 111.0.5563.112
    Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.54)

Additional context

sb@7.0.0-rc.10

@0916dhkim
Copy link
Contributor

Hi I opened a bugfix PR #21870

@shilman shilman moved this to In Progress in Core Team Projects Apr 24, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Core Team Projects Apr 25, 2023
@shilman
Copy link
Member

shilman commented Apr 27, 2023

Yippee!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.10 containing PR #21870 that references this issue. Upgrade today to the @future NPM tag to try it out!

npx sb@next upgrade --tag future

@shilman
Copy link
Member

shilman commented May 3, 2023

Olé!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.8 containing PR #21870 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb@latest upgrade

@levino
Copy link

levino commented Jul 18, 2024

I just encountered this bug too. With inline: true the story containing divs have min-height: 400px not height: 400px which in my case makes the inner div not expand to the height. Using inline: true fixes this, which I find weird.

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

Successfully merging a pull request may close this issue.

4 participants