-
Notifications
You must be signed in to change notification settings - Fork 115
Migrate tools #371
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
base: master
Are you sure you want to change the base?
Migrate tools #371
Conversation
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
…om build output, add path aliases, and update workspace dependencies. Signed-off-by: leioy <[email protected]>
… existing tests, and refine testing configuration. Signed-off-by: leioy <[email protected]>
…nd adjust Docusaurus configuration. Signed-off-by: leioy <[email protected]>
… and remove a specific project parser option override. Signed-off-by: leioy <[email protected]>
…and favicon, and refine navbar configuration. Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
Signed-off-by: leioy <[email protected]>
…with updated build scripts and ESLint rules. Signed-off-by: leioy <[email protected]>
…ry and add English locale option. Signed-off-by: leioy <[email protected]>
Co-Authored-By: Warp <[email protected]>
Signed-off-by: leioy <[email protected]>
❌ Deploy Preview for kubedesign failed. Why did it fail? →
|
Summary of ChangesHello @Leioy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant overhaul to the project's development environment and documentation. The primary goal is to modernize the tooling by migrating to pnpm for package management and Vitest for testing, alongside refining existing configurations like ESLint and Storybook. A major addition is a new Docusaurus-powered documentation site, which provides comprehensive and structured information for all components, improving discoverability and usability for developers. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request primarily focuses on migrating the project's testing and documentation infrastructure. It updates ESLint configurations to support a monorepo setup, disables several deprecated ESLint rules, and upgrades ESLint and TypeScript versions. The testing framework is migrated from Enzyme to Vitest, with corresponding setup files added and removed. Storybook is migrated from a Webpack-based setup to Vite, involving changes in main.js and removal of tsconfig-paths-webpack-plugin. A new Docusaurus documentation site is introduced, along with its configuration files, .gitignore entries, and numerous .mdx files detailing various UI components. PNPM-specific configurations are added to .npmrc, and package dependencies are updated to use workspace:* in docs/package.json. Review comments highlight opportunities to refactor duplicate ESLint override blocks and correct inconsistencies in the docs/next.config.js and docusaurus/README.md files, specifically regarding a duplicate package entry and the use of npm commands instead of pnpm.
| overrides: [ | ||
| { | ||
| files: ['*.story.tsx', '*.story.ts'], | ||
| parserOptions: { | ||
| project: null, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/dot-notation': 'off', | ||
| '@typescript-eslint/no-implied-eval': 'off', | ||
| '@typescript-eslint/no-throw-literal': 'off', | ||
| '@typescript-eslint/return-await': 'off', | ||
| }, | ||
| }, | ||
| { | ||
| files: ['scripts/**/*.ts', 'configs/**/*.ts'], | ||
| parserOptions: { | ||
| project: null, | ||
| }, | ||
| rules: { | ||
| '@typescript-eslint/dot-notation': 'off', | ||
| '@typescript-eslint/no-implied-eval': 'off', | ||
| '@typescript-eslint/no-throw-literal': 'off', | ||
| '@typescript-eslint/return-await': 'off', | ||
| }, | ||
| }, | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parserOptions and rules in these two overrides blocks are identical. To improve maintainability and reduce duplication, you can merge them into a single block by combining the files arrays.
overrides: [
{
files: ['*.story.tsx', '*.story.ts', 'scripts/**/*.ts', 'configs/**/*.ts'],
parserOptions: {
project: null,
},
rules: {
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/no-implied-eval': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/return-await': 'off',
},
},
],| const { i18n } = require('./next-i18next.config.cjs'); | ||
|
|
||
| module.exports = withPlugins([], { | ||
| transpilePackages: ['@kubed/components', '@kubed/hooks', '@kubed/hooks'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| cd my-website | ||
| npm start | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of inconsistencies in this README file:
- The directory is
docusaurus, but the command on line 26 sayscd my-website. This should becd docusaurus. - The project has been migrated to
pnpm, but the commands in this file usenpm. For consistency with the rest of the project (e.g., the rootCLAUDE.md), these should be updated topnpm. This also applies tonpm run buildandnpm run servementioned later in the file.
| cd my-website | |
| npm start | |
| ``` | |
| cd docusaurus | |
| pnpm start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the project's tooling infrastructure and enhances documentation. The main changes involve switching from Yarn to pnpm, replacing Jest with Vitest for testing, and adding comprehensive documentation for multiple UI components.
Key changes:
- Migrated package manager from Yarn to pnpm
- Replaced Jest with Vitest and completed unit tests
- Added extensive component documentation (ShowMore, Sheet, Select, Radio, Progress, Popover, Pagination, Notify, Navs, Modal, Menu, Loading, LoadingOverlay, Input, InputPassword, InputNumber, Group, Empty)
- Refactored configuration files
- Enabled React strict mode in Next.js config
Reviewed changes
Copilot reviewed 54 out of 314 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docusaurus/docs/components/*.mdx | Added comprehensive documentation for 18+ UI components with examples and API references |
| docusaurus/.gitignore | Added standard gitignore entries for Docusaurus project |
| docs/tsconfig.json | Added baseUrl configuration and node_modules exclusion |
| docs/next.config.js | Enabled React strict mode |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| module.exports = withPlugins([], { | ||
| transpilePackages: ['@kubed/components', '@kubed/hooks', '@kubed/hooks'], | ||
| reactStrictMode: false, | ||
| reactStrictMode: true, |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling React strict mode is a good practice for identifying potential problems. However, this is a breaking change that may reveal previously hidden issues in the codebase. Ensure comprehensive testing has been performed to verify that all components work correctly in strict mode before merging, as strict mode intentionally double-invokes certain lifecycle methods and callbacks in development.
| "extends": "../tsconfig.json", | ||
| // "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "../packages/**/*.tsx"], | ||
| "compilerOptions": { | ||
| "baseUrl": "./", |
Copilot
AI
Dec 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding baseUrl without corresponding path aliases may not provide significant benefit. Consider removing this if it's not being used for module resolution, or document why it's needed. If the intention is to enable absolute imports, ensure the paths are properly configured to take advantage of this setting.
preview link: https://kube-design-docusaurus.vercel.app/