Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0021c2f

Browse files
authoredFeb 20, 2024
fix(site): fix parameters field size (#12231)
1 parent 57bf997 commit 0021c2f

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed
 

‎site/src/components/Form/Form.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import {
33
createContext,
44
type FC,
55
type HTMLProps,
6-
type PropsWithChildren,
76
useContext,
87
ReactNode,
8+
ComponentProps,
99
} from "react";
1010
import { AlphaBadge, DeprecatedBadge } from "components/Badges/Badges";
1111
import { Stack } from "components/Stack/Stack";
@@ -135,11 +135,14 @@ export const FormSection: FC<FormSectionProps> = ({
135135
);
136136
};
137137

138-
export const FormFields: FC<PropsWithChildren> = ({ children }) => {
138+
export const FormFields: FC<ComponentProps<typeof Stack>> = (props) => {
139139
return (
140-
<Stack direction="column" spacing={3} css={styles.formSectionFields}>
141-
{children}
142-
</Stack>
140+
<Stack
141+
direction="column"
142+
spacing={3}
143+
{...props}
144+
css={styles.formSectionFields}
145+
/>
143146
);
144147
};
145148

‎site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,14 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
256256
title="Parameters"
257257
description="These are the settings used by your template. Please note that immutable parameters cannot be modified once the workspace is created."
258258
>
259-
{/*
260-
Opted not to use FormFields in order to increase spacing.
261-
This decision was made because rich parameter inputs are more visually dense than standard text fields.
262-
*/}
263-
<div css={{ display: "flex", flexDirection: "column", gap: 36 }}>
259+
{/* The parameter fields are densely packed and carry significant information,
260+
/* hence they require additional vertical spacing for better
261+
/*readability and user experience. */}
262+
<FormFields
263+
css={{
264+
gap: 36,
265+
}}
266+
>
264267
{parameters.map((parameter, index) => {
265268
const parameterField = `rich_parameter_values.${index}`;
266269
const parameterInputName = `${parameterField}.value`;
@@ -285,7 +288,7 @@ export const CreateWorkspacePageView: FC<CreateWorkspacePageViewProps> = ({
285288
/>
286289
);
287290
})}
288-
</div>
291+
</FormFields>
289292
</FormSection>
290293
)}
291294

0 commit comments

Comments
 (0)
Failed to load comments.