Skip to content

Improve docs-site UI/UX + mobile/tablet responsiveness (bao.builders) - #37

Merged
cursor[bot] merged 4 commits into
mainfrom
cursor/docs-site-ui-ux-42cc
Jul 28, 2026
Merged

Improve docs-site UI/UX + mobile/tablet responsiveness (bao.builders)#37
cursor[bot] merged 4 commits into
mainfrom
cursor/docs-site-ui-ux-42cc

Conversation

@d4551

@d4551 d4551 commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Targeted UI/UX and mobile/tablet responsiveness improvements to the bao.builders download page (docs/index.html), plus a reusable Playwright proof script. No framework or SSOT change — still daisyUI corporate/business + Tailwind v4 via the shared packages/client/assets/css/main.css.

Problems fixed

  1. Theme-toggle icon sat off-center in the navbar circle. daisyUI .swap is inline-grid (centers children via place-content:center + grid-column-start:1) but .btn is inline-flex; on the same element .btn won, so the swap's grid centering broke. The swap-on/off SVGs also carried a Tailwind absolute class, pulling them out of grid flow — grid tracks collapsed to 0px and the 20px icon overflowed from the cell center (+10px,+10px offset). Fix: drop absolute from both SVGs (so they size the grid track again) and add header .swap.swap-rotate { display:inline-grid } (higher specificity than .btn) to restore grid centering. Verified: icon center == button center (offset 0,0) at mobile + desktop; toggle still flips corporate↔business with correct sun/moon opacity.
  2. OS tab selector horizontally scrolled on phones. repeat(3, minmax(10rem,1fr)) forced a 30rem row that overflowed; the @media (max-width:767px) override set width: max-content, so Windows/macOS/Linux tabs were hidden behind a swipe. → minmax(0,1fr) + min-w-0 so all three always fit one row; removed the max-content override. Tab labels wrapped in .tab-label (ellipsis safeguard).
  3. Tablets got a hamburger despite having room. Inline nav was hidden lg:flex; hamburger lg:hidden. → Nav now hidden md:flex, hamburger md:hidden — tablets get real nav links.
  4. Dead space under tabs on phones. Tabpanel pt-10pt-6 sm:pt-10.
  5. Hero h1 jumped 4xl → 6xl. Added sm:text-5xl step for a smoother ramp.
  6. Touch targets under 44px. Nav links h-10h-11 (WCAG 2.5.5).
  7. SHA row overflowed narrow cards. .release-sha now flex-wrap; hash code max-width:100% (was fixed 12rem).
  8. Section headings hid under navbar on sm+. scroll-padding-top 5rem → 5.5rem.
  9. No dark theme-color for browser chrome. Added prefers-color-scheme: dark theme-color meta; viewport-fit=cover for notched devices.

Visual proof (Playwright, 3 viewports)

bun run scripts/docs-ui-proof.ts (local bundle) and TARGET=https://bao.builders/ bun run scripts/docs-ui-proof.ts (live) — both PASS at mobile (390px), tablet (768px), desktop (1280px): no horizontal overflow, all OS tabs visible. Theme-toggle centering measured at offset 0,0 on both local and live.

Lint

scripts/docs-ui-proof.ts is lint-clean under the repo's strict gates: validate:no-try-catch (uses .then(() => undefined, () => undefined) per scripts/utils/playwright-settle.ts, not .catch), real Playwright types (import { chromium, type BrowserContext, type Page }), and Promise<void>-typed server stop (no void operator, no floating promises). bun run lint passes (biome + eslint + typecheck).

Deployed

Rebuilt docs-site:bundle (16 files, 764 MiB — release binaries unchanged) and published to pixie-ss1-ftp.porkbun.com/ (bao.builders). Live site verified: index.html HTTP 200, manifest still 9 files / 3 platforms, theme-toggle icon centered (offset 0,0), toggle flips theme correctly.

Notes

  • Only docs/index.html (tracked) + scripts/docs-ui-proof.ts (new, lint-clean) are committed. docs/assets/docs.generated.css and docs/releases/manifest.json stay gitignored (regenerated by bun run build:docs-site).
  • FTP credentials used from the environment only; not committed. Rotate the password at the host before storing it as a repository secret.
Open in Web Open in Cursor 

cursoragent and others added 4 commits July 28, 2026 04:58
Targeted fixes to the bao.builders download page, verified with a new
Playwright proof script (scripts/docs-ui-proof.ts) at mobile (390px),
tablet (768px), and desktop (1280px) — all pass: no horizontal overflow,
all OS tabs visible.

Responsive:
- OS tab selector: repeat(3, minmax(10rem,1fr)) forced a 30rem row that
  overflowed into horizontal scroll on phones (tabs hidden behind a swipe).
  Switch to minmax(0,1fr) + min-w-0 so Windows/macOS/Linux always fit one
  row; drop the max-content mobile override that caused the scroll.
  Wrap tab labels in .tab-label (ellipsis safeguard).
- Tablet nav: show the inline nav at md (was lg) so tablets get real nav
  links instead of a hamburger; hamburger shrinks to md:hidden.
- Tabpanel top padding pt-10 -> pt-6 sm:pt-10 (less dead space on phones).
- Hero h1: add sm:text-5xl step for a smoother size ramp.
- viewport-fit=cover for notched devices.

A11y / best practice:
- Nav link touch targets h-10 -> h-11 (44px, WCAG 2.5.5).
- Release-card sha row now wraps (flex-wrap) and the hash code is
  max-width:100% instead of a fixed 12rem, so it never overflows narrow cards.
- scroll-padding-top 5rem -> 5.5rem to clear the taller (sm) navbar.
- Dark theme-color meta for prefers-color-scheme: dark browser chrome.

Adds scripts/docs-ui-proof.ts (portable; serves dist/docs-site or proofs a
TARGET= live URL) and exits non-zero on overflow / hidden-tab regression.

Co-authored-by: Brandon Donnelly <d4551@users.noreply.github.com>
Rewrite to follow the repo's proof-script conventions so `biome lint .` passes:
- mapSequential (recursive) instead of await-in-for-of (noAwaitInLoops).
- page.evaluate (allowed) instead of page.$$eval (noPlaywrightEval).
- domcontentloaded + locator.waitFor instead of networkidle/waitForTimeout.
- writeOutput/writeError + artifactDir/resolveProofOutDir utils instead of
  console + hardcoded paths (noConsole, no-hardcoded-paths).
- named NUM_ constants (noMagicNumbers).
- awaited error writes (noFloatingPromises); no empty catch blocks.

Co-authored-by: Brandon Donnelly <d4551@users.noreply.github.com>
The sun/moon icon sat off-center in the circular theme toggle. Root cause:
daisyUI `.swap` is `display:inline-grid` (centers children via
place-content:center + grid-column-start:1), but `.btn` is
`display:inline-flex`; on the same element `.btn` won, so the swap's
grid centering broke. Compounding that, the swap-on/off SVGs carried a
Tailwind `absolute` class, which pulled them out of grid flow — the
grid tracks collapsed to 0px and the 20px icon overflowed from the
cell's center point (a +10px,+10px offset).

Fix:
- Drop `absolute` from both swap SVGs so they size the grid track again.
- Add `header .swap.swap-rotate { display:inline-grid }` (higher
  specificity than `.btn`) so the swap uses grid + place-content:center
  and re-centers the icon.

Verified with Playwright on the local bundle and the live site: icon
center == button center (offset 0,0) at mobile (390px) and desktop
(1280px); toggle still flips corporate<->business with the correct
sun/moon opacity.

Co-authored-by: Brandon Donnelly <d4551@users.noreply.github.com>
- Replace 3 .catch(() => undefined) with .then(() => undefined, () => undefined)
  (repo-sanctioned best-effort wait pattern, per scripts/utils/playwright-settle.ts);
  validate:no-try-catch forbids Promise .catch handlers.
- Drop hand-rolled structural Page type; import { chromium, type BrowserContext,
  type Page } from 'playwright' (inline type-imports, repo convention) to clear
  no-unsafe-call / no-unsafe-member-access / consistent-type-imports.
- Type startLocalServer.stop as () => Promise<void> (server.stop() returns a
  Promise) and await host.stop() in main to clear no-misused-promises and
  noFloatingPromises without the banned void operator (lint/complexity/noVoid).

Co-authored-by: Brandon Donnelly <d4551@users.noreply.github.com>
@cursor
cursor Bot merged commit f70bb46 into main Jul 28, 2026
6 checks passed
@cursor
cursor Bot deleted the cursor/docs-site-ui-ux-42cc branch July 28, 2026 05:35
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.

2 participants