Skip to content

guide-viewer: readable on phones and tablets, desktop untouched - #1329

Merged
backnotprop merged 3 commits into
mainfrom
guide-viewer-mobile
Aug 16, 2026
Merged

backnotprop merged 3 commits into
mainfrom
guide-viewer-mobile

Conversation

@backnotprop

@backnotprop backnotprop commented Aug 16, 2026 •

Copy link
Copy Markdown
Owner

fix(guide-viewer): readable on phones and tablets, desktop untouched

Every change is behind a breakpoint; 1440px and 1024px renders of the same
guide are byte-identical before and after (screenshot MD5s match).

  • Split diffs below lg (1024px) are forced unified in the portable viewer's
    diff renderer (matchMedia; the setting is untouched, so a wider window
    gets split back). A phone has ~350px of pane and a portrait tablet ~430px,
    so two columns were under 220px each.
  • Padding scales: page px-3/sm:px-6/lg:px-10, chapter column px-4/md:px-6,
    diff column px-1.5/md:px-4. Code pane on a 390px phone: 276px → 352px.
  • Tablets: the chapter column is proportional (minmax(260px,36%)) from md
    and the fixed 440px only from lg. Pane at 768px: 214px → 426px.
  • Header actions (Download, theme) sit in a right-aligned row above the
    title below md instead of floating into it.

Viewer rebuilt and published (viewer.dWt7KCum.js), manifest synced.


fix(guide-viewer): touch targets, labels, and no tap delay on coarse pointers

Only under pointer: coarse (Tailwind's pointer-coarse: variant), so mouse
layouts are unchanged:

  • Reviewed checkbox and the collapse chevron get an invisible ::before hit
    area (visual 15–17px, hit ≥ 44px); the "Reviewed" text button and file
    chips get taller padding; the theme toggle and hosted Download button grow
    to a 44px hit box.
  • touch-action: manipulation on controls in the portable viewer and the
    landing page (no double-tap-to-zoom delay; the page still pinch-zooms).
  • aria-label on the two icon-only buttons (theme toggle, collapse chevron).
  • Landing page: the GitHub link and the Copy button are 44px tall on touch.

Tailwind v4 already gates hover: behind @media (hover: hover), so no
false hover states on tap. Viewer rebuilt and published, manifest synced.

Every change is behind a breakpoint; 1440px and 1024px renders of the same
guide are byte-identical before and after (screenshot MD5s match).

- Split diffs below lg (1024px) are forced unified in the portable viewer's
  diff renderer (matchMedia; the setting is untouched, so a wider window
  gets split back). A phone has ~350px of pane and a portrait tablet ~430px,
  so two columns were under 220px each.
- Padding scales: page px-3/sm:px-6/lg:px-10, chapter column px-4/md:px-6,
  diff column px-1.5/md:px-4. Code pane on a 390px phone: 276px → 352px.
- Tablets: the chapter column is proportional (minmax(260px,36%)) from md
  and the fixed 440px only from lg. Pane at 768px: 214px → 426px.
- Header actions (Download, theme) sit in a right-aligned row above the
  title below md instead of floating into it.

Viewer rebuilt and published (viewer.dWt7KCum.js), manifest synced.
…pointers

Only under `pointer: coarse` (Tailwind's `pointer-coarse:` variant), so mouse
layouts are unchanged:
- Reviewed checkbox and the collapse chevron get an invisible ::before hit
  area (visual 15–17px, hit ≥ 44px); the "Reviewed" text button and file
  chips get taller padding; the theme toggle and hosted Download button grow
  to a 44px hit box.
- `touch-action: manipulation` on controls in the portable viewer and the
  landing page (no double-tap-to-zoom delay; the page still pinch-zooms).
- `aria-label` on the two icon-only buttons (theme toggle, collapse chevron).
- Landing page: the GitHub link and the Copy button are 44px tall on touch.

Tailwind v4 already gates `hover:` behind `@media (hover: hover)`, so no
false hover states on tap. Viewer rebuilt and published, manifest synced.
@backnotprop
backnotprop merged commit 94f8d45 into main Aug 16, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant