fix(webui): reuse touch targets for composer mentions
This commit is contained in:
1 parent
5c5027ac0b
commit
2e334b2250
3 files changed
+6
-2
No files matched your search
+2
-1
@@ -192,7 +192,8 @@ On touch devices with Visual Viewport support, the app follows the visible area
|
|||||||
when the on-screen keyboard opens or pans the page. Navigation and the composer
|
when the on-screen keyboard opens or pans the page. Navigation and the composer
|
||||||
stay in view while messages scroll independently. The `@` mention and `/` command
|
stay in view while messages scroll independently. The `@` mention and `/` command
|
||||||
menus use the visible app area above or below the composer, including when the
|
menus use the visible app area above or below the composer, including when the
|
||||||
keyboard pans the page. Scroll within a menu to reach more results.
|
keyboard pans the page. Scroll within a menu to reach more results. Mention rows
|
||||||
|
use the app's larger touch targets on phones while retaining desktop density.
|
||||||
In very short viewports (such
|
In very short viewports (such
|
||||||
as landscape with the keyboard open), scroll within the composer to reach its
|
as landscape with the keyboard open), scroll within the composer to reach its
|
||||||
controls. If the browser bars and keyboard leave no usable page area, dismiss
|
controls. If the browser bars and keyboard leave no usable page area, dismiss
|
||||||
|
|||||||
@@ -3111,7 +3111,7 @@ function CliAppMentionPalette({
|
|||||||
}}
|
}}
|
||||||
className={cn(
|
className={cn(
|
||||||
floatingItemClassName,
|
floatingItemClassName,
|
||||||
"flex min-h-10 w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors",
|
"touch-target flex min-h-10 w-full items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors",
|
||||||
selected
|
selected
|
||||||
? "bg-foreground/[0.055] text-foreground"
|
? "bg-foreground/[0.055] text-foreground"
|
||||||
: "text-foreground/90 hover:bg-foreground/[0.04]",
|
: "text-foreground/90 hover:bg-foreground/[0.04]",
|
||||||
|
|||||||
@@ -2436,6 +2436,9 @@ describe("ThreadComposer", () => {
|
|||||||
expect(screen.queryByText("MCP servers")).not.toBeInTheDocument();
|
expect(screen.queryByText("MCP servers")).not.toBeInTheDocument();
|
||||||
const gimp = screen.getByRole("option", { name: /GIMP @gimp .* CLI/i });
|
const gimp = screen.getByRole("option", { name: /GIMP @gimp .* CLI/i });
|
||||||
const browserbase = screen.getByRole("option", { name: /Browserbase @browserbase .* MCP/i });
|
const browserbase = screen.getByRole("option", { name: /Browserbase @browserbase .* MCP/i });
|
||||||
|
// Reuse the app's 44px coarse-pointer targets without changing desktop density.
|
||||||
|
expect(gimp).toHaveClass("touch-target");
|
||||||
|
expect(browserbase).toHaveClass("touch-target");
|
||||||
expect(within(gimp).getByText("CLI")).toBeInTheDocument();
|
expect(within(gimp).getByText("CLI")).toBeInTheDocument();
|
||||||
expect(within(browserbase).getByText("MCP")).toBeInTheDocument();
|
expect(within(browserbase).getByText("MCP")).toBeInTheDocument();
|
||||||
expect(within(gimp).getByText("@gimp")).toBeInTheDocument();
|
expect(within(gimp).getByText("@gimp")).toBeInTheDocument();
|
||||||
|
|||||||
Reference in new issue
Block a user