Skip to content

Conversation

@Leioy
Copy link
Contributor

@Leioy Leioy commented Dec 30, 2025

  1. Migrate yarn to pnpm
  2. Use Vitest instead of Jest and complete unit tests
  3. refactor some config
  4. Enhance docs

preview link: https://kube-design-docusaurus.vercel.app/

Leioy and others added 19 commits November 21, 2025 14:28
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]>
…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]>
@netlify
Copy link

netlify bot commented Dec 30, 2025

Deploy Preview for kubedesign failed. Why did it fail? →

Name Link
🔨 Latest commit 7afc7ee
🔍 Latest deploy log https://app.netlify.com/projects/kubedesign/deploys/695332646717670008cd8764

@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Package Manager Migration: The project has transitioned from Yarn to pnpm, which is reflected in the addition of a .npmrc file and updates to docs/package.json to use workspace protocol dependencies. This change aims to optimize dependency management and installation speed.
  • Testing Framework Update: The testing infrastructure has been migrated from Jest to Vitest. This involved removing Jest-specific configuration files (configs/jest/enzyme.setup.js, configs/jest/jsdom.mocks.js) and introducing a new Vitest setup file (configs/vitest/setup.ts) that includes @testing-library/jest-dom/vitest, jest-axe matchers, and necessary global mocks.
  • ESLint Configuration Refinement: ESLint configuration has been updated to better support the monorepo structure, including new parserOptions for TypeScript projects within packages/*. Several deprecated ESLint rules related to React, import, and accessibility have been disabled to align with newer versions and best practices.
  • Storybook Integration with Vite: Storybook has been reconfigured to use Vite as its builder instead of Next.js. This involved updating configs/.storybook/main.js to switch frameworks and add Vite-specific alias resolutions for internal monorepo packages.
  • Comprehensive Documentation Expansion: A new Docusaurus-based documentation site has been added, providing extensive guides and API references for a wide array of UI components. This includes new MarkdownX files for components like ActionConfirm, Alert, AutoComplete, Badge, Banner, Button, Card, and many more, significantly enhancing the project's user and developer documentation.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/docsearch.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +22 to +47
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',
},
},
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The @kubed/hooks package is listed twice in the transpilePackages array. You should remove the duplicate entry.

Suggested change
transpilePackages: ['@kubed/components', '@kubed/hooks', '@kubed/hooks'],
transpilePackages: ['@kubed/components', '@kubed/hooks'],

Comment on lines +26 to +28
cd my-website
npm start
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There are a couple of inconsistencies in this README file:

  • The directory is docusaurus, but the command on line 26 says cd my-website. This should be cd docusaurus.
  • The project has been migrated to pnpm, but the commands in this file use npm. For consistency with the rest of the project (e.g., the root CLAUDE.md), these should be updated to pnpm. This also applies to npm run build and npm run serve mentioned later in the file.
Suggested change
cd my-website
npm start
```
cd docusaurus
pnpm start

@htyuu htyuu requested a review from Copilot December 30, 2025 03:33
Copy link

Copilot AI left a 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,
Copy link

Copilot AI Dec 30, 2025

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.

Copilot uses AI. Check for mistakes.
"extends": "../tsconfig.json",
// "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "../packages/**/*.tsx"],
"compilerOptions": {
"baseUrl": "./",
Copy link

Copilot AI Dec 30, 2025

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.

Copilot uses AI. Check for mistakes.
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