Skip to content

Commit 5e395bb

Browse files
committed
fix: address PR review comments
- Add aria-label to IconButton for accessibility - Extract STANDARD_TOOLTIP_DELAY as a constant - Move TooltipProvider to app level for better performance - Enhance StandardTooltip documentation with examples - Update all test files to use custom test utils with TooltipProvider
1 parent 2d22859 commit 5e395bb

File tree

52 files changed

+105
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+105
-58
lines changed

webview-ui/src/App.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import ModesView from "./components/modes/ModesView"
2020
import { HumanRelayDialog } from "./components/human-relay/HumanRelayDialog"
2121
import { AccountView } from "./components/account/AccountView"
2222
import { useAddNonInteractiveClickListener } from "./components/ui/hooks/useNonInteractiveClick"
23+
import { TooltipProvider } from "./components/ui/tooltip"
24+
import { STANDARD_TOOLTIP_DELAY } from "./components/ui/standard-tooltip"
2325

2426
type Tab = "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "account"
2527

@@ -215,7 +217,9 @@ const AppWithProviders = () => (
215217
<ExtensionStateContextProvider>
216218
<TranslationProvider>
217219
<QueryClientProvider client={queryClient}>
218-
<App />
220+
<TooltipProvider delayDuration={STANDARD_TOOLTIP_DELAY}>
221+
<App />
222+
</TooltipProvider>
219223
</QueryClientProvider>
220224
</TranslationProvider>
221225
</ExtensionStateContextProvider>

webview-ui/src/__tests__/App.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// npx vitest run src/__tests__/App.spec.tsx
22

33
import React from "react"
4-
import { render, screen, act, cleanup } from "@testing-library/react"
4+
import { render, screen, act, cleanup } from "@/utils/test-utils"
55

66
import AppWithProviders from "../App"
77

webview-ui/src/__tests__/ContextWindowProgress.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// npm run test ContextWindowProgress.spec.tsx
22

3-
import { render, screen } from "@testing-library/react"
3+
import { render, screen } from "@/utils/test-utils"
44
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
55

66
import TaskHeader from "@src/components/chat/TaskHeader"

webview-ui/src/components/account/__tests__/AccountView.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, screen } from "@testing-library/react"
1+
import { render, screen } from "@/utils/test-utils"
22
import { describe, it, expect, vi } from "vitest"
33
import { AccountView } from "../AccountView"
44

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, screen } from "@testing-library/react"
1+
import { render, screen } from "@/utils/test-utils"
22

33
import { Package } from "@roo/package"
44

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, screen, fireEvent } from "@testing-library/react"
1+
import { render, screen, fireEvent } from "@/utils/test-utils"
22

33
import { TranslationProvider } from "@/i18n/__mocks__/TranslationContext"
44

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { render, fireEvent, screen } from "@testing-library/react"
1+
import { render, fireEvent, screen } from "@/utils/test-utils"
22

33
import { defaultModeSlug } from "@roo/modes"
44

webview-ui/src/components/chat/__tests__/ChatView.auto-approve.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// npx vitest run src/components/chat/__tests__/ChatView.auto-approve.spec.tsx
22

3-
import { render, waitFor } from "@testing-library/react"
3+
import { render, waitFor } from "@/utils/test-utils"
44
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
55

66
import { ExtensionStateContextProvider } from "@src/context/ExtensionStateContext"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// npx vitest run src/components/chat/__tests__/ChatView.spec.tsx
22

33
import React from "react"
4-
import { render, waitFor, act } from "@testing-library/react"
4+
import { render, waitFor, act } from "@/utils/test-utils"
55
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
66

77
import { ExtensionStateContextProvider } from "@src/context/ExtensionStateContext"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { render, screen, fireEvent, waitFor, act } from "@testing-library/react"
2+
import { render, screen, fireEvent, waitFor, act } from "@/utils/test-utils"
33

44
import { vscode } from "@src/utils/vscode"
55

0 commit comments

Comments
 (0)