-
-
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
Core: Allow overriding WebView and UrlStore #19623
Core: Allow overriding WebView and UrlStore #19623
Conversation
@tmeasday classifying this as a maintenance PR so we can patch it back to 6.5 😈 |
This is great! Thanks for making this happen 🙏 |
Decision: Rename |
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.
Generally LGTM, but are we going to rename Store_WebProjectAnnotations
to ProjectAnnotations
in a subsequent PR?
@shilman I'm doing it in this PR, will be done momentarily. |
…ing-webview-and-urlstore-to
Also clean up sub types
@kasperpeulen after piping the I guess I would have to do something like: export type AnyStorybookFramework = AnyFramework & { TStorybookRoot: any };
export type AnyWebStorybookFramework = AnyStorybookFramework & { TStorybookRoot: HTMLElement };
export class PreviewWeb<TFramework extends AnyStorybookFramework> {... }
export interface ReactFramework extends AnyWebStorybookFramework {
component: ComponentType<this['T']>;
storyResult: StoryFnReactReturnType;
} WDYT? |
Take another look @kasperpeulen and @shilman - we can still move the storybook/code/lib/types/src/modules/store.ts Lines 30 to 32 in 95da68c
|
Looks good @tmeasday |
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.
Looks great to me! 🙌
…ing-webview-and-urlstore-to
Issue: React Native wants to override these with non-web versions.
What I did
PreviewWeb
How to test
Everything should just pass as before in SB proper.
@shilman I am labelling this as
patch
because we want to backport to 6.5.x. However it may not apply cleanly due to the type parameterization. We could do a simpler version that doesn't worry about that?