Skip to content
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

chore: bump tree version #633

Merged
merged 2 commits into from
Mar 5, 2025
Merged

Conversation

aojunhao123
Copy link
Contributor

@aojunhao123 aojunhao123 commented Mar 4, 2025

Summary by CodeRabbit

  • 重构
    • 清理了示例代码中的冗余注释,并优化了部分组件的排版和结构,提升整体代码可读性。
  • 杂项
    • 更新了项目依赖和路径配置,引入了新版树组件库,使模块管理更加规范和现代化。

Copy link

vercel bot commented Mar 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tree-select ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 5, 2025 11:18am

Copy link

coderabbitai bot commented Mar 4, 2025

Walkthrough

本次 PR 主要移除了 TreeSelect 组件中注释掉的样式设置(如 dropdownStyledropdownPopupAlign 等)以及部分冗余的格式代码,同时将旧的依赖和相关的导入路径从 rc-tree 迁移到新的 @rc-component/tree 包。在 tsconfig.json 中,也更新了模块路径映射。所有改动均未影响组件的功能,仅对代码进行清理和依赖更新。

Changes

文件 修改摘要
examples/basic.tsx, examples/big-data.tsx, examples/controlled.tsx, examples/filter.tsx 删除 TreeSelect 组件中注释掉的 dropdownStyle 及其它相关注释代码,简化部分组件格式。
package.json 替换依赖:移除 "rc-tree": "~5.13.1",添加 "@rc-component/tree": "~1.0.0"
src/LegacyContext.tsx, src/OptionList.tsx, src/TreeSelect.tsx, src/TreeSelectContext.ts, src/hooks/useCheckedKeys.ts, src/hooks/useDataEntities.ts, src/interface.ts, src/utils/strategyUtil.ts 更新导入路径,从 rc-tree 及其子模块改为 @rc-component/tree 对应模块。
tsconfig.json 修改路径映射,将 "rc-tree-select" 更新为 "@rc-component/tree-select"

Possibly related PRs

Suggested reviewers

  • zombieJ

Poem

我是一只跳跃的小兔子,
在代码原野上奔跑不停,
注释随风散去,路径换新装,
每个依赖都变得清晰明朗,
愿代码像春日花园,生机盎然!
🐰✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

examples/basic.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

examples/custom-icons.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

examples/controlled.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

  • 2 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4bca40e and 28304d7.

📒 Files selected for processing (6)
  • examples/basic.tsx (2 hunks)
  • examples/controlled.tsx (2 hunks)
  • examples/custom-icons.tsx (1 hunks)
  • examples/fieldNames.tsx (1 hunks)
  • package.json (2 hunks)
  • tests/Select.props.spec.js (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • examples/fieldNames.tsx
  • tests/Select.props.spec.js
  • examples/custom-icons.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • examples/basic.tsx
  • examples/controlled.tsx
🔇 Additional comments (2)
package.json (2)

47-50: 依赖更新:添加 @rc-component/tree
在依赖部分新增了 "@rc-component/tree": "~1.0.0"。请确保项目中所有使用树组件的地方都已更新为新包的导入和 API 调用,避免因包名更改导致的兼容性问题。


76-78: 开发依赖更新:换用 @rc-component/dialog
devDependencies 中将旧的 rc-dialog 替换成了新的 "@rc-component/dialog": "^1.2.0"。请检查所有示例和测试文件中对 Dialog 组件的引用是否已更新为新库,并验证新包的版本兼容性。


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@rc-component/[email protected] environment +2 16.6 MB zombiej
npm/@rc-component/[email protected] environment +1 400 kB zombiej

View full report↗︎

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.83%. Comparing base (9ffd1f0) to head (28304d7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #633   +/-   ##
=======================================
  Coverage   99.83%   99.83%           
=======================================
  Files          16       16           
  Lines         593      593           
  Branches      184      186    +2     
=======================================
  Hits          592      592           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zombieJ zombieJ merged commit 60e2de4 into react-component:master Mar 5, 2025
9 checks passed
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.

2 participants