From 3ca80daee8c43f04c6f69ad2c6504f9b60344883 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Fri, 8 Jul 2022 17:13:26 +0400 Subject: [PATCH] remove showTypes setting --- packages/components/README.md | 1 - packages/components/src/components/SquiggleChart.tsx | 4 ---- packages/components/src/components/SquiggleItem.tsx | 3 --- .../components/src/components/SquigglePlayground.tsx | 11 ----------- packages/vscode-ext/media/previewWebview.js | 1 - packages/vscode-ext/package.json | 5 ----- packages/website/src/pages/playground.js | 5 ++--- 7 files changed, 2 insertions(+), 28 deletions(-) diff --git a/packages/components/README.md b/packages/components/README.md index 63a98d34..2b911caa 100644 --- a/packages/components/README.md +++ b/packages/components/README.md @@ -54,7 +54,6 @@ export function DynamicSquiggleChart({ squiggleString }) { width={445} height={200} showSummary={true} - showTypes={true} /> ); } diff --git a/packages/components/src/components/SquiggleChart.tsx b/packages/components/src/components/SquiggleChart.tsx index bfb69a4e..fecba1fd 100644 --- a/packages/components/src/components/SquiggleChart.tsx +++ b/packages/components/src/components/SquiggleChart.tsx @@ -36,8 +36,6 @@ export interface SquiggleChartProps { jsImports?: jsImports; /** Whether to show a summary of the distribution */ showSummary?: boolean; - /** Whether to show type information about returns, default false */ - showTypes?: boolean; /** Whether to show graph controls (scale etc)*/ showControls?: boolean; /** Set the x scale to be logarithmic by deault */ @@ -58,7 +56,6 @@ export const SquiggleChart: React.FC = React.memo( jsImports = defaultImports, showSummary = false, width, - showTypes = false, showControls = false, logX = false, expY = false, @@ -97,7 +94,6 @@ export const SquiggleChart: React.FC = React.memo( width={width} height={height} distributionPlotSettings={distributionPlotSettings} - showTypes={showTypes} chartSettings={chartSettings} environment={environment ?? defaultEnvironment} /> diff --git a/packages/components/src/components/SquiggleItem.tsx b/packages/components/src/components/SquiggleItem.tsx index e9b9c2f6..6a80c42c 100644 --- a/packages/components/src/components/SquiggleItem.tsx +++ b/packages/components/src/components/SquiggleItem.tsx @@ -106,8 +106,6 @@ export interface SquiggleItemProps { width?: number; height: number; distributionPlotSettings: DistributionPlottingSettings; - /** Whether to show type information; deprecated */ - showTypes?: boolean; /** Settings for displaying functions */ chartSettings: FunctionChartSettings; /** Environment for further function executions */ @@ -120,7 +118,6 @@ export const SquiggleItem: React.FC = ({ width, height, distributionPlotSettings, - showTypes = false, chartSettings, environment, }) => { diff --git a/packages/components/src/components/SquigglePlayground.tsx b/packages/components/src/components/SquigglePlayground.tsx index 301d8892..59389f17 100644 --- a/packages/components/src/components/SquigglePlayground.tsx +++ b/packages/components/src/components/SquigglePlayground.tsx @@ -32,8 +32,6 @@ interface PlaygroundProps { defaultCode?: string; /** How many pixels high is the playground */ height?: number; - /** Whether to show the types of outputs in the playground */ - showTypes?: boolean; /** Whether to show the log scale controls in the playground */ showControls?: boolean; /** Whether to show the summary table in the playground */ @@ -76,7 +74,6 @@ const schema = yup.object({}).shape({ .min(10) .max(100) .default(50), - showTypes: yup.boolean().required(), showControls: yup.boolean().required(), showSummary: yup.boolean().required(), showEditor: yup.boolean().required(), @@ -181,11 +178,6 @@ const ViewSettings: React.FC<{ register: UseFormRegister }> = ({ register={register} label="Chart Height (in pixels)" /> - @@ -380,7 +372,6 @@ const useRunnerState = (code: string) => { export const SquigglePlayground: FC = ({ defaultCode = "", height = 500, - showTypes = false, showControls = false, showSummary = false, logX = false, @@ -404,7 +395,6 @@ export const SquigglePlayground: FC = ({ sampleCount: 1000, xyPointLength: 1000, chartHeight: 150, - showTypes, showControls, logX, expY, @@ -444,7 +434,6 @@ export const SquigglePlayground: FC = ({ diagramStop={Number(vars.diagramStop)} diagramCount={Number(vars.diagramCount)} height={vars.chartHeight} - showTypes={vars.showTypes} showControls={vars.showControls} showSummary={vars.showSummary} logX={vars.logX} diff --git a/packages/vscode-ext/media/previewWebview.js b/packages/vscode-ext/media/previewWebview.js index 556a893b..13bdbe95 100644 --- a/packages/vscode-ext/media/previewWebview.js +++ b/packages/vscode-ext/media/previewWebview.js @@ -9,7 +9,6 @@ React.createElement(squiggle_components.SquigglePlayground, { code: text, showEditor: false, - showTypes: Boolean(showSettings.showTypes), showControls: Boolean(showSettings.showControls), showSummary: Boolean(showSettings.showSummary), }) diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json index a0386e21..2198c538 100644 --- a/packages/vscode-ext/package.json +++ b/packages/vscode-ext/package.json @@ -105,11 +105,6 @@ "configuration": { "title": "Squiggle", "properties": { - "squiggle.playground.showTypes": { - "type": "boolean", - "default": false, - "description": "Whether to show the types of outputs in the playground" - }, "squiggle.playground.showControls": { "type": "boolean", "default": false, diff --git a/packages/website/src/pages/playground.js b/packages/website/src/pages/playground.js index 6f2fb9db..5c52a9fa 100644 --- a/packages/website/src/pages/playground.js +++ b/packages/website/src/pages/playground.js @@ -44,12 +44,11 @@ export default function PlaygroundPage() { const playgroundProps = { defaultCode: "normal(0,1)", height: 700, - showTypes: true, ...hashData, onCodeChange: (code) => setHashData({ initialSquiggleString: code }), onSettingsChange: (settings) => { - const { showTypes, showControls, showSummary, showEditor } = settings; - setHashData({ showTypes, showControls, showSummary, showEditor }); + const { showControls, showSummary, showEditor } = settings; + setHashData({ showControls, showSummary, showEditor }); }, }; return (