Repository navigation
feat(sidebar): Add Overview link to sections with a hidden landing page - #19998
Conversation
The Features section header was the only way to reach a platform's features overview page, and it didn't look clickable. Render the header as plain text and add an "Overview" item as the section's first entry, like Quick Start, so it's discoverable and gets the active state. Only hidden landing pages get an Overview link, since visible ones already have a sidebar entry. Hide the Apple iOS/tvOS/visionOS and Kotlin Multiplatform features pages so they match the other platforms. Co-Authored-By: Sergiy Deceive-skiy <3760543+sergical@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Please update the IS YOUR CHANGE URGENT? section of the PR description:
This information helps the Docs team prioritize your review. |
|
The plan checks platform page loads, client JavaScript errors, and sidebar exceptions. An issue escalates when the client error rate rises or sidebar exceptions appear. Services: PlanWhat changedPlatform docs sidebars now show a plain Features header. A hidden Features landing page gets an Overview link as the first item. iOS, tvOS, visionOS, and Kotlin Multiplatform Features pages are now hidden from the sidebar. sentry-docs and develop-docs must deploy before this change is live. Shared sidebar source builds into both Vercel projects. The deploy workflow maps those projects to these two services. RiskA throw in the sidebar renderer can hide platform nav on the page. A bad Overview path sends readers to a missing Features landing page. Readers who clicked the Features header now click plain text. Developer docs share this renderer, so a throw can hide that sidebar too. Intended effectThe change worked when readers still open hidden Features landing pages through Overview. Absent looks like those landing page loads fall while other platform page loads hold. Path-level landing page loads were not measured. See Not observable. Do not treat fleet platform page loads as proof that Overview works. Regression watchA broken sidebar first shows as client JavaScript errors or a drop in platform page loads. Watch developer docs errors when that site ships the shared renderer.
If the error rate rises, inspect issues that mention sidebar, DynamicNav, or CollapsibleSidebarLink. Not observablePath-level |
coolguyzone
left a comment
There was a problem hiding this comment.
Changes look good to me, this is a good UI improvement.
SDK features overview pages (e.g. Android Features) are hidden from the sidebar, so the only way to reach them was clicking the FEATURES section header. That header doesn't look clickable, and nothing in the sidebar is highlighted when you're on the page.
This makes the section header plain text and adds an Overview item as the first entry in the section, the same way the platform title gets a Quick Start child. Overview is a regular sidebar link, so it's highlighted when you're on the page.
When Overview shows up
A section gets Overview only if its landing page (
<root>/features/, configured inSECTION_LANDING_PAGES) exists and issidebar_hidden. Visible landing pages already have their own sidebar entry, so they don't get a second link. Examples:configuration/index.mdx("Extended Configuration") is a regular item in the Configuration section, andconfigurationisn't a landing-page section, so nothing changes there.Frontmatter cleanup
These pages were inconsistent with Android, macOS, watchOS, Flutter and the Apple/Dart/React Native common pages:
features/index.mdx: addedsidebar_hidden: true. They used to show as a separate "Features" item at the top of the sidebar.features/index.mdx: replacedsidebar_section: featureswithsidebar_hidden: true. It used to show as a "Features" item inside the Features section, in addition to the header link.renderChildrenno longer needsrootPath, so I removed it.Verification
vitest run src/components/sidebar: newdynamicNav.spec.tspasses (4 tests)eslint src/components/sidebar/,prettier --checkon the changed TS files, andtsc --skipLibCheck --noEmit(with a generatednext-env.d.ts) are cleannext dev:/platforms/android/features/: plain FEATURES header, then Overview (active), then Capturing Errors, Tracing…/platforms/apple/guides/ios/and/platforms/kotlin/guides/kotlin-multiplatform/: Overview is the first item in Features, and the page is linked from the sidebar only once/platforms/javascript/guides/react/and/nextjs/: no Overview, plain headerNo screenshots were taken. A visual check on the preview deploy is worth doing.
via @sergical.
--
View Junior Session [Sentry]