Skip to content

Conversation

@marinaaisa
Copy link
Member

@marinaaisa marinaaisa commented Dec 8, 2025

Explanation: In the use cases of navigators with multiple top-level root and multiple languages, we want to make sure that the URL queries that are added in different languages don't interfere with the election of the top-level root node.

Scope: Updates the navigator
Issue: rdar://158778571.
Risk: Low. It only affects the navigator.
Testing: added new unit test.
Reviewer: @mportiz08
Original PR: #980

In the use cases of navigators with multiple top-level root, we want to
make sure that queries don't interfere with the election of the
top-level root node when extracting the root node.

Before we were reading the window.location.href, which includes queries.
Now, by using the window.location.pathname, we ignore the queries, which
makes possible to compare with the node.path value to find which it's
the correct top-level root.

Example: URL: 'http://localhost:8080/documentation/foo?language=objc'
Navigator path: '/documentation/foo'

By using `window.location.pathname` we ignore `?language=objc` and we
can compare `/documentation/foo` with `/documentation/foo`
@marinaaisa marinaaisa requested a review from mportiz08 December 8, 2025 13:32
@marinaaisa marinaaisa changed the title [6.3] Identify the root module of the navigator out of nested modules [6.3] Get the right data when the navigator has multiple top-level roots and multiple languages Dec 8, 2025
@marinaaisa
Copy link
Member Author

@swift-ci test

@marinaaisa marinaaisa merged commit b359eb2 into swiftlang:release/6.3 Dec 8, 2025
1 check passed
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.

2 participants