Skip to content

Commit 5823c13

Browse files
committed
fix: improve shortcut input layout and placeholder visibility
- Change shortcut input width from fixed w-20 to flex-1 for better space utilization - Wrap checkbox in flex-shrink-0 container to prevent text wrapping - Add min-w-0 to input for proper flex behavior - Fixes placeholder text not being visible due to narrow input width issue #27
1 parent 1f0071f commit 5823c13

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/web-view/src/components/group-command-item.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,22 @@ export const GroupCommandItem = ({
7070
onChange={(e) => onUpdate(index, { command: e.target.value })}
7171
/>
7272
<div className="flex items-center gap-4">
73-
<Checkbox
74-
id={`vscode-${index}`}
75-
label="Use VS Code API"
76-
checked={command.useVsCodeApi || false}
77-
onCheckedChange={(checked) =>
78-
onUpdate(index, { useVsCodeApi: !!checked })
79-
}
80-
/>
73+
<div className="flex-shrink-0">
74+
<Checkbox
75+
id={`vscode-${index}`}
76+
label="Use VS Code API"
77+
checked={command.useVsCodeApi || false}
78+
onCheckedChange={(checked) =>
79+
onUpdate(index, { useVsCodeApi: !!checked })
80+
}
81+
/>
82+
</div>
8183
<Input
8284
placeholder="Shortcut (optional)"
8385
value={command.shortcut || ""}
8486
onChange={(e) => onUpdate(index, { shortcut: e.target.value })}
8587
maxLength={1}
86-
className="w-20"
88+
className="flex-1 min-w-0"
8789
/>
8890
</div>
8991
</>
@@ -96,7 +98,7 @@ export const GroupCommandItem = ({
9698
value={command.shortcut || ""}
9799
onChange={(e) => onUpdate(index, { shortcut: e.target.value })}
98100
maxLength={1}
99-
className="w-20"
101+
className="flex-1"
100102
/>
101103
</div>
102104
)}

0 commit comments

Comments
 (0)