ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
93.39k stars 51.04k forks source link

fix: Space.Compact support textarea #52639

Closed Can-Chen closed 1 week ago

Can-Chen commented 1 week ago

中文版模板 / Chinese template

🤔 This is a ...

🔗 Related Issues

  • 52305

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English Space.Compact support Input.Textarea component
🇨🇳 Chinese Space.Compact支持textarea组件
stackblitz[bot] commented 1 week ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

github-actions[bot] commented 1 week ago

Preview is ready

github-actions[bot] commented 1 week ago

👁 Visual Regression Report for PR #52639 Failed ❌

🎯 Target branch: master (4eef817abedab4a6a7214920d926c86a18866a9e) 📖 View Full Report ↗︎ 📊 Summary: 🔄 1 changed

Expected (Branch master) Actual (Current PR) Diff
input-group.compact.png input-group.compact.png input-group.compact.css-var.png input-group.compact.css-var.png

[!IMPORTANT] There are 1 diffs found in this PR: 🔄 1 changed. Please check all items:

  • [x] Visual diff is acceptable
petercat-assistant[bot] commented 1 week ago

Walkthrough

This pull request addresses a bug fix for the Space.Compact component to support TextArea. It introduces changes to the TextArea component to integrate with the compact item context, ensuring proper size and class management. Additionally, a demo is added to showcase the TextArea usage within Space.Compact.

Changes

File Summary
components/input/TextArea.tsx Integrated useCompactItemContext to manage size and class names for TextArea within Space.Compact.
components/input/style/index.ts Adjusted styles to ensure TextArea has a minimum height when used in compact mode.
components/space/demo/compact.tsx Added a demo to illustrate TextArea usage within Space.Compact.
pkg-pr-new[bot] commented 1 week ago

Open in Stackblitz

More templates

- [farm-normal](https://pkg.pr.new/template/c49d5c49-0826-4d3c-a271-50d03fea6985) - [vite-normal](https://pkg.pr.new/template/7d9845fd-f014-4984-8aff-9f1233ec8d86) - [rsbuild-normal](https://pkg.pr.new/template/1731cf3d-a97f-4ae2-a371-66b624301ca5) - [vite-practice](https://pkg.pr.new/template/b1f023cd-d25a-486a-9fdc-253b8315bcaf) - [umi-normal](https://pkg.pr.new/template/289a06ce-d240-44a5-a1fd-a702c86c31a4) - [with-nextjs-app-router-inline-style](https://pkg.pr.new/template/4f741dc7-c360-406f-a98e-a23c3f9374b9) - [with-nextjs-extract-style](https://pkg.pr.new/template/1acbc503-5861-4382-8198-dcabab6c1782) - [with-nextjs-generate-css-on-demand](https://pkg.pr.new/template/38013e8b-048b-479b-94ad-f525c3f5c0b8) - [with-nextjs-inline-style](https://pkg.pr.new/template/2fcdfbdc-faf9-4529-9780-98ee6d747f02)

npm i https://pkg.pr.new/ant-design/ant-design/antd@52639

commit: 6fd93f0

afc163 commented 1 week ago

https://github.com/ant-design/ant-design/actions/runs/13089356984/job/36524323019?pr=52639

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (4eef817) to head (6fd93f0). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #52639 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 763 763 Lines 13780 13781 +1 Branches 3609 3610 +1 ========================================= + Hits 13780 13781 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 week ago

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。