Skip to content

fix: dropdown submenu arrow wrong direction in rtl#52885

Merged
li-jia-nan merged 6 commits intoant-design:masterfrom
yellowryan:dropdown-sub-menu-arrow-rtl
Feb 19, 2025
Merged

fix: dropdown submenu arrow wrong direction in rtl#52885
li-jia-nan merged 6 commits intoant-design:masterfrom
yellowryan:dropdown-sub-menu-arrow-rtl

Conversation

@yellowryan
Copy link
Copy Markdown
Contributor

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ❓ Other (about what?)

🔗 Related Issues

related to #52882

💡 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 fixed wrong direction of dropdown multi-level menu arrow in rtl
🇨🇳 Chinese 修复dropdown多级菜单箭头在 rtl 中方向错误

@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2025

👁 Visual Regression Report for PR #52885 Passed ✅

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

🎊 Congrats! No visual-regression diff found.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2025

Preview is ready

@petercat-assistant
Copy link
Copy Markdown

Walkthrough

This pull request addresses a bug fix for the dropdown component in RTL (Right-to-Left) mode. It corrects the direction of the submenu arrow, ensuring it points in the correct direction when RTL is enabled.

Changes

File Summary
components/dropdown/dropdown.tsx Updated import to include LeftOutlined icon. Modified logic to conditionally render LeftOutlined or RightOutlined based on the direction prop, ensuring correct arrow direction in RTL mode.

Comment thread components/dropdown/dropdown.tsx
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 19, 2025

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2025

Bundle Report

Changes will increase total bundle size by 144 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.38MB 144 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 72 bytes 1.84MB 0.0%
antd.min.js 72 bytes 1.54MB 0.0%

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d5d9a36) to head (5e9da38).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #52885   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          768       768           
  Lines        13847     13849    +2     
  Branches      3629      3631    +2     
=========================================
+ Hits         13847     13849    +2     

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

Comment thread components/dropdown/dropdown.tsx
Comment thread components/dropdown/dropdown.tsx
li-jia-nan
li-jia-nan previously approved these changes Feb 19, 2025
Comment thread components/dropdown/dropdown.tsx Outdated
@li-jia-nan li-jia-nan merged commit 0c74505 into ant-design:master Feb 19, 2025
@PeachScript PeachScript mentioned this pull request Feb 24, 2025
16 tasks
renny-ren pushed a commit to renny-ren/ant-design that referenced this pull request Apr 14, 2025
* fix: dropdown submenu arrow wrong direction in rtl

* test: dropdown arrow direction in rtl mode

* Update components/dropdown/dropdown.tsx

Signed-off-by: lijianan <574980606@qq.com>

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: lijianan <574980606@qq.com>
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.

3 participants