Skip to content

Commit 5b48385

Browse files
author
veryevilhuman
committed
ux: improve responsiveness on small widths for auto-approve button
- + Add Russian i18n string
1 parent 87b45de commit 5b48385

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

webview-ui/src/components/chat/AutoApproveDropdown.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,24 +173,35 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
173173
"inline-flex items-center gap-1.5 relative whitespace-nowrap px-1.5 py-1 text-xs",
174174
"bg-transparent border border-[rgba(255,255,255,0.08)] rounded-md text-vscode-foreground",
175175
"transition-all duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder focus-visible:ring-inset",
176+
"max-[400px]:shrink-0",
176177
disabled
177178
? "opacity-50 cursor-not-allowed"
178179
: "opacity-90 hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)] cursor-pointer",
179180
triggerClassName,
180181
)}>
181-
{!effectiveAutoApprovalEnabled ? (
182-
<X className="size-3 flex-shrink-0" />
183-
) : (
184-
<CheckCheck className="size-3 flex-shrink-0" />
185-
)}
182+
<CheckCheck className="min-[400px]:hidden size-3 flex-shrink-0" />
183+
<span className="max-[400px]:hidden">
184+
{!effectiveAutoApprovalEnabled ? (
185+
<X className="size-3 flex-shrink-0" />
186+
) : (
187+
<CheckCheck className="size-3 flex-shrink-0" />
188+
)}
189+
</span>
186190

187-
<span className="truncate min-w-0">
191+
<span className="min-[400px]:inline hidden truncate min-w-0">
188192
{!effectiveAutoApprovalEnabled
189193
? t("chat:autoApprove.triggerLabelOff")
190194
: enabledCount === totalCount
191195
? t("chat:autoApprove.triggerLabelAll")
192196
: t("chat:autoApprove.triggerLabel", { count: enabledCount })}
193197
</span>
198+
<span className="min-[400px]:hidden min-w-0">
199+
{!effectiveAutoApprovalEnabled
200+
? t("chat:autoApprove.triggerLabelOffShort")
201+
: enabledCount === totalCount
202+
? t("chat:autoApprove.triggerLabelAll")
203+
: enabledCount}
204+
</span>
194205
</PopoverTrigger>
195206
</StandardTooltip>
196207
<PopoverContent

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@
284284
"triggerLabel_zero": "0 auto-approve",
285285
"triggerLabel_one": "1 auto-approved",
286286
"triggerLabel_other": "{{count}} auto-approved",
287-
"triggerLabelAll": "YOLO"
287+
"triggerLabelAll": "YOLO",
288+
"triggerLabelOffShort": "Off"
288289
},
289290
"announcement": {
290291
"title": "🎉 Roo Code {{version}} Released",

webview-ui/src/i18n/locales/ru/chat.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)