remove showTypes setting

This commit is contained in:
Vyacheslav Matyukhin 2022-07-08 17:13:26 +04:00
parent a4684ddf39
commit 3ca80daee8
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
7 changed files with 2 additions and 28 deletions

View File

@ -54,7 +54,6 @@ export function DynamicSquiggleChart({ squiggleString }) {
width={445} width={445}
height={200} height={200}
showSummary={true} showSummary={true}
showTypes={true}
/> />
); );
} }

View File

@ -36,8 +36,6 @@ export interface SquiggleChartProps {
jsImports?: jsImports; jsImports?: jsImports;
/** Whether to show a summary of the distribution */ /** Whether to show a summary of the distribution */
showSummary?: boolean; showSummary?: boolean;
/** Whether to show type information about returns, default false */
showTypes?: boolean;
/** Whether to show graph controls (scale etc)*/ /** Whether to show graph controls (scale etc)*/
showControls?: boolean; showControls?: boolean;
/** Set the x scale to be logarithmic by deault */ /** Set the x scale to be logarithmic by deault */
@ -58,7 +56,6 @@ export const SquiggleChart: React.FC<SquiggleChartProps> = React.memo(
jsImports = defaultImports, jsImports = defaultImports,
showSummary = false, showSummary = false,
width, width,
showTypes = false,
showControls = false, showControls = false,
logX = false, logX = false,
expY = false, expY = false,
@ -97,7 +94,6 @@ export const SquiggleChart: React.FC<SquiggleChartProps> = React.memo(
width={width} width={width}
height={height} height={height}
distributionPlotSettings={distributionPlotSettings} distributionPlotSettings={distributionPlotSettings}
showTypes={showTypes}
chartSettings={chartSettings} chartSettings={chartSettings}
environment={environment ?? defaultEnvironment} environment={environment ?? defaultEnvironment}
/> />

View File

@ -106,8 +106,6 @@ export interface SquiggleItemProps {
width?: number; width?: number;
height: number; height: number;
distributionPlotSettings: DistributionPlottingSettings; distributionPlotSettings: DistributionPlottingSettings;
/** Whether to show type information; deprecated */
showTypes?: boolean;
/** Settings for displaying functions */ /** Settings for displaying functions */
chartSettings: FunctionChartSettings; chartSettings: FunctionChartSettings;
/** Environment for further function executions */ /** Environment for further function executions */
@ -120,7 +118,6 @@ export const SquiggleItem: React.FC<SquiggleItemProps> = ({
width, width,
height, height,
distributionPlotSettings, distributionPlotSettings,
showTypes = false,
chartSettings, chartSettings,
environment, environment,
}) => { }) => {

View File

@ -32,8 +32,6 @@ interface PlaygroundProps {
defaultCode?: string; defaultCode?: string;
/** How many pixels high is the playground */ /** How many pixels high is the playground */
height?: number; height?: number;
/** Whether to show the types of outputs in the playground */
showTypes?: boolean;
/** Whether to show the log scale controls in the playground */ /** Whether to show the log scale controls in the playground */
showControls?: boolean; showControls?: boolean;
/** Whether to show the summary table in the playground */ /** Whether to show the summary table in the playground */
@ -76,7 +74,6 @@ const schema = yup.object({}).shape({
.min(10) .min(10)
.max(100) .max(100)
.default(50), .default(50),
showTypes: yup.boolean().required(),
showControls: yup.boolean().required(), showControls: yup.boolean().required(),
showSummary: yup.boolean().required(), showSummary: yup.boolean().required(),
showEditor: yup.boolean().required(), showEditor: yup.boolean().required(),
@ -181,11 +178,6 @@ const ViewSettings: React.FC<{ register: UseFormRegister<FormFields> }> = ({
register={register} register={register}
label="Chart Height (in pixels)" label="Chart Height (in pixels)"
/> />
<Checkbox
name="showTypes"
register={register}
label="Show information about displayed types"
/>
</div> </div>
</HeadedSection> </HeadedSection>
@ -380,7 +372,6 @@ const useRunnerState = (code: string) => {
export const SquigglePlayground: FC<PlaygroundProps> = ({ export const SquigglePlayground: FC<PlaygroundProps> = ({
defaultCode = "", defaultCode = "",
height = 500, height = 500,
showTypes = false,
showControls = false, showControls = false,
showSummary = false, showSummary = false,
logX = false, logX = false,
@ -404,7 +395,6 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
sampleCount: 1000, sampleCount: 1000,
xyPointLength: 1000, xyPointLength: 1000,
chartHeight: 150, chartHeight: 150,
showTypes,
showControls, showControls,
logX, logX,
expY, expY,
@ -444,7 +434,6 @@ export const SquigglePlayground: FC<PlaygroundProps> = ({
diagramStop={Number(vars.diagramStop)} diagramStop={Number(vars.diagramStop)}
diagramCount={Number(vars.diagramCount)} diagramCount={Number(vars.diagramCount)}
height={vars.chartHeight} height={vars.chartHeight}
showTypes={vars.showTypes}
showControls={vars.showControls} showControls={vars.showControls}
showSummary={vars.showSummary} showSummary={vars.showSummary}
logX={vars.logX} logX={vars.logX}

View File

@ -9,7 +9,6 @@
React.createElement(squiggle_components.SquigglePlayground, { React.createElement(squiggle_components.SquigglePlayground, {
code: text, code: text,
showEditor: false, showEditor: false,
showTypes: Boolean(showSettings.showTypes),
showControls: Boolean(showSettings.showControls), showControls: Boolean(showSettings.showControls),
showSummary: Boolean(showSettings.showSummary), showSummary: Boolean(showSettings.showSummary),
}) })

View File

@ -105,11 +105,6 @@
"configuration": { "configuration": {
"title": "Squiggle", "title": "Squiggle",
"properties": { "properties": {
"squiggle.playground.showTypes": {
"type": "boolean",
"default": false,
"description": "Whether to show the types of outputs in the playground"
},
"squiggle.playground.showControls": { "squiggle.playground.showControls": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,

View File

@ -44,12 +44,11 @@ export default function PlaygroundPage() {
const playgroundProps = { const playgroundProps = {
defaultCode: "normal(0,1)", defaultCode: "normal(0,1)",
height: 700, height: 700,
showTypes: true,
...hashData, ...hashData,
onCodeChange: (code) => setHashData({ initialSquiggleString: code }), onCodeChange: (code) => setHashData({ initialSquiggleString: code }),
onSettingsChange: (settings) => { onSettingsChange: (settings) => {
const { showTypes, showControls, showSummary, showEditor } = settings; const { showControls, showSummary, showEditor } = settings;
setHashData({ showTypes, showControls, showSummary, showEditor }); setHashData({ showControls, showSummary, showEditor });
}, },
}; };
return ( return (