Skip to content

fix: SideNav selectedRoute optional - #10391

Merged
snowystinger merged 3 commits into
mainfrom
update-sidenav-api
Jul 30, 2026
Merged

fix: SideNav selectedRoute optional#10391
snowystinger merged 3 commits into
mainfrom
update-sidenav-api

Conversation

@snowystinger

Copy link
Copy Markdown
Member

Closes

Found while working on putting SideNav in our docs, we have pages like useButton which don't have a link in our SideNav but do display the SideNav when you visit those pages through Button's ToC or through search.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@github-actions github-actions Bot added the S2 label Jul 29, 2026
@rspbot

rspbot commented Jul 29, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 29, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Jul 29, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/s2

/@react-spectrum/s2:SideNav

 SideNav <T> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children?: ReactNode | (T) => ReactNode
   defaultExpandedKeys?: Iterable<Key>
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   expandedKeys?: Iterable<Key>
   id?: string
   items?: Iterable<T>
   onExpandedChange?: (Set<Key>) => any
-  selectedRoute: string
+  selectedRoute?: string | null
   slot?: string | null
   styles?: StylesPropWithHeight
 }

/@react-spectrum/s2:SideNavProps

 SideNavProps <T> {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   autoFocus?: boolean | FocusStrategy
   children?: ReactNode | (T) => ReactNode
   defaultExpandedKeys?: Iterable<Key>
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   expandedKeys?: Iterable<Key>
   id?: string
   items?: Iterable<T>
   onExpandedChange?: (Set<Key>) => any
-  selectedRoute: string
+  selectedRoute?: string | null
   slot?: string | null
   styles?: StylesPropWithHeight
 }

@rspbot

rspbot commented Jul 29, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (3)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/f88726bd5715c3ef2b63236bf1049b297d38c546/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/f88726bd5715c3ef2b63236bf1049b297d38c546/

@snowystinger
snowystinger added this pull request to the merge queue Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 30, 2026
@snowystinger
snowystinger added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 1e1bd76 Jul 30, 2026
31 checks passed
@snowystinger
snowystinger deleted the update-sidenav-api branch July 30, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants