Skip to content

chore: remove @rc-component/textarea dependency#309

Merged
zombieJ merged 1 commit intoreact-component:masterfrom
QDyanbing:remove-textarea
Mar 21, 2026
Merged

chore: remove @rc-component/textarea dependency#309
zombieJ merged 1 commit intoreact-component:masterfrom
QDyanbing:remove-textarea

Conversation

@QDyanbing
Copy link
Contributor

@QDyanbing QDyanbing commented Mar 21, 2026

变更说明

本次调整移除了 @rc-component/textarea 依赖,并将 Mentions 内部使用的 TextAreaTextAreaPropsTextAreaRef 全部切换为 @rc-component/input 提供的实现。

这是一次内部依赖迁移,不涉及 Mentions 对外 API 变更。

具体改动

  • 移除 @rc-component/textarea 依赖
  • Mentions 改为从 @rc-component/input 引入 TextArea
  • Mentions 相关 textarea 类型改为使用 @rc-component/input 导出的类型

Summary by CodeRabbit

  • 重构
    • 优化内部依赖配置,提升代码组织结构的一致性。

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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!

本次 PR 旨在进行一次内部依赖迁移,将 Mentions 组件对 TextArea 的实现从 @rc-component/textarea 切换到 @rc-component/input。此项调整不涉及 Mentions 组件的对外 API 变更,主要目的是优化内部依赖结构。

Highlights

  • 移除 @rc-component/textarea 依赖: Mentions 组件内部使用的 TextArea、TextAreaProps 和 TextAreaRef 已全部切换为 @rc-component/input 提供的实现。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6e0cf807-a625-432d-ad56-06657ec3d695

📥 Commits

Reviewing files that changed from the base of the PR and between 4eb9202 and a4182ad.

📒 Files selected for processing (2)
  • package.json
  • src/Mentions.tsx
💤 Files with no reviewable changes (1)
  • package.json

概览

移除了 @rc-component/textarea 依赖,将 Mentions.tsx 中的 TextArea 组件及其类型定义从 @rc-component/textarea 迁移至 @rc-component/input,实现依赖整合。

变化

内聚组 / 文件 总结
依赖移除
package.json
移除 @rc-component/textarea (~1.2.0) 依赖。
组件导入迁移
src/Mentions.tsx
TextArea 组件和 TextAreaPropsTextAreaRef 类型从 @rc-component/textarea 改为从 @rc-component/input 导入;组件渲染和类型定义相应调整。

可能相关的PR

  • chore: update deps #285: 同样修改了 src/Mentions.tsx 中的 textarea/input 类型和组件导入,涉及同一文件的依赖切换。
  • chore(deps): bump rc-input #283: 涉及 @rc-component/input 包的更新,与本PR统一使用 @rc-component/input 中的 TextArea 相关联。

预估代码审查工作量

🎯 2 (Simple) | ⏱️ ~8 分钟

兔子的诗

🐰 ✨

依赖轻盈了一个,

TextArea 投奔新家园,

从 textarea 到 input,

聚合的力量更闪闪发光!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 标题准确概括了主要改动:移除 @rc-component/textarea 依赖,标题简洁清晰,直接反映了这次 PR 的核心目标。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm buffer-okam is 96.0% likely obfuscated

Confidence: 0.96

Location: Package overview

From: ?npm/buffer-okam@4.9.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/buffer-okam@4.9.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm buffer is 96.0% likely obfuscated

Confidence: 0.96

Location: Package overview

From: ?npm/buffer@4.9.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/buffer@4.9.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

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

本次 PR 主要是移除了 @rc-component/textarea 依赖,并切换到 @rc-component/input。整体修改是正确的,我只在 src/Mentions.tsx 中发现了一个可以合并导入语句以提高代码整洁度的地方。

Comment on lines +2 to +5
import { BaseInput, TextArea } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';
import type { TextAreaProps, TextAreaRef } from '@rc-component/textarea';
import TextArea from '@rc-component/textarea';
import type { TextAreaProps, TextAreaRef } from '@rc-component/input';

Choose a reason for hiding this comment

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

medium

为了提高代码可读性并避免冗余的导入语句,可以将 TextAreaPropsTextAreaRef 的类型导入与 @rc-component/input 的值导入合并。

Suggested change
import { BaseInput, TextArea } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';
import type { TextAreaProps, TextAreaRef } from '@rc-component/textarea';
import TextArea from '@rc-component/textarea';
import type { TextAreaProps, TextAreaRef } from '@rc-component/input';
import { BaseInput, TextArea, type TextAreaProps, type TextAreaRef } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';

@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (4eb9202) to head (a4182ad).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #309   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files           8        8           
  Lines         301      301           
  Branches       77       79    +2     
=======================================
  Hits          296      296           
  Misses          5        5           

☔ View full report in Codecov by Sentry.
📢 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 d2904ed into react-component:master Mar 21, 2026
7 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