Change the default font size in code editor to be 12 (#1021)

This commit is contained in:
Shuchang Zheng
2024-10-21 11:56:53 -07:00
committed by GitHub
parent 935ecd046f
commit 437f70427f
11 changed files with 6 additions and 13 deletions

View File

@@ -293,7 +293,6 @@ function CreateNewTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={ value={
@@ -388,7 +387,6 @@ function CreateNewTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={field.value === null ? "" : field.value} value={field.value === null ? "" : field.value}
@@ -509,7 +507,6 @@ function CreateNewTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={field.value === null ? "" : field.value} value={field.value === null ? "" : field.value}

View File

@@ -462,7 +462,6 @@ function SavedTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={ value={
@@ -557,7 +556,6 @@ function SavedTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={14}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={ value={
@@ -683,7 +681,6 @@ function SavedTaskForm({ initialValues }: Props) {
<CodeEditor <CodeEditor
{...field} {...field}
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
value={field.value === null ? "" : field.value} value={field.value === null ? "" : field.value}

View File

@@ -125,7 +125,6 @@ function TaskDetails() {
language="json" language="json"
value={JSON.stringify(task.extracted_information, null, 2)} value={JSON.stringify(task.extracted_information, null, 2)}
readOnly readOnly
fontSize={12}
minHeight={"96px"} minHeight={"96px"}
maxHeight={"500px"} maxHeight={"500px"}
className="w-full" className="w-full"
@@ -149,7 +148,6 @@ function TaskDetails() {
language="json" language="json"
value={JSON.stringify(task.failure_reason, null, 2)} value={JSON.stringify(task.failure_reason, null, 2)}
readOnly readOnly
fontSize={12}
minHeight={"96px"} minHeight={"96px"}
maxHeight={"500px"} maxHeight={"500px"}
className="w-full" className="w-full"

View File

@@ -76,7 +76,6 @@ function TaskParameters() {
readOnly readOnly
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
fontSize={12}
/> />
</div> </div>
<div className="flex gap-16"> <div className="flex gap-16">
@@ -113,7 +112,6 @@ function TaskParameters() {
readOnly readOnly
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
fontSize={12}
/> />
</div> </div>
</section> </section>

View File

@@ -21,7 +21,6 @@ function WorkflowParameterInput({ type, value, onChange }: Props) {
value={ value={
typeof value === "string" ? value : JSON.stringify(value, null, 2) typeof value === "string" ? value : JSON.stringify(value, null, 2)
} }
fontSize={12}
/> />
); );
} }

View File

@@ -494,7 +494,6 @@ function WorkflowRun() {
value={JSON.stringify(value, null, 2)} value={JSON.stringify(value, null, 2)}
readOnly readOnly
language="json" language="json"
fontSize={12}
minHeight="96px" minHeight="96px"
maxHeight="500px" maxHeight="500px"
/> />

View File

@@ -23,7 +23,7 @@ function CodeEditor({
language, language,
className, className,
readOnly = false, readOnly = false,
fontSize = 8, fontSize = 12,
}: Props) { }: Props) {
const extensions = const extensions =
language === "json" language === "json"

View File

@@ -41,6 +41,7 @@ function DataSchema({ value, onChange }: Props) {
// TODO // TODO
}} }}
className="nowheel nopan" className="nowheel nopan"
fontSize={8}
/> />
</div> </div>
</div> </div>

View File

@@ -70,6 +70,7 @@ function CodeBlockNode({ id, data }: NodeProps<CodeBlockNode>) {
updateNodeData(id, { code: value }); updateNodeData(id, { code: value });
}} }}
className="nopan" className="nopan"
fontSize={8}
/> />
</div> </div>
</div> </div>

View File

@@ -223,6 +223,7 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
handleChange("dataSchema", value); handleChange("dataSchema", value);
}} }}
className="nowheel nopan" className="nowheel nopan"
fontSize={8}
/> />
</div> </div>
)} )}
@@ -324,6 +325,7 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
handleChange("errorCodeMapping", value); handleChange("errorCodeMapping", value);
}} }}
className="nowheel nopan" className="nowheel nopan"
fontSize={8}
/> />
</div> </div>
)} )}

View File

@@ -115,6 +115,7 @@ function TextPromptNode({ id, data }: NodeProps<TextPromptNode>) {
updateNodeData(id, { jsonSchema: value }); updateNodeData(id, { jsonSchema: value });
}} }}
className="nowheel nopan" className="nowheel nopan"
fontSize={8}
/> />
</div> </div>
)} )}