📱 fix: hide keyboard shortcuts trigger on mobile
This commit is contained in:
@@ -408,7 +408,7 @@ export const AIToolbar = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
className="h-6 w-6 text-muted-foreground/50 hover:text-muted-foreground"
|
className="hidden h-6 w-6 text-muted-foreground/50 hover:text-muted-foreground md:inline-flex"
|
||||||
aria-label="Keyboard shortcuts"
|
aria-label="Keyboard shortcuts"
|
||||||
>
|
>
|
||||||
<Info className="h-3.5 w-3.5" />
|
<Info className="h-3.5 w-3.5" />
|
||||||
|
|||||||
@@ -153,8 +153,8 @@ const ATTACH_BTN_CLASSES = "gap-1.5 text-xs";
|
|||||||
/** Generate button: right side, primary variant, labeled */
|
/** Generate button: right side, primary variant, labeled */
|
||||||
const GENERATE_BTN_CLASSES = "gap-1.5 text-xs";
|
const GENERATE_BTN_CLASSES = "gap-1.5 text-xs";
|
||||||
|
|
||||||
/** Info popover trigger: ghost icon button, sits left of Generate */
|
/** Info popover trigger: hidden on mobile, small on desktop so it stays secondary */
|
||||||
const INFO_TRIGGER_CLASSES = "h-6 w-6";
|
const INFO_TRIGGER_CLASSES = "hidden h-6 w-6 md:inline-flex";
|
||||||
|
|
||||||
describe("Composer footer bar – layout contract", () => {
|
describe("Composer footer bar – layout contract", () => {
|
||||||
test("footer row uses justify-between so Attach sits left and Generate sits right", () => {
|
test("footer row uses justify-between so Attach sits left and Generate sits right", () => {
|
||||||
@@ -185,6 +185,12 @@ describe("Composer footer bar – layout contract", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("Info popover trigger – size contract", () => {
|
describe("Info popover trigger – size contract", () => {
|
||||||
|
test("info trigger is hidden on mobile so keyboard-only guidance does not appear in touch layouts", () => {
|
||||||
|
const resolved = cn(INFO_TRIGGER_CLASSES);
|
||||||
|
expect(resolved).toContain("hidden");
|
||||||
|
expect(resolved).toContain("md:inline-flex");
|
||||||
|
});
|
||||||
|
|
||||||
test("info trigger is small (h-6 w-6) so it doesn't compete with Generate", () => {
|
test("info trigger is small (h-6 w-6) so it doesn't compete with Generate", () => {
|
||||||
const resolved = cn(INFO_TRIGGER_CLASSES);
|
const resolved = cn(INFO_TRIGGER_CLASSES);
|
||||||
expect(resolved).toContain("h-6");
|
expect(resolved).toContain("h-6");
|
||||||
|
|||||||
Reference in New Issue
Block a user