Skip to content

Commit 983d366

Browse files
committed
refactor: enhance ManageEnvironmentDialog with additional input guidance for environment name
1 parent 681993b commit 983d366

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

frontend/components/environments/ManageEnvironmentDialog.tsx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,24 @@ const RenameEnvironment = (props: { environment: EnvironmentType }) => {
6969
? 'Upgrade to Pro to rename Environments'
7070
: "You don't have the permissions required to rename this Environment"}
7171
</Alert>
72-
<Input
73-
value={sanitizeInput(name)}
74-
setValue={setName}
75-
label="Environment name"
76-
required
77-
maxLength={32}
78-
data-autofocus
79-
disabled={!allowRename}
80-
/>
72+
73+
<div className="space-y-2">
74+
<Input
75+
value={sanitizeInput(name)}
76+
setValue={setName}
77+
label="Environment name"
78+
required
79+
maxLength={32}
80+
data-autofocus
81+
disabled={!allowRename}
82+
/>
83+
{allowRename && (
84+
<p className="text-xs text-neutral-500">
85+
Use up to 32 characters. Only letters, numbers, hyphens and underscores allowed.
86+
</p>
87+
)}
88+
</div>
89+
8190
{allowRename && (
8291
<div className="flex justify-end">
8392
<Button type="submit" variant="primary" disabled={name === props.environment.name}>

0 commit comments

Comments
 (0)