Skip to content

[BUG] Angular components class name conflict #1390

Closed

Description

@Eirmas
Overview of the issue

When two angular components (that have stories) share the same TS class name, each story will receive a union of the inputs from both components - even if the component selectors

Operating System, Node.js, npm, compodoc version(s)
Angular configuration, a package.json file in the root folder
    "storybook": {
      "executor": "@storybook/angular:start-storybook",
      "options": {
        "configDir": "apps/storybook/.storybook",
        "browserTarget": "app:build",
        "compodoc": true,
        "compodocArgs": [
          "--silent",
          "--disablePrivate",
          "--disableProtected",
          "--disableInternal",
          "--exportFormat",
          "json",
          "--output",
          "apps/storybook"
        ],
        "port": 6006,
      },
      "configurations": {
        "ci": {
          "quiet": false
        }
      }
    },
    "@compodoc/compodoc": "^1.1.21",
    "@nx/storybook": "^16.7.4",
    "@schematics/angular": "^16.2.5",
    "@storybook/addon-actions": "^7.4.0",
    "@storybook/addon-docs": "^7.4.0",
    "@storybook/addon-essentials": "^7.4.0",
    "@storybook/addon-interactions": "^7.4.0",
    "@storybook/angular": "^7.4.0",
    "@storybook/core-server": "^7.4.0",
    "@storybook/test-runner": "^0.13.0",
    "@storybook/jest": "~0.1.0",
    "@storybook/testing-library": "~0.2.0",
    "storybook": "^7.4.0",

Angular version: ^16.2.5

Compodoc installed globally or locally ?

Locally though npm "@compodoc/compodoc": "^1.1.21"

Motivation for or Use Case

We have a set of UI components that have been deprecated. We now want to create new components, and some of them may just share the same TS class name (e.g. ButtonComponent).

Reproduce the error
  1. Create two angular components with the same TS class name.
  2. Give each component an input that don't share the same name.
  3. Start storybook and observe that both stories have both the inputs
Suggest a Fix

Activity

  1. added a commit that references this issue on May 26, 2026
    3266772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions