Skip to content

fix: make community navigation accessible on mobile - #1445

Open
fhammerschmidt wants to merge 6 commits into
masterfrom
fix/1421-community-sidebar
Open

fhammerschmidt wants to merge 6 commits into
masterfrom
fix/1421-community-sidebar

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Community pages hide their sidebar on phones without providing a way to open it. Add a visible Community navigation button and a native modal drawer that reuses the existing categories and table of contents.

The drawer supports Escape dismissal and focus restoration, closes after page or section navigation (including the current page link), and dismisses when switching to desktop width. Page links now invoke the sidebar's navigation callback. SidebarNav now serves desktop navigation only: remove its obsolete isOpen and toggle props, mobile overlay styles, and close button. Both layouts use it without placeholder state or handlers. Documentation routes already provide their own mobile drawer through NavbarTertiary.

CommunityLayout passes the current route to the mobile menu and keys it by pathname, so navigation resets its local state. The dialog mounts only while open. A stable React 19 callback ref opens the native dialog and manages its close and breakpoint listeners, with cleanup on unmount. This requires no effects.

Validation:

  • Strict ReScript compilation, formatting, site checks, Wrangler checks, and homepage E2E pass.
  • All 139 docs interaction tests pass, including seven community tests under StrictMode and a docs resizing regression test; script and guide test suites also pass. The community tests cover focus restoration, rerenders without losing focus, and navigation outside the drawer.
  • All 89 visual checks pass. The CI screenshot workflow regenerated only the approved mobile community baseline.
  • Docs and guide preview deployments succeed.

Community phone preview

Website master only; no compiler changes.

Fixes #1411

Add a mobile community navigation dialog with keyboard dismissal, focus restoration, and dismissal after navigation or resizing. Keep the desktop sidebar and cover mobile interactions with browser tests.

Fixes #1411
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T20:28:59.584787Z 1f098ed PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
guide 29cf766 Commit Preview URL

Branch Preview URL
Oct 11 2026, 10:11 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f098ed965

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/docs/src/layouts/CommunityLayout.res Outdated
The shared navigation callback now runs for page links. Keep the in-page docs sidebar static because the mobile drawer is provided by NavbarTertiary, and cover desktop navigation followed by resizing in a browser test.
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch master at commit a62233b. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 84 82 -2
Accessibility 80 80 0
Best practices 100 100 0
SEO 92 58 -34

Download the full Lighthouse reports and baseline

Commit 3d344a6 · Cloudflare preview

github-actions Bot and others added 2 commits October 11, 2026 20:42
Updated from the GitHub Actions visual baseline workflow.
The screenshot workflow updated the approved mobile community baseline. Trigger fresh PR checks from the verified branch head because the bot-triggered runs require approval.

Fixes #1411
Pass the route from CommunityLayout and key the mobile menu by it so navigation resets local state. Mount the dialog only while open and use a stable React 19 callback ref for native setup and cleanup, removing all four effects. Cover StrictMode, focus restoration, rerenders, and navigation outside the drawer.
Make SidebarNav explicitly desktop-only by removing isOpen, toggle, and its unused mobile close button. Update both layouts and make category click callbacks optional so static navigation needs no placeholder handlers.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

This branch was successfully deployed

2 active deployments
preview — 29cf7660 Deployed Oct 11, 2026 by github-actions[bot]
guide-preview — 29cf7660 Deployed Oct 11, 2026 by github-actions[bot]
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.

Mobile sidebar can never open on community pages

1 participant