Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): show a tooltip on the thread search clear button #48238

OpenApexYash11(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48238/headopened View on GitHub

Showing 2 changed files with 74 additions and 11 deletions.

x
0 of 2 viewed, 2 left
57 additions and 0 deletionsapps/web/src/components/sidebar/SidebarThreadHeader.browser.test.tsxAdded
View file
@@ -0,0 +1,57 @@
+import { useRef, useState } from "react";
+import { expect, it } from "vite-plus/test";
+import { page, userEvent } from "vite-plus/test/browser";
+​
+import "~/index.css";
+​
+import { render } from "../../../test/render";
+import { SharedTooltipProvider } from "../ui/shared-tooltip";
+import { SidebarProvider } from "../ui/sidebar";
+import { SidebarThreadHeader } from "./SidebarThreadHeader";
+​
+function SearchHeader() {
+ const [searchQuery, setSearchQuery] = useState("example");
+ const searchInputRef = useRef<HTMLInputElement>(null);
+ return (
+ <SharedTooltipProvider>
+ <SidebarProvider>
+ <SidebarThreadHeader
+ hasProjects={false}
+ projectScope={null}
+ onNewThread={() => {}}
+ newThreadDisabled={false}
+ newThreadShortcutLabel={null}
+ newThreadInProjectShortcutLabel={null}
+ showNewThreadInProjectHint={false}
+ searchInputRef={searchInputRef}
+ searchQuery={searchQuery}
+ onSearchQueryChange={setSearchQuery}
+ onSearchKeyDown={() => {}}
+ isSearching={searchQuery !== ""}