Repository navigation
fix(nav): soft-nav cross-route mobile drawer links - #273
Merged
Merged
Conversation
Closes #272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying website with
|
| Latest commit: |
55933ea
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0bb4c306.website-70y.pages.dev |
| Branch Preview URL: | https://claude-mobile-drawer-soft-na.website-70y.pages.dev |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before this change, tapping a mobile drawer section from another page (
/blog/*,/legal/*) reloaded the whole page withwindow.location.assign(...). That reload was a workaround for the Next 16 hash-appending bug (#116). Next 16.3.8 fixes that bug, and #270 already removed the same workaround from the desktop nav. The drawer now navigates the same way the desktop nav does.MobileMenu.tsx: the drawer's close cleanup callsrouter.push(isHome ? "/" : \/#${anchor}`)fromnext/navigation. It still runs after the body-style restore, so the body is no longer pinned (position: fixed`) when the navigation starts.routeris added to the effect's dependency list (the router instance is stable).Closes #272
Verification
pnpm lint,pnpm typecheck,pnpm test(521/521) andpnpm buildall pass.Tested in headless Chrome at 375×812 against the static export: open the drawer, tap a link, then check the result.
/blog/→ method/#method/blog/why-now/→ faq/#faq/legal/privacy/→ contact/#contact/blog/,/legal/privacy/→ home/(no hash)/→ method / homeReviewer notes
requestAnimationFrame, so neither this nor the fix(deps): clear dependabot alerts and unblock monthly dependabot prs #270 desktop nav scrolls there. Use a visible or headless browser.🤖 Generated with Claude Code