-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Future - restructure storybook types #19580
Conversation
…-a-storybooktypes
Socket Security Report👍 No new dependency issues detected in pull request Socket.dev scan summary
Bot CommandsTo ignore an alert, reply with a comment starting with Powered by socket.dev |
…-a-storybooktypes
…-a-storybooktypes
Do you have an idea of how many types there are with duplicate names? Do you have an idea of how many namespaced types we are exporting from the I feel like we are possibly making a lot more work for ourselves to rename all the Or is your intention that we examine every |
Yes @tmeasday. I'd propose we ultimately want to end up with types without name-spaces. I tried this PR before without names-acing and got stuck hard on types such as After getting so stuck, and not being able to resolve these conflicts, I diced to take the safe path, and namespace everything, and resolve the actual duplications in a second PR. I suspect finding some of the name-spaced types that are NOT duplicated will be easy, renaming them to something that makes sense without a namespace will also be easy. But like I said, I was planning to do those steps in a separate PR. Unless you have a different opinion? |
I don't have a strong enough opinion to invalidate the work you already did, so let's go for it. I'd be happy to work through those types above; perhaps create a ticket for me next cycle? |
…-a-storybooktypes
…-a-storybooktypes
|
||
export * from './queryparams'; | ||
|
||
export * from '@storybook/store'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removes the useArgs
hook that is in our public documentation @ndelangen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding it back:
#19720
I'm afraid this isn't going to be easy to review..
The problem:
The solution:
The procedure:
This leaves this PR with all sorts of duplicated types that are name-spaced based on where they came from.
But they are all located in the same place/package.
The next obvious step is to truly de-duplicate the types.
But this will open many many instances where types that looked duplicated vary slightly, but significant enough to cause types conflicts.
Resolving those conflicts is going to be painful but necessary.
But who will do that work and when?
I currently do not yet know the answer.
This IS already a breaking change, mainly because of:
Could I make this backwards compatible? Yes.
Do I think we should? No.
When we start cleaning up, de-duplicate types.. will that result in breaking changes again? Yes.
And this is where I think we might need to balance things out.
I doubt we'll have completed all that work before 7.0 release. So we'll likely have to start deprecating certain types over the course of 7.0's life-time?
I telescoped this PR off of: #19553