Skip to content

Commit 9e05800

Browse files
committed
fix: Apply approved PR feedback
- Fix chevron direction in BrowserSessionRow.tsx (now shows down when expanded, right when collapsed) - Add aria-labels to all Lucide icons for better accessibility in ChatRow.tsx - Add aria-label to Pointer icon in BrowserSessionRow.tsx - Remove redundant displayName from ErrorRow.tsx component These changes address all feedback marked with 👍 in PR #7985
1 parent 100b337 commit 9e05800

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
238238
const [browserSessionRow, { height: rowHeight }] = useSize(
239239
<div style={{ padding: "10px 6px 10px 15px", marginBottom: -10 }}>
240240
<div style={{ display: "flex", alignItems: "center", gap: "10px", marginBottom: "10px" }}>
241-
{isBrowsing ? <ProgressIndicator /> : <Pointer className="w-4" />}
241+
{isBrowsing ? <ProgressIndicator /> : <Pointer className="w-4" aria-label="Browser action indicator" />}
242242
<span style={{ fontWeight: "bold" }}>
243243
<>{t("chat:browser.rooWantsToUse")}</>
244244
</span>
@@ -347,7 +347,7 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
347347
}}>
348348
<SquareTerminal className="w-3" />
349349
<span className="grow text-xs">{t("chat:browser.consoleLogs")}</span>
350-
<span className={`codicon codicon-chevron-${consoleLogsExpanded ? "right" : "down"}`}></span>
350+
<span className={`codicon codicon-chevron-${consoleLogsExpanded ? "down" : "right"}`}></span>
351351
</div>
352352
{consoleLogsExpanded && (
353353
<CodeBlock source={displayState.consoleLogs || t("chat:browser.noNewLogs")} language="shell" />

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export const ChatRowContent = ({
317317
]
318318
case "followup":
319319
return [
320-
<MessageCircleQuestionMark className="w-4" />,
320+
<MessageCircleQuestionMark className="w-4" aria-label="Question icon" />,
321321
<span style={{ color: normalColor, fontWeight: "bold" }}>{t("chat:questions.hasQuestion")}</span>,
322322
]
323323
default:
@@ -370,7 +370,7 @@ export const ChatRowContent = ({
370370
return (
371371
<>
372372
<div style={headerStyle}>
373-
<FileDiff className="w-4" />
373+
<FileDiff className="w-4" aria-label="Batch diff icon" />
374374
<span style={{ fontWeight: "bold" }}>
375375
{t("chat:fileOperations.wantsToApplyBatchChanges")}
376376
</span>
@@ -559,7 +559,7 @@ export const ChatRowContent = ({
559559
return (
560560
<>
561561
<div style={headerStyle}>
562-
<Eye className="w-4" />
562+
<Eye className="w-4" aria-label="View files icon" />
563563
<span style={{ fontWeight: "bold" }}>
564564
{t("chat:fileOperations.wantsToReadMultiple")}
565565
</span>
@@ -579,7 +579,7 @@ export const ChatRowContent = ({
579579
return (
580580
<>
581581
<div style={headerStyle}>
582-
<FileCode2 className="w-4" />
582+
<FileCode2 className="w-4" aria-label="Read file icon" />
583583
<span style={{ fontWeight: "bold" }}>
584584
{message.type === "ask"
585585
? tool.isOutsideWorkspace
@@ -634,7 +634,7 @@ export const ChatRowContent = ({
634634
return (
635635
<>
636636
<div style={headerStyle}>
637-
<ListTree className="w-4" />
637+
<ListTree className="w-4" aria-label="List files icon" />
638638
<span style={{ fontWeight: "bold" }}>
639639
{message.type === "ask"
640640
? tool.isOutsideWorkspace
@@ -660,7 +660,7 @@ export const ChatRowContent = ({
660660
return (
661661
<>
662662
<div style={headerStyle}>
663-
<FolderTree className="w-4" />
663+
<FolderTree className="w-4" aria-label="Folder tree icon" />
664664
<span style={{ fontWeight: "bold" }}>
665665
{message.type === "ask"
666666
? tool.isOutsideWorkspace
@@ -752,7 +752,7 @@ export const ChatRowContent = ({
752752
return (
753753
<>
754754
<div style={headerStyle}>
755-
<PocketKnife className="w-4" />
755+
<PocketKnife className="w-4" aria-label="Switch mode icon" />
756756
<span style={{ fontWeight: "bold" }}>
757757
{message.type === "ask" ? (
758758
<>
@@ -1131,7 +1131,7 @@ export const ChatRowContent = ({
11311131
return (
11321132
<div className="group">
11331133
<div style={headerStyle}>
1134-
<User className="w-4" />
1134+
<User className="w-4" aria-label="User icon" />
11351135
<span style={{ fontWeight: "bold" }}>{t("chat:feedback.youSaid")}</span>
11361136
</div>
11371137
<div
@@ -1182,7 +1182,7 @@ export const ChatRowContent = ({
11821182
e.stopPropagation()
11831183
handleEditClick()
11841184
}}>
1185-
<Edit className="w-4" />
1185+
<Edit className="w-4" aria-label="Edit message icon" />
11861186
</div>
11871187
<div
11881188
className="cursor-pointer shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"
@@ -1191,7 +1191,7 @@ export const ChatRowContent = ({
11911191
e.stopPropagation()
11921192
vscode.postMessage({ type: "deleteMessage", value: message.ts })
11931193
}}>
1194-
<Trash2 className="w-4" />
1194+
<Trash2 className="w-4" aria-label="Delete message icon" />
11951195
</div>
11961196
</div>
11971197
</div>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,4 @@ export const ErrorRow = memo(
136136
},
137137
)
138138

139-
ErrorRow.displayName = "ErrorRow"
140-
141139
export default ErrorRow

0 commit comments

Comments
 (0)