docs: Add version selector and update navbar#721
Conversation
Introduced a VersionSelector component for switching documentation versions and updated the navbar to include it, removing Discord and Twitter links. Also updated sitemap URLs and timestamps, and made minor formatting changes to style.css.
|
To view this pull requests documentation preview, visit the following URL: Documentation is deployed and generated using docs.page. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a version selector component to the documentation website navbar and removes Discord/Twitter social links. The changes focus on improving version navigation while cleaning up the navbar design.
- Added a new
VersionSelectorcomponent with version 1.7 and 2.0 options - Replaced Discord and Twitter links in navbar with the version selector
- Updated sitemap with new documentation pages and timestamps
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/theme.config.tsx | Imports and integrates VersionSelector component, removes social media links from navbar |
| website/style.css | Minor CSS formatting cleanup for background gradient |
| website/public/sitemap-0.xml | Updated sitemap with new tutorial pages and refreshed timestamps |
| website/components/VersionSelector.tsx | New version selector component with dropdown for switching between versions 1.7 and 2.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const newVersion = event.target.value; | ||
|
|
||
| if (newVersion === '1.7') { | ||
| window.location.href = 'mix-docs-gosljkd74-fluttertools.vercel.app'; |
There was a problem hiding this comment.
The URL assignment is missing the protocol (https://). This could cause the browser to treat it as a relative URL instead of navigating to the intended external domain.
| window.location.href = 'mix-docs-gosljkd74-fluttertools.vercel.app'; | |
| window.location.href = 'https://mix-docs-gosljkd74-fluttertools.vercel.app'; |
| @@ -0,0 +1,41 @@ | |||
| const VersionSelector = () => { | |||
There was a problem hiding this comment.
[nitpick] Component should be defined with React.FC type annotation or use function declaration for better TypeScript support and consistency.
| const VersionSelector = () => { | |
| import React from 'react'; | |
| const VersionSelector: React.FC = () => { |
Add versioning to documentation