Skip to content

Conversation

@zenoachtig
Copy link
Contributor

@zenoachtig zenoachtig commented Oct 29, 2025

Add rudimentary support for translations & generic variants to be used on the same site. The variant dropdown on the left and translation dropdown in the header can now function independently from each other.

  • Refactor withVariants into a variants object that contains two arrays for the different types: translations and generic.
  • Switch the logic around to check these two arrays independently of each other.
  • If there are any translations (spaces with a different language than the current), the menu dropdown is shown. If there are any generic variants (spaces with the same language as the current), the variant dropdown is shown.

Add rudimentary support for translations & generic variants to be used on the same site.
- Refactor `withVariants` into a `variants` object that contains two arrays for the different types: `translations` and `generic`.
- Switch the logic around to check these two arrays independently of each other.
- If there are any translations (spaces with a different language than the current), the menu dropdown is shown. If there are any generic variants (spaces with the same language as the current), the variant dropdown is shown.
@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

🦋 Changeset detected

Latest commit: e2cd991

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@argos-ci
Copy link

argos-ci bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) ✅ No changes detected - Oct 30, 2025, 1:58 PM
v2-cloudflare (Inspect) 👍 Changes approved 2 changed Oct 30, 2025, 2:02 PM
v2-vercel (Inspect) ✅ No changes detected - Oct 30, 2025, 2:02 PM

@zenoachtig zenoachtig merged commit 55c0b03 into main Oct 30, 2025
16 checks passed
@zenoachtig zenoachtig deleted the support-translations-and-generic-variants-together branch October 30, 2025 14:03
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.

3 participants