Skip to content

[Bug]: docs tab not display in storybook ui #27023

Open
@jon9090

Description

Describe the bug

I utilize Storybook alongside Angular. I've included @storybook/addon-docs to showcase the code tab, but it's not rendering in the Storybook UI.

What might be causing this issue? Am I overlooking something, or could it be a bug?

package.json:

"@storybook/addon-docs": "^8.0.9",
"@nx/storybook": "18.3.4",
"@storybook/angular": "7.6.18",

main.ts:

import type { StorybookConfig } from '@storybook/angular';

const config: StorybookConfig = {
  stories: ['../../../**/*.stories.@(js|jsx|ts|tsx|mdx)'],
  addons: ['@storybook/addon-essentials', '@storybook/addon-interactions', 'storybook-addon-angular-router', "@storybook/addon-docs"],
  framework: {
    name: '@storybook/angular',
    options: { },
  },
};

export default config;

// To customize your webpack configuration you can use the webpackFinal field.
// Check https://storybook.js.org/docs/react/builders/webpack#extending-storybooks-webpack-config
// and https://nx.dev/recipes/storybook/custom-builder-configs
image

To Reproduce

const meta: Meta<FooComponent> = {
  component: FooComponent,
  title: 'FooComponent'
};

export default meta;
type Story = StoryObj<FooComponent>;

export const Primary: Story = {
  parameters: {
    docs: { source: { state: 'open' } },
  },
  args: {}
};

System

Storybook Environment Info:

  System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M2
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn <----- active
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.6.11 - /usr/local/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.119
    Edge: 124.0.2478.80
    Safari: 17.4.1
  npmPackages:
    @storybook/addon-docs: ^8.0.9 => 8.0.9
    @storybook/addon-essentials: 7.6.18 => 7.6.18
    @storybook/addon-interactions: ^7.5.3 => 7.6.18
    @storybook/addon-storysource: ^8.0.9 => 8.0.9
    @storybook/angular: 7.6.18 => 7.6.18
    @storybook/core-server: 7.6.18 => 7.6.18
    @storybook/html-vite: ^8.0.9 => 8.0.9
    @storybook/jest: ^0.2.3 => 0.2.3
    @storybook/test-runner: ^0.13.0 => 0.13.0
    @storybook/testing-library: ^0.2.2 => 0.2.2
    storybook-addon-angular-router: ^1.10.0 => 1.10.0


### Additional context

_No response_

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions