Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve version handling logic #1192

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Improve version handling logic #1192

merged 2 commits into from
Nov 11, 2024

Conversation

Sporiff
Copy link
Contributor

@Sporiff Sporiff commented Nov 11, 2024

Related issues

Changes

This PR changes the version handling logic to handle the following cases:

  1. The user arrives at a non-versioned page (e.g. /$locale/sdk/ios). In this case, the script should check to see if the value in the store is the default, and if not it should update the store and the combobox value to v5 but NOT push changes to the href.
  2. The user arrives at a versioned page (e.g. /$locale/sdk/ios/v4). In this case, the script should check to see if the current version in the store is v4 and, if not, update the store and the combobox but NOT push changes to the href.
  3. The user arrives at a page with a version parameter (?version=v4 or ?version=v5). In this case, the script should check to see if the current page is also versioned (i.e. it has a v4 in the href or not) and, if not, push the user to the versioned page and update the store value and combobox selection.
  4. If the user lands on the SDK homepage (/$locale/sdk), the version in the store should be used and the combobox should be checked to see if it matches.

Copy link

vercel bot commented Nov 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 10:48am

@Sporiff Sporiff enabled auto-merge November 11, 2024 10:46
@Sporiff Sporiff merged commit 7b1c3b8 into main Nov 11, 2024
6 of 7 checks passed
@Sporiff Sporiff deleted the improve-version-handling branch November 11, 2024 10:48
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.

1 participant