[6.0] Remove unused params from getStorybookUI
In version 6 when I call
export const StorybookUIRoot = getStorybookUI({
host: '192.168.1.167',
isUIHidden: true,
})
both values are ignored.
Thats because the server isn't yet supported in 6.0 so it does nothing.
Okay. We should then remove the property from the config for getStorybookUI so TS gives an error when people try to set this. Maybe it should even throw an error "Server still unsupported!". Finding this out wasted quite some time for me.
@Levino thats a good point! thanks for the feedback 🙏 . I would like to say though that some rough edges are expected in beta however I understand it can be frustrating.
My pleasure. I suggest to use a whitelist for the options parameters which are currently supported and throw if any excess / unsupported values are set by the user.
@dannyhw Hey there! I'm trying to make the first contribution to this project and this seems to be simple enough!
Is this a matter of removing server-related params from getStorybookUI? But I'm not sure which one I should remove—there seem a few:
export type Params = {
onDeviceUI?: boolean;
resetStorybook?: boolean;
disableWebsockets?: boolean;
query?: string;
host?: string;
port?: number;
secured?: boolean;
initialSelection?: InitialSelection;
shouldPersistSelection?: boolean;
tabOpen?: number;
isUIHidden?: boolean;
shouldDisableKeyboardAvoidingView?: boolean;
keyboardAvoidingViewVerticalOffset?: number;
} & { theme?: typeof theme };
I guess we are removing host and port. How about query and disableWebsockets?
Sorry for not responding before, I've been really busy recently. I just merged a big refactor that removes many unused ones. Then now I just remembered about this issue so sorry for doing it without saying anything. If you want another issue to work on I'd be happy to find another for you.
Thats because the server isn't yet supported in 6.0 so it does nothing.
I've been trying to start a storybook server in our react-native solution, to be able to run loki. Are you saying that running a storybook server is now impossible?
@Mellbourn this was previously the case but a few months ago I was able to get the server working so now the server is supported for v6.5
@dannyhw thank you! Correcting the version of @storybook/core-server to 6.5.16 worked for me.