Skip to content

chore: upgrade dropdown demo to v2 - #1514

Merged
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:upgrade-dropdown-open-api
Sep 9, 2026
Merged

chore: upgrade dropdown demo to v2#1514
zombieJ merged 1 commit into
react-component:masterfrom
QDyanbing:upgrade-dropdown-open-api

Conversation

@QDyanbing

@QDyanbing QDyanbing commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

将开发依赖 @rc-component/dropdown 升级为 ^2.0.0,并将下拉筛选示例中的 visibleonVisibleChange 及对应状态名称统一迁移为 openonOpenChange,适配 Dropdown 2.0 移除旧 API 的变更。

Dropdown 仅用于文档示例,本次不改变 Table 的运行时依赖和对外 API。

验证

  • 已安装并使用正式发布的 @rc-component/dropdown@2.0.0
  • TypeScript 检查、示例 ESLint 和格式检查通过。
  • 文档站完整构建通过,包含 dropdown 示例页面。

关联:react-component/dropdown#269

Summary by CodeRabbit

  • 文档
    • 更新下拉菜单示例,统一使用 openonOpenChange 管理及监听展开状态。
    • 示例中的状态字段、事件处理器及相关调用已同步调整,提升示例与当前接口的一致性。

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@QDyanbing is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1b463fba-690a-413b-b495-35b02b261f2d

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0fbdd and 63db1ae.

📒 Files selected for processing (2)
  • docs/examples/dropdown.tsx
  • package.json

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

升级下拉菜单依赖,并将下拉菜单示例从 visible API 迁移到 open API。

Changes

下拉菜单 API 迁移

Layer / File(s) Summary
下拉菜单依赖升级
package.json
将开发依赖 @rc-component/dropdown^1.0.2 更新为 ^2.0.0
示例受控状态迁移
docs/examples/dropdown.tsx
将状态字段、关闭逻辑、回调名称及 DropDown 属性从 visible/onVisibleChange 更新为 open/onOpenChange

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 63db1

The documentation dropdown example now uses the Dropdown 2.0 controlled open API and closes correctly after filter confirmation. No merge-blocking risk is evident.

Suggested reviewers: afc163

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了主要变更:将 Dropdown 示例升级到 v2,并同步更新示例用法。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 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.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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

小兔更新下拉门,
open 状态稳稳存。
新版依赖轻轻跳,
回调名字对得好。
筛选确认门关闭,
代码清爽向前跑。

Comment @coderabbitai help to get the list of available commands.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​rc-component/​dropdown@​1.0.3 ⏵ 2.0.09910010087100

View full report

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (9d0fbdd) to head (63db1ae).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1514   +/-   ##
=======================================
  Coverage   99.08%   99.08%           
=======================================
  Files          45       45           
  Lines        1426     1426           
  Branches      432      432           
=======================================
  Hits         1413     1413           
  Misses         13       13           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zombieJ
zombieJ merged commit e63fbf5 into react-component:master Sep 9, 2026
9 of 10 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