diff --git a/CHANGELOG.md b/CHANGELOG.md index 99a43d753..46d66da40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug fixes +- [#499](https://github.com/alleslabs/celatone-frontend/pull/499) Fix sometimes select widget input not full, manual schema upload max lines, and expand/collapse all chevron - [#497](https://github.com/alleslabs/celatone-frontend/pull/497) Fix stored codes route and navbar behavior from dev to normal mode - [#470](https://github.com/alleslabs/celatone-frontend/pull/470) Fix json schema array field default behavior - [#476](https://github.com/alleslabs/celatone-frontend/pull/476) Fix terra rpc diff --git a/src/lib/components/json-schema/JsonSchemaDrawer.tsx b/src/lib/components/json-schema/JsonSchemaDrawer.tsx index bdc665866..7b32cfb8c 100644 --- a/src/lib/components/json-schema/JsonSchemaDrawer.tsx +++ b/src/lib/components/json-schema/JsonSchemaDrawer.tsx @@ -60,8 +60,7 @@ export const JsonSchemaDrawer = ({ > Please note that the JSON schema you upload on our website will only - be stored locally on your device. For public projects with verified - JSON schemas, they will be visible and accessible to others. + be stored locally on your device. ); diff --git a/src/lib/components/json-schema/section/SchemaInputSection.tsx b/src/lib/components/json-schema/section/SchemaInputSection.tsx index 0bfd42eff..ca3c05b5d 100644 --- a/src/lib/components/json-schema/section/SchemaInputSection.tsx +++ b/src/lib/components/json-schema/section/SchemaInputSection.tsx @@ -53,12 +53,14 @@ export const SchemaInputSection = observer( {/* TODO: revisit type assertion later */} - setSchemaInput(JSON.stringify(data))} - /> +
+ setSchemaInput(JSON.stringify(data))} + /> +
) : ( <> diff --git a/src/lib/components/json/JsonInput.tsx b/src/lib/components/json/JsonInput.tsx index 90acfc999..dfc514e17 100644 --- a/src/lib/components/json/JsonInput.tsx +++ b/src/lib/components/json/JsonInput.tsx @@ -13,6 +13,7 @@ interface JsonInputProps { topic?: string; text?: string; minLines?: number; + maxLines?: number; setText: (value: string) => void; validateFn?: (value: string) => string | null; } @@ -74,6 +75,7 @@ const JsonInput = ({ topic, text = "", minLines = 16, + maxLines = 100, setText, validateFn = jsonValidate, }: JsonInputProps) => { @@ -103,8 +105,8 @@ const JsonInput = ({ const lines = jsonLineCount(text); // Limit the number of lines from minLines (default is 16) to 100 - return Math.min(Math.max(lines, minLines), 100); - }, [text, minLines]); + return Math.min(Math.max(lines, minLines), maxLines); + }, [text, minLines, maxLines]); return ( <> diff --git a/src/lib/pages/code-details/components/json-schema/CodeSchemaSection.tsx b/src/lib/pages/code-details/components/json-schema/CodeSchemaSection.tsx index 15ac96183..fca828758 100644 --- a/src/lib/pages/code-details/components/json-schema/CodeSchemaSection.tsx +++ b/src/lib/pages/code-details/components/json-schema/CodeSchemaSection.tsx @@ -84,8 +84,7 @@ export const CodeSchemaSection = ({ border="1px solid var(--chakra-colors-gray-700)" borderRadius="8px" > - Uploaded JSON schemas are stored locally on your device. Public projects - with verified JSON schemas are visible and accessible to others. + Uploaded JSON schemas are stored locally on your device. diff --git a/src/lib/pages/execute/components/schema-execute/index.tsx b/src/lib/pages/execute/components/schema-execute/index.tsx index 31eb24c44..67635fdd5 100644 --- a/src/lib/pages/execute/components/schema-execute/index.tsx +++ b/src/lib/pages/execute/components/schema-execute/index.tsx @@ -84,7 +84,12 @@ export const SchemaExecute = ({ />