-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
Add autoSize property to Sender component #637
base: main
Are you sure you want to change the base?
Conversation
Fixes ant-design#635 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ant-design/x/issues/635?shareId=XXXX-XXXX-XXXX-XXXX).
📝 WalkthroughWalkthrough此次 PR 在 Sender 组件中新增了 Changes
Sequence Diagram(s)sequenceDiagram
participant Demo as Demo组件
participant Sender as Sender组件
participant Input as InputTextArea组件
Demo->>Sender: 传入 autoSize {minRows:2, maxRows:6}
Sender->>Input: 调用 InputTextArea(autoSize)
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis pull request introduces an Changes
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
components/sender/demo/basic.tsx
(1 hunks)components/sender/index.en-US.md
(1 hunks)components/sender/index.tsx
(3 hunks)components/sender/index.zh-CN.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
components/sender/index.en-US.md
[uncategorized] ~56-~56: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...) => void | - | - | | autoSize | Height auto size feature, can be set to true | false or...
(AUTO_HYPHEN)
🪛 markdownlint-cli2 (0.17.2)
components/sender/index.en-US.md
56-56: Table column count
Expected: 5; Actual: 4; Too few cells, row will be missing data
(MD056, table-column-count)
🔇 Additional comments (5)
components/sender/demo/basic.tsx (1)
41-41
: 非常好!示例演示了自适应高度功能通过为
Sender
组件添加autoSize
属性并设置minRows
和maxRows
值,很好地展示了新增功能的使用方式。这使输入框可以根据内容自动调整高度,提升了用户体验。components/sender/index.zh-CN.md (1)
57-57
: 属性文档完整清晰,表格结构正确
autoSize
属性的文档说明非常清晰,包含了完整的类型定义和默认值,表格结构也符合规范,有助于用户理解和使用此功能。components/sender/index.tsx (3)
77-77
: 接口定义正确,使用可选参数
SenderProps
接口中autoSize
属性的类型定义正确,使用可选参数(?
)允许用户根据需求决定是否使用此功能。类型定义也与文档保持一致。
118-118
: 默认值设置合理为
autoSize
属性提供了默认值{ maxRows: 8 }
,这与文档中描述的默认值一致,并且提供了合理的初始体验。
313-313
: 属性传递实现正确正确地将
autoSize
属性传递给InputTextArea
组件,替换了之前硬编码的值,实现了动态调整文本区域高度的功能。
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/sender/index.en-US.md (1)
56-56
: 建议修改描述中的名称格式
当前表格行的描述中使用了 “auto size” 这样的写法,为了保持属性名称的一致性和文档表达的规范,建议将描述中的 “auto size” 修改为 “auto-size”。此外,表格的其他列(Property、Description、Type、Default、Version)均已正确填写,无需调整。🧰 Tools
🪛 LanguageTool
[uncategorized] ~56-~56: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...) => void | - | - | | autoSize | Height auto size feature, can be set to true | false or...(AUTO_HYPHEN)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/sender/index.en-US.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
components/sender/index.en-US.md
[uncategorized] ~56-~56: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...) => void | - | - | | autoSize | Height auto size feature, can be set to true | false or...
(AUTO_HYPHEN)
Bundle ReportBundle size has no change ✅ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #637 +/- ##
=======================================
Coverage 91.88% 91.88%
=======================================
Files 67 67
Lines 1466 1467 +1
Branches 372 373 +1
=======================================
+ Hits 1347 1348 +1
Misses 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #635
For more details, open the Copilot Workspace session.
Summary by CodeRabbit