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

fix: Button icon order and margin in rtl mode #48821

Merged
merged 5 commits into from May 8, 2024
Merged

fix: Button icon order and margin in rtl mode #48821

merged 5 commits into from May 8, 2024

Conversation

afc163
Copy link
Member

@afc163 afc163 commented May 8, 2024

中文版模板 / Chinese template

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

fix #48807
close #48813
close #48811

💡 Background and solution

RTL 本身会改变文本顺序,不需要增加额外判断。https://github.com/ant-design/ant-design/pull/47791/files#r1593303396

📝 Changelog

Language Changelog
🇺🇸 English Fix Button icon wrong order and margin in RTL mode.
🇨🇳 Chinese 修复 Button 在 RTL 下的图标顺序和边距缺失问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

Copy link

stackblitz bot commented May 8, 2024

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

Copy link
Contributor

github-actions bot commented May 8, 2024

👁 Visual Regression Report for PR #48821 Failed ❌

🎯 Target branch: master (e2d7e68)
📖 View Full Report ↗︎

Expected (Branch master) Actual (Current PR) Diff
button-icon-position.compact.png button-icon-position.compact.png button-icon-position.compact.png button-icon-position.compact.png
button-icon-position.compact.png button-icon-position.compact.png button-icon-position.compact.css-var.png button-icon-position.compact.css-var.png
button-icon-position.dark.png button-icon-position.dark.png button-icon-position.dark.png button-icon-position.dark.png
button-icon-position.dark.png button-icon-position.dark.png button-icon-position.dark.css-var.png button-icon-position.dark.css-var.png
button-icon-position.default.png button-icon-position.default.png button-icon-position.default.png button-icon-position.default.png
button-icon-position.default.png button-icon-position.default.png button-icon-position.default.css-var.png button-icon-position.default.css-var.png

Check Full Report for details

Copy link
Contributor

github-actions bot commented May 8, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented May 8, 2024

size-limit report 📦

Path Size
./dist/antd.min.js 337.65 KB (-186 B 🔽)
./dist/antd-with-locales.min.js 385.37 KB (-165 B 🔽)

Copy link

codesandbox-ci bot commented May 8, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e2d7e68) to head (4bef061).

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #48821   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          746       746           
  Lines        12996     12994    -2     
  Branches      3412      3411    -1     
=========================================
- Hits         12996     12994    -2     

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

@Wxh16144
Copy link
Member

Wxh16144 commented May 8, 2024

68227f8 这个要不要看一下,感觉可以 revert。 原因我在我的那个 pr 里面描述了一嘴

@afc163
Copy link
Member Author

afc163 commented May 8, 2024

@Wxh16144 对,感觉也可以回滚。

@afc163
Copy link
Member Author

afc163 commented May 8, 2024

想合并了 #47318 后用 flex-direction: row-reverse; 来做 iconPosition,代码会简单很多。

@afc163 afc163 merged commit 766ae3b into master May 8, 2024
103 of 104 checks passed
@afc163 afc163 deleted the fix/button-rtl branch May 8, 2024 12:07
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.

Broken icon margin in RTL button
4 participants