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

Story titles no longer converted from camelCase to Capital Case with storyStoreV7 enabled #16877

Closed
JoshTumath opened this issue Dec 2, 2021 · 18 comments

Comments

@JoshTumath
Copy link

Describe the bug
After enabling the storyStoreV7 feature flag, story titles are no longer converted from camelCase to Capital Case.

Story_titles

To Reproduce
I have not been able to reproduce in a test case. Any advice on what I could try would be appreciated.

It happened since upgrading to 6.4.4 and enabling the following feature flags:

  framework: '@storybook/react',
  features: {
    postcss: false,
    babelModeV7: true,
    storyStoreV7: true
  }

System

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected!
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/tumatj01/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Darwin 20.6.0
gyp ERR! command "/Users/tumatj01/.nvm/versions/node/v14.18.1/bin/node" "/Users/tumatj01/.nvm/versions/node/v14.18.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/tumatj01/.npm/_npx/28151/lib/node_modules/sb/node_modules/watchpack-chokidar2/node_modules/fsevents
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

Environment Info:

  System:
    OS: macOS 11.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
  Browsers:
    Chrome: 96.0.4664.55
    Safari: 15.1

Additional context
Add any other context about the problem here.

@shilman
Copy link
Member

shilman commented Dec 4, 2021

Hey @JoshTumath. I'm not able to reproduce this. Is it possible that you're running an older version of one of the packages, esp @storybook/csf-tools?

  • yarn why @storybook/csf-tools
  • npm list @storybook/csf-tools

@JoshTumath
Copy link
Author

Hey @JoshTumath. I'm not able to reproduce this. Is it possible that you're running an older version of one of the packages, esp @storybook/csf-tools?

* `yarn why @storybook/csf-tools`
* `npm list @storybook/csf-tools`

No it looks as though I'm on the latest version.

yarn why v1.22.17
[1/4] 🤔  Why do we have the module "@storybook/csf-tools"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@storybook/csf-tools@6.4.4"
info Reasons this module exists
   - "_project_#@bbc#web-tooling-storybook#@storybook#addon-docs" depends on it
   - Hoisted from "_project_#@bbc#web-tooling-storybook#@storybook#addon-docs#@storybook#csf-tools"
   - Hoisted from "_project_#@bbc#web-tooling-storybook#@storybook#addon-docs#@storybook#core#@storybook#core-server#@storybook#csf-tools"

@shilman
Copy link
Member

shilman commented Dec 6, 2021

Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏

@JoshTumath
Copy link
Author

Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Thank you! 🙏

I've not been able to reproduce it so far, but I can keep trying. In the meantime, I can privately send you a Chromatic preview build of our Storybook, if that helps?

@shilman
Copy link
Member

shilman commented Dec 6, 2021

@JoshTumath is the error present in both start-storybook and build-storybook?

@JoshTumath
Copy link
Author

@JoshTumath is the error present in both start-storybook and build-storybook?

Yeah I can reproduce it on our actual project's Storybook on both.

I just noticed on Chromatic when it was verifying the storybook build, it gave this error:

Verifying your Storybook
→ This may take a few minutes 
→ Evaluation failed: TypeError: Cannot read property 'stories' of undefined 

at StoryStore.loadAllCSFFiles (https://5d02576173cf8b00202bda0e-yggmnuoqmb.chromatic.com/vendors~main.66e234e5.iframe.bundle.js:2:2851630)

at StoryStore.cacheAllCSFFiles (https://5d02576173cf8b00202bda0e-yggmnuoqmb.chromatic.com/vendors~main.66e234e5.iframe.bundle.js:2:2852381)

at __puppeteer_evaluation_script__:80:27 


✖ Failed to verify your Storybook 

Evaluation failed: TypeError: Cannot read property 'stories' of undefined 

at StoryStore.loadAllCSFFiles (https://5d02576173cf8b00202bda0e-yggmnuoqmb.chromatic.com/vendors~main.66e234e5.iframe.bundle.js:2:2851630)

at StoryStore.cacheAllCSFFiles (https://5d02576173cf8b00202bda0e-yggmnuoqmb.chromatic.com/vendors~main.66e234e5.iframe.bundle.js:2:2852381)
 at __puppeteer_evaluation_script__:80:27

I don't know if that helps. I'll try and dig into it more.

@shilman
Copy link
Member

shilman commented Dec 6, 2021

@JoshTumath thanks so much for the extra info!

@tmeasday does that stack trace mean anything to you?

@tmeasday
Copy link
Member

tmeasday commented Dec 6, 2021

I'd guess that's coming from this line:

Object.entries(this.storyIndex.stories).forEach(([storyId, { importPath }]) => {

@tmeasday
Copy link
Member

tmeasday commented Dec 6, 2021

That's pretty odd. The stories.json is there. Also it includes this @shilman:

{"id":"web-core-components-figure--basic","title":"Web Core/Components/Figure","name":"basic","importPath":"../../website/components/figure/figure.stories.jsx"}

@tmeasday
Copy link
Member

tmeasday commented Dec 7, 2021

OK, I figured out the Chromatic extract error ("Failed to verify your Storybook") --- will hopefully get a patch release out with a fix for the source problem soon. I'm pretty sure it is unrelated to the original issue on this ticket though, as the name === basic in the stories.json @shilman.

@JoshTumath JoshTumath changed the title Story titles no longer converted from camelCase to Capital Case wiith storyStoreV7 enabled Story titles no longer converted from camelCase to Capital Case with storyStoreV7 enabled Dec 8, 2021
@shilman
Copy link
Member

shilman commented Dec 9, 2021

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.9 containing PR #16947 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Dec 9, 2021
@shilman
Copy link
Member

shilman commented Dec 9, 2021

Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.2 containing PR #16947 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

@tmeasday
Copy link
Member

tmeasday commented Dec 9, 2021

I don't believe the original issue here is fixed by that PR.

@tmeasday tmeasday reopened this Dec 9, 2021
@JoshTumath
Copy link
Author

JoshTumath commented Dec 9, 2021

Thanks for fixing the Chromatic issue, @tmeasday. I can now show you a preview build of our project's Storybook (on version 6.4.9) with a reproduction of the bug. https://5d02576173cf8b00202bda0e-kvqojunzbo.chromatic.com/

@stale
Copy link

stale bot commented Jan 9, 2022

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jan 9, 2022
@tmeasday tmeasday removed the inactive label Jan 12, 2022
@shilman
Copy link
Member

shilman commented Nov 28, 2022

Discussed this with @JoshTumath today. Josh will get their design system updated to the latest 6.5.x and verify that the problem is still happening. At that point, I'll dig in and see if I can figure out what's going on. I'm still unable to reproduce.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Sep 5, 2023
@github-actions
Copy link
Contributor

I'm afraid we need to close this issue for now, since we can't take any action without the requested reproduction or additional information. But please don't hesitate to open a new issue if the problem persists – we're always happy to help. Thanks so much for your understanding.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants