Skip to content

Commit 336ee94

Browse files
sahil-noonsahil87
andauthored
fix: unify top-bar button sizes on touch devices (iPad) (#286)
The Aa (terminal-font) and bell (notifications) buttons carried a coarse:36px touch-target bump while the splits, close, theme, and fixed-width buttons stayed at 24px, so on coarse-pointer devices (iPad) the cluster rendered at two different sizes. Apply a uniform coarse:30px square to all six right-side top-bar controls (24px on fine pointers, unchanged on desktop) and document the convention in context.md. Co-authored-by: Sahil Ahuja <sahilahuja@gmail.com>
1 parent 299eb45 commit 336ee94

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

app/frontend/src/components/top-bar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ function ThemeToggle() {
396396
type="button"
397397
onClick={handleClick}
398398
aria-label={label}
399-
className="min-w-[24px] min-h-[24px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center"
399+
className="min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center"
400400
title={label}
401401
>
402402
{mode === "system" ? (
@@ -456,7 +456,7 @@ function SplitButton({
456456
onClick={() => execute()}
457457
disabled={isPending}
458458
aria-label={label}
459-
className="min-w-[24px] min-h-[24px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
459+
className="min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
460460
title={label}
461461
>
462462
{isPending ? (
@@ -516,7 +516,7 @@ function ClosePaneButton({
516516
onClick={() => execute()}
517517
disabled={isPending}
518518
aria-label="Close pane"
519-
className="min-w-[24px] min-h-[24px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
519+
className="min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border border-border text-text-secondary hover:border-text-secondary transition-colors flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed"
520520
title="Close pane"
521521
>
522522
{isPending ? (
@@ -609,7 +609,7 @@ function TerminalFontControl() {
609609
aria-expanded={open}
610610
aria-label="Terminal font size"
611611
title="Terminal font size"
612-
className={`min-w-[24px] min-h-[24px] coarse:min-w-[36px] coarse:min-h-[36px] rounded border transition-colors flex items-center justify-center text-xs font-semibold leading-none ${
612+
className={`min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border transition-colors flex items-center justify-center text-xs font-semibold leading-none ${
613613
open
614614
? "border-accent text-accent bg-accent/10"
615615
: "border-border text-text-secondary hover:border-text-secondary"
@@ -753,7 +753,7 @@ function NotificationControl() {
753753
aria-expanded={open}
754754
aria-label={ariaLabel}
755755
title={statusLabel}
756-
className={`min-w-[24px] min-h-[24px] coarse:min-w-[36px] coarse:min-h-[36px] rounded border transition-colors flex items-center justify-center leading-none ${
756+
className={`min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border transition-colors flex items-center justify-center leading-none ${
757757
open
758758
? "border-accent text-accent bg-accent/10"
759759
: subscribed
@@ -831,7 +831,7 @@ function FixedWidthToggle() {
831831
onClick={toggleFixedWidth}
832832
aria-label="Toggle fixed terminal width"
833833
aria-pressed={fixedWidth}
834-
className={`min-w-[24px] min-h-[24px] rounded border transition-colors flex items-center justify-center ${
834+
className={`min-w-[24px] min-h-[24px] coarse:min-w-[30px] coarse:min-h-[30px] rounded border transition-colors flex items-center justify-center ${
835835
fixedWidth
836836
? "border-accent text-accent bg-accent/10"
837837
: "border-border text-text-secondary hover:border-text-secondary"

fab/project/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Never run `npx playwright test` directly — always use `just test-e2e` or `just
8787
## Mobile Responsive Design
8888

8989
- Touch targets use the `coarse:` custom Tailwind variant (`@media (pointer: coarse)`) for touch devices
90-
- Touch targets: `coarse:min-h-[36px] coarse:min-w-[28px]` (taller than wide, not square) for bottom bar buttons; `coarse:36px` square for top bar/breadcrumb buttons
90+
- Touch targets: `coarse:min-h-[36px] coarse:min-w-[28px]` (taller than wide, not square) for bottom bar buttons; `coarse:30px` square for top-bar button controls (24px on fine pointers), applied uniformly across the whole right-side cluster — splits, close, Aa, bell, theme, fixed-width — so they don't diverge in size on touch devices
9191
- Bottom bar toolbar fits all buttons in a single row at 375px — no wrapping, no horizontal scroll
9292
- Top bar is a single line: breadcrumbs + connection status + FixedWidthToggle + command palette trigger. Session/window creation actions live in breadcrumb dropdown `+ New` items
9393
- Mobile sidebar drawer is `absolute` inside the main area (not `fixed inset-0`) so the top bar stays visible and the logo toggle can close the drawer

0 commit comments

Comments
 (0)