storybookjs/storybook

[Bug]: Single Story Hoisting with Angular .component prefixes doesn't work

Open

#27,443 opened on May 30, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (10,058 forks)batch import
angularbughelp wantedsev:S3

Repository metrics

Stars
 (89,909 stars)
PR merge metrics
 (Avg merge 7d 22h) (184 merged PRs in 30d)

Description

Describe the bug

Single Story Hoisting doesnt seem to work with angular components since they have a .component prefix? (Footer Example)

Expected Single Footer link on the sidebar without docs with docs Footer/Docs + Footer/Footer

Actual footer/footer.component/Footer

If i nave the folder and stories file with a Capitalized and without the prefix then works as expected (Nav Example)

Screenshot from 2024-05-30 15-39-53

Reproduction link

https://stackblitz.com/edit/github-tgd1zb?file=src%2Fapp%2FNav%2FNav.ts

Reproduction steps

None, all set up, just look at the rendered page

System

Storybook Environment Info:

  System:
    OS: Linux 5.15 Linux Mint 21.3 (Virginia)
    CPU: (16) x64 AMD Ryzen 7 3800X 8-Core Processor
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.0.6 - ~/.nvm/versions/node/v20.12.2/bin/pnpm <----- active
  Browsers:
    Chrome: 124.0.6367.78
  npmPackages:
    @storybook/addon-essentials: ^8.1.5 => 8.1.5 
    @storybook/angular: ^8.1.5 => 8.1.5 
    @storybook/core-common: ^8.1.5 => 8.1.5 
    @storybook/core-server: ^8.1.5 => 8.1.5 
    @storybook/manager-api: ^8.1.5 => 8.1.5 
    @storybook/theming: ^8.1.5 => 8.1.5 
    @storybook/types: ^8.1.5 => 8.1.5 
    eslint-plugin-storybook: ^0.8.0 => 0.8.0 
    storybook: ^8.1.5 => 8.1.5

Additional context

No response

Contributor guide