From dee5ca202493c804862c64e0601b6a02c21b19c1 Mon Sep 17 00:00:00 2001 From: Marin Minnerly Date: Sat, 9 Nov 2024 07:59:44 -0800 Subject: [PATCH] Remove debug prints --- src/Storybook/StoryPreview.luau | 4 ---- src/Storybook/StoryView.luau | 6 ------ 2 files changed, 10 deletions(-) diff --git a/src/Storybook/StoryPreview.luau b/src/Storybook/StoryPreview.luau index 900e7b0f..b6902db4 100644 --- a/src/Storybook/StoryPreview.luau +++ b/src/Storybook/StoryPreview.luau @@ -43,12 +43,10 @@ local StoryPreview = React.forwardRef(function(providedProps: Props, ref: any) React.useEffect(function() if props.story == prevStory and props.controls ~= prevControls then - print("story or controls changed") local areControlsDifferent = prevControls and not Sift.Dictionary.equals(props.controls, prevControls) if lifecycle.current and areControlsDifferent then local success, result = xpcall(function() - print("update", props.controls) lifecycle.current.update(props.controls) end, debug.traceback) @@ -63,7 +61,6 @@ local StoryPreview = React.forwardRef(function(providedProps: Props, ref: any) if props.story and ref.current then -- TODO: Rendering before controls are applied local success, result = xpcall(function() - print("render") lifecycle.current = Storyteller.render(ref.current, props.story) end, debug.traceback) @@ -74,7 +71,6 @@ local StoryPreview = React.forwardRef(function(providedProps: Props, ref: any) return function() if lifecycle.current then - print("unmount") lifecycle.current.unmount() lifecycle.current = nil end diff --git a/src/Storybook/StoryView.luau b/src/Storybook/StoryView.luau index a0cebdb1..b1f0c46b 100644 --- a/src/Storybook/StoryView.luau +++ b/src/Storybook/StoryView.luau @@ -34,7 +34,6 @@ local function StoryView(props: Props) local theme = useTheme() local settingsContext = SettingsContext.use() local story, storyErr = Storyteller.useStory(props.story, props.storybook, props.loader) - local prevStory = usePrevious(story) local zoom = useZoom(props.story) local plugin = React.useContext(PluginContext.Context) local changedControls, setChangedControls = React.useState({}) @@ -44,7 +43,6 @@ local function StoryView(props: Props) local storyParentRef = React.useRef(nil :: GuiObject?) React.useEffect(function() - print("setChangedControls({})") setChangedControls({}) end, { story }) @@ -64,13 +62,9 @@ local function StoryView(props: Props) return controls end, { story, changedControls } :: { unknown }) - print("changedControls", changedControls) - print("controlsWithUserOverrides", controlsWithUserOverrides) - local showControls = controlsWithUserOverrides and not Sift.isEmpty(controlsWithUserOverrides) local setControl = React.useCallback(function(control: string, newValue: any) - print("setControl", control, newValue) setChangedControls(function(prev) return Sift.Dictionary.merge(prev, { [control] = newValue,