Skip to content

feat(web): mobile header, refreshed landing grid, and example fixes#100

Merged
desko27 merged 4 commits into
mainfrom
feat/web-header-mobile-nav
May 31, 2026
Merged

feat(web): mobile header, refreshed landing grid, and example fixes#100
desko27 merged 4 commits into
mainfrom
feat/web-header-mobile-nav

Conversation

@desko27
Copy link
Copy Markdown
Owner

@desko27 desko27 commented May 31, 2026

Several related web-site changes, all touching the public landing and its examples.


1. Keep the wordmark on mobile (hamburger menu)

The react-call v2 wordmark was hidden below sm, leaving only the logomark on phones. This keeps the wordmark visible at every resolution and collapses the secondary header links into a single hamburger menu below md.

Layout
< 768px (md) ● react-call v2 ··· ★ 🌙 ☰ — menu holds Why / Examples / Concepts / Full reference ↗
≥ 768px All inline (the current desktop, unchanged)

Decisions (from a grilling session):

  • Consolidated menu, one breakpoint. A single md switch replaces the old fragmented 400 / 640 / 768 breakpoints — nothing gets orphaned mid-resize.
  • Star CTA stays in the bar as an icon-only button. GitHub stars are the library's success metric, so the primary CTA shouldn't hide behind a tap.
  • React island (MobileNav.tsx), consistent with the existing ThemeToggle idiom. React already hydrates on every page, so the marginal cost is ~nil.
  • ARIA disclosure pattern (not a role=menu widget, which APG discourages for site nav): aria-expanded / aria-controls, Escape + click-outside to close, focus stays on the trigger, no focus-trap / scroll-lock / scrim.
  • SEO-safe by construction. The menu's links are always rendered and only toggled via CSS — never {open && …} — so they stay in the static HTML and remain crawlable. (The footer also links them statically as a safety net.)

2. Refresh the landing example grid

Re-curated the six featured Callables in NotJustConfirmations so the grid stops duplicating concepts the rest of the landing already covers, and instead showcases the widest spread of distinct surfaces.

The hero already demonstrates a confirm, and the Stack and Mutation-flow sections own those concepts — so confirm-dialog (a hero clone) and image-lightbox make way for bottom-sheet (drawer) and wizard (flow), two categories the page did not surface anywhere else.

# Card Category
1 Command palette Menu kept
2 Bottom sheet Drawer new
3 Multi-step wizard Flow new
4 Color picker Picker kept
5 Context menu Menu kept
6 Progress toast Notification kept

Out: confirm-dialog, image-lightbox. Each card still fires a real .call() on the page; the two new ones were wired with their Callables, Roots and result badges.

3. Example bug fixes

Surfaced while testing the refreshed grid on a phone:

  • Toasts stack instead of overlapping. The Toast Callable rendered every active call at the same fixed corner. It now offsets each by call.index (same pattern as error-banner), so concurrent toasts stack upward. The landing card stays a upsert singleton by design — and its "Try it" button is now disabled while the call is in flight, mirroring the example page's DownloadButton.
  • No more iOS focus-zoom on inputs. iOS Safari auto-zooms when a focused input is < 16px. The autofocused inputs in command palette and wizard, plus the remaining example text inputs (save-form, prompt-input) and the side-drawer select, now use text-base (16px) on mobile with md:text-sm to keep the compact size on desktop.
  • Wizard dialog gutter. The wizard overlay sat flush against the screen edges on mobile — added p-4 so the panel keeps a 16px lateral margin.
  • Wizard result badge now includes the email (name · email · plan); it previously showed only name · plan.

Verification

  • Header — Mobile (375px): wordmark visible, bar ends ★ 🌙 ☰ (hamburger last), controls height-aligned. Dropdown opens anchored top-right with the 4 links, icon morphs to . Desktop (1280px): full inline nav, hamburger hidden — unchanged.
  • Grid — snapshot confirms the 6 cards in order with the two old ones gone. Drove both new Callables live: bottom-sheet resolves with the tapped action (share); the wizard runs its 3 steps and resolves with the structured form (Ada · ada@example.com · team). No console errors.
  • Fixes — verified on the running dev server: input font-size is 16px at mobile / 14px at desktop; the wizard panel sits 16px from each edge at 375px; the toast card button disables during the run and re-enables after; the wizard badge shows all three values.
  • biome check clean; pre-commit lint + type-check green on every commit. (The 2 pre-existing astro check errors in astro.config.ts and examples/[slug].astro are unrelated.)

The "react-call v2" wordmark was hidden below sm, leaving only the
logomark on phones. Keep it visible at every width and collapse the
secondary header links into a single hamburger menu below md.

- The wordmark is now always shown; the logomark already was.
- One breakpoint (md): below it Why, Examples, Concepts and Full
  reference move into an anchored dropdown; above it the desktop
  layout is unchanged.
- The Star CTA stays in the bar as an icon-only button — it's the
  primary OSS conversion target, so it shouldn't hide behind a tap.
- MobileNav is a React island following the ThemeToggle idiom. It uses
  the ARIA disclosure pattern (aria-expanded, Escape + click-outside to
  close, focus stays on the trigger) and always renders its links,
  toggling visibility via CSS so they remain in the static HTML and
  stay crawlable.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-call Ready Ready Preview, Comment May 31, 2026 12:15pm

Re-curate the six featured Callables so the grid stops duplicating
concepts the rest of the landing already covers and instead showcases
the widest spread of distinct surfaces.

The hero already demonstrates a confirm, and the Stack and Mutation-flow
sections own those concepts — so confirm-dialog (a hero clone) and
image-lightbox make way for bottom-sheet (drawer) and wizard (flow), two
categories the page did not surface anywhere else.

Final order: command-palette, bottom-sheet, wizard, color-picker,
context-menu, progress-toast.
@desko27 desko27 changed the title feat(web): keep the wordmark on mobile with a hamburger menu feat(web): keep the wordmark on mobile + refresh the landing example grid May 31, 2026
- Toast: offset each active call by call.index so concurrent toasts stack
  upward instead of overlapping at the same fixed corner (same pattern as
  error-banner). The upsert-driven singleton case is unaffected — index 0
  keeps the original bottom offset.
- Command palette + wizard: the inputs autofocus on open, and at < 16px
  iOS Safari auto-zooms on focus. Bump them to text-base (16px) on mobile
  with md:text-sm to keep the compact size on desktop.
…weep

- Landing toast card: disable the "Try it" button while the call is in
  flight (matches the example page's DownloadButton) so the upsert
  singleton can't be re-triggered mid-run.
- Wizard: give the dialog a lateral gutter (p-4 on the overlay) so it no
  longer sits flush against the screen edges on mobile.
- Landing wizard result badge: include the email — it was showing only
  name · plan.
- iOS zoom sweep: apply the 16px-on-mobile fix (text-base md:text-sm) to
  the remaining example text inputs (save-form, prompt-input) and the
  side-drawer select.
@desko27 desko27 changed the title feat(web): keep the wordmark on mobile + refresh the landing example grid feat(web): mobile header, refreshed landing grid, and example fixes May 31, 2026
@desko27 desko27 merged commit 6f96f91 into main May 31, 2026
8 checks passed
@desko27 desko27 deleted the feat/web-header-mobile-nav branch May 31, 2026 13:24
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