Skip to content

Commit c79cb29

Browse files
authored
Remove chevrons from chat buttons (#7970)
1 parent b309a6a commit c79cb29

File tree

5 files changed

+10
-32
lines changed

5 files changed

+10
-32
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useState, useMemo, useCallback } from "react"
22
import { Fzf } from "fzf"
3-
import { ChevronUp } from "lucide-react"
43

54
import { cn } from "@/lib/utils"
65
import { useRooPortal } from "@/components/ui/hooks/useRooPortal"
@@ -149,20 +148,14 @@ export const ApiConfigSelector = ({
149148
disabled={disabled}
150149
data-testid="dropdown-trigger"
151150
className={cn(
152-
"min-w-0 inline-flex items-center gap-1.5 relative whitespace-nowrap px-1.5 py-1 text-xs",
151+
"min-w-0 inline-flex items-center relative whitespace-nowrap px-1.5 py-1 text-xs",
153152
"bg-transparent border border-[rgba(255,255,255,0.08)] rounded-md text-vscode-foreground",
154153
"transition-all duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder focus-visible:ring-inset",
155154
disabled
156155
? "opacity-50 cursor-not-allowed"
157156
: "opacity-90 hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)] cursor-pointer",
158157
triggerClassName,
159158
)}>
160-
<ChevronUp
161-
className={cn(
162-
"pointer-events-none opacity-80 flex-shrink-0 size-3 transition-transform duration-200",
163-
open && "rotate-180",
164-
)}
165-
/>
166159
<span className="truncate">{displayName}</span>
167160
</PopoverTrigger>
168161
</StandardTooltip>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
167167
: "opacity-90 hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)] cursor-pointer",
168168
triggerClassName,
169169
)}>
170-
<CheckCheck className="size-3" />
171-
<span className="truncate">
170+
<CheckCheck className="size-3 flex-shrink-0" />
171+
<span className="truncate min-w-0">
172172
{enabledCount === totalCount
173173
? t("chat:autoApprove.triggerLabelAll")
174174
: t("chat:autoApprove.triggerLabel", { count: enabledCount })}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11001100
</StandardTooltip>
11011101
</div>
11021102

1103-
<div className="absolute bottom-2 right-2 z-30">
1103+
<div className="absolute bottom-2 right-2 z-30 flex items-center gap-1">
11041104
{isEditMode && (
11051105
<StandardTooltip content={t("chat:cancel.title")}>
11061106
<button
@@ -1175,12 +1175,12 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11751175
)}
11761176

11771177
<div className="flex items-center gap-2">
1178-
<div className="flex items-center gap-2 min-w-40 overflow-clip flex-1">
1178+
<div className="flex items-center gap-2 min-w-0 overflow-clip flex-1">
11791179
<ModeSelector
11801180
value={mode}
11811181
title={t("chat:selectMode")}
11821182
onChange={handleModeChange}
1183-
triggerClassName="min-w-20 text-ellipsis overflow-hidden"
1183+
triggerClassName="text-ellipsis overflow-hidden flex-shrink-0"
11841184
modeShortcutText={modeShortcutText}
11851185
customModes={customModes}
11861186
customModePrompts={customModePrompts}
@@ -1191,12 +1191,12 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11911191
disabled={selectApiConfigDisabled}
11921192
title={t("chat:selectApiConfig")}
11931193
onChange={handleApiConfigChange}
1194-
triggerClassName="min-w-16 text-ellipsis overflow-hidden"
1194+
triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink"
11951195
listApiConfigMeta={listApiConfigMeta || []}
11961196
pinnedApiConfigs={pinnedApiConfigs}
11971197
togglePinnedApiConfig={togglePinnedApiConfig}
11981198
/>
1199-
<AutoApproveDropdown triggerClassName="min-w-20 text-ellipsis overflow-hidden" />
1199+
<AutoApproveDropdown triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink" />
12001200
</div>
12011201
<div className="flex flex-shrink-0 items-center gap-0.5">
12021202
{isTtsPlaying && (

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react"
22
import { Fzf } from "fzf"
3-
import { ChevronUp, Check, X } from "lucide-react"
3+
import { Check, X } from "lucide-react"
44

55
import { type ModeConfig, type CustomModePrompts, TelemetryEventName } from "@roo-code/types"
66

@@ -198,7 +198,7 @@ export const ModeSelector = ({
198198
disabled={disabled}
199199
data-testid="mode-selector-trigger"
200200
className={cn(
201-
"inline-flex items-center gap-1.5 relative whitespace-nowrap px-1.5 py-1 text-xs",
201+
"inline-flex items-center relative whitespace-nowrap px-1.5 py-1 text-xs",
202202
"bg-transparent border border-[rgba(255,255,255,0.08)] rounded-md text-vscode-foreground",
203203
"transition-all duration-150 focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder focus-visible:ring-inset",
204204
disabled
@@ -209,12 +209,6 @@ export const ModeSelector = ({
209209
? "bg-primary opacity-90 hover:bg-primary-hover text-vscode-button-foreground"
210210
: null,
211211
)}>
212-
<ChevronUp
213-
className={cn(
214-
"pointer-events-none opacity-80 flex-shrink-0 size-3 transition-transform duration-200",
215-
open && "rotate-180",
216-
)}
217-
/>
218212
<span className="truncate">{selectedMode?.name || ""}</span>
219213
</PopoverTrigger>
220214
</StandardTooltip>

webview-ui/src/components/chat/__tests__/ApiConfigSelector.spec.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ describe("ApiConfigSelector", () => {
8686
expect(trigger).toHaveTextContent("Config 1")
8787
})
8888

89-
test("renders with ChevronUp icon", () => {
90-
render(<ApiConfigSelector {...defaultProps} />)
91-
92-
const trigger = screen.getByTestId("dropdown-trigger")
93-
// Check for the icon by looking for the svg element (ChevronUp from lucide-react renders as svg)
94-
const icon = trigger.querySelector("svg")
95-
expect(icon).toBeInTheDocument()
96-
})
97-
9889
test("handles disabled state correctly", () => {
9990
render(<ApiConfigSelector {...defaultProps} disabled={true} />)
10091

0 commit comments

Comments
 (0)