flipbook icon indicating copy to clipboard operation
flipbook copied to clipboard

StoryPreview custom viewport sizes

Open passhley opened this issue 2 years ago • 2 comments

Could allow developers to pass custom viewport size options they can switch between in their storybook, such like if they want to be able to quickly click into a mobile view, etc.

Could look something like

return {
    roact = Roact,
    storyRoots = { 
        script.Parent.Components
    },
    viewports = {
        mobileSM = UDim2.fromOffset(800, 600),
        ultrawide = UDim2.fromOffset(3440, 1440),
    }
}

passhley avatar Mar 28 '22 11:03 passhley

Since users can mount the storybook in the viewport and use the device emulator to change screen size, would it still be valuable to bake this into the plugin?

vocksel avatar Mar 28 '22 15:03 vocksel

Hmm that is very true. My big plan for the plugin was to reduce the need for ever looking into studio as much as possible and being able to just keep it covering your whole screen and switching back and forth with your code editor. But yeah, it doesn't really seem like it'd be a huge thing or anything.

passhley avatar Mar 29 '22 01:03 passhley