Skip to content

feat(site): add version switcher to header navigation#342

Merged
hustcc merged 5 commits intoaifrom
copilot/add-version-switching-feature
Feb 6, 2026
Merged

feat(site): add version switcher to header navigation#342
hustcc merged 5 commits intoaifrom
copilot/add-version-switching-feature

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Adds version switching UI to allow users to navigate between v1.x (current) and v0.x documentation at https://gpt-vis-0.x-site.antv.vision/.

Implementation

  • Component: Created VersionSwitcher.tsx with dropdown menu

    • Click-outside-to-close behavior
    • Disabled state for current version with visual indicator
    • ARIA role="menu", aria-current, and screen reader announcements for external link
  • Integration: Added to header navigation on all pages (home, docs, examples)

    • Positioned between GitHub link and Get Started button
    • Consistent placement across site

UI

Closed state:
Version switcher in header

Dropdown menu:
Version dropdown open

Files Changed

site/app/components/VersionSwitcher.tsx  (new)
site/app/page.tsx                        (import + integrate)
site/app/docs/page.tsx                   (import + integrate)
site/app/examples/page.tsx               (import + integrate)
Original prompt

官网 site 的 header 右侧 加一个版本切换的功能。默认 1.x 是当前站点,可以切换到 0.x 版本,地址为:https://gpt-vis-0.x-site.antv.vision/


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: 3c03f6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copilot AI and others added 4 commits February 6, 2026 05:21
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add version switching feature to site header feat(site): add version switcher to header navigation Feb 6, 2026
Copilot AI requested a review from hustcc February 6, 2026 05:26
@hustcc hustcc marked this pull request as ready for review February 6, 2026 05:28
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

🎊 PR Preview 3c03f6e has been successfully built and deployed to https://antvis-GPT-Vis-preview-pr-342.surge.sh

🕐 Build time: 0.011s

🤖 By surge-preview

@hustcc hustcc merged commit d531b6c into ai Feb 6, 2026
6 checks passed
@hustcc hustcc deleted the copilot/add-version-switching-feature branch February 6, 2026 05:32
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.

2 participants