-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for Roblox internal Stories and Storybooks #29
base: main
Are you sure you want to change the base?
Conversation
Breaking change: loadStorybookModule's arguments have been reversed. Signature changed from `(ModuleLoader, ModuleScript) -> LoadedStorybook` to `(ModuleScript, ModuleLoader) -> LoadedStorybook`. Loaders are now optional for the consumer to supply
The loader is now instantiated and attached to the storybook implicitly in most cases. This improves sandboxing between storybooks Breaking change: loadStorybookModule's arguments have been reversed. Signature changed from `(ModuleLoader, ModuleScript) -> LoadedStorybook` to `(ModuleScript, ModuleLoader?) -> LoadedStorybook`. Loaders are now optional for the consumer to supply Also keep track of the source module
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.
Remember to remove this before merging
# Problem A Roblox internal use case requires initializing a particular singleton module only once. This initialization usually happens in storybooks, which are all put into the same module loader. We need to sandbox each storybook's modules to avoid collisions # Solution The loader is now instantiated and attached to the storybook implicitly in most cases. This improves sandboxing between storybooks. This PR was split from #29 > [!IMPORTANT] > Breaking change: `loadStorybookModule`'s arguments have been reversed. Signature changed from `(ModuleLoader, ModuleScript) -> LoadedStorybook` to `(ModuleScript, ModuleLoader?) -> LoadedStorybook`. Loaders are now optional for the consumer to supply
| `mapDefinition` | `((story: any) -> any)?` | | | ||
| `mapStory` | `((story: any) -> (props: StoryProps) -> any)?` | | |
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.
Either add support for mapStory and mapDefinition to all renderers or mark them as Roblox internal only and remove mention from the docs
Problem
Solution