Repository navigation
fix: show fallback mobile docs title - #2626
Merged
vtushar06 merged 1 commit intoNov 11, 2026
Merged
Conversation
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2626 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 31 31
Lines 737 737
Branches 229 229
=========================================
Hits 737 737 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@vtushar06 can you review this and merge it |
shivaminfo1
previously approved these changes
Nov 11, 2026
shivaminfo1
left a comment
There was a problem hiding this comment.
Thanks @Sravan1011, clean fix for the blank mobile docs title, with a test to back it. LGTM!
Contributor
Author
|
@shivaminfo1 can you merge this |
vtushar06
dismissed
shivaminfo1’s stale review
November 11, 2026 17:49
Posted from the wrong account by mistake.
vtushar06
approved these changes
Nov 11, 2026
vtushar06
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @Sravan1011, clean fix for the blank mobile docs title, with a test to back it. LGTM!
This branch was successfully deployed
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.
What kind of change does this PR introduce?
Bug fix. This change fixes the mobile documentation-sidebar title for routes that are not represented in the current hardcoded section-path arrays.
Issue Number:
Screenshots/videos:
Not applicable. This is a small text-only mobile-navigation fallback change.
If relevant, did you update the documentation?
No documentation update is required. The change fixes the website navigation UI and adds regression coverage.
Summary
On mobile viewports, SidebarLayout determines the blue navigation bar title using separate route-array checks. For routes such as /work-in-progress, no array matched and the intended fallback was unreachable because it checked router.pathname === null. Next.js provides a pathname, so the mobile title was blank.
This PR adds a getMobileSectionTitle helper that preserves the existing titles for recognized routes and returns Docs for any unlisted route. It replaces the repeated conditional headings with one heading and adds a Cypress component regression test for /work-in-progress.
Does this PR introduce a breaking change?
No. Existing mobile section titles are unchanged; unlisted documentation routes now show Docs instead of a blank title.
Checklist