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

Enable auto-title for non-storyStoreV7 #218

Merged
merged 3 commits into from
Feb 18, 2022
Merged

Enable auto-title for non-storyStoreV7 #218

merged 3 commits into from
Feb 18, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jan 24, 2022

Fixes #201

This enables the omission of title properties in the default export of stories (the new storybook "autotitle" feature). It's a little less powerful without #182, but it's still nice to support this, I think.

I did notice an issue with HMR, but it seems not to be introduced in this PR, but exists in the react example on main as well. Changing a css value does still HMR, so I think there is no regression here.

@joshwooding
Copy link
Member

I was seeing the issue with identical stories in the sidebar too but couldn't reproduce it :/ Hopefully #182 fixes it.

@IanVS IanVS force-pushed the issue/201-autotitle branch from de994d5 to 9ff5c41 Compare January 25, 2022 14:57
@IanVS
Copy link
Member Author

IanVS commented Jan 25, 2022

OK, I've rebased this onto #182 (which turns out probably wasn't strictly necessary), and made a small change to what is stored as window.STORIES, and there are no more duplicates.

The last issue I'm seeing is that HMR does not seem to be working correctly, and the page refreshes instead of hot reloading.

@IanVS
Copy link
Member Author

IanVS commented Feb 11, 2022

Hmmmm, it seems like HMR is broken and the whole page refreshes on main as well, when running the react example and turning off storyStoreV7, so I wonder if something else is going on here.

@IanVS IanVS requested review from eirslett and joshwooding and removed request for eirslett and joshwooding February 17, 2022 03:44
@IanVS IanVS force-pushed the issue/201-autotitle branch from 9ff5c41 to 2773ac1 Compare February 17, 2022 03:47
We need this version because it removes a `path` import from some browser code.
@IanVS IanVS force-pushed the issue/201-autotitle branch from 2773ac1 to c89b67d Compare February 17, 2022 03:49
@IanVS IanVS marked this pull request as ready for review February 17, 2022 03:53
Copy link
Member

@joshwooding joshwooding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@IanVS IanVS merged commit 6c556e1 into main Feb 18, 2022
@IanVS IanVS deleted the issue/201-autotitle branch February 18, 2022 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autotitle when not using storyStoreV7
2 participants