Skip to content

fix: use logical suffix offset for rtl overflow#60

Merged
zombieJ merged 2 commits intoreact-component:masterfrom
QDyanbing:fix/57680-rtl-responsive-overflow
Apr 14, 2026
Merged

fix: use logical suffix offset for rtl overflow#60
zombieJ merged 2 commits intoreact-component:masterfrom
QDyanbing:fix/57680-rtl-responsive-overflow

Conversation

@QDyanbing
Copy link
Copy Markdown
Contributor

@QDyanbing QDyanbing commented Apr 14, 2026

Summary

  • replace the pinned responsive suffix left offset with inset-inline-start
  • let logical positioning follow the container direction automatically in both LTR and RTL

Closes ant-design/ant-design#57680

Summary by CodeRabbit

Style

  • 优化了响应式布局中后缀元素的定位样式,增强兼容性表现。

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Warning

Rate limit exceeded

@QDyanbing has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 44 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 44 minutes and 44 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1fc150c9-7998-4602-91c3-3ac0cec87c38

📥 Commits

Reviewing files that changed from the base of the PR and between 385db8d and 901c1f7.

📒 Files selected for processing (1)
  • tests/responsive.spec.tsx

Walkthrough

更新了 src/Overflow.tsx 中的后缀定位样式,在满足 suffixFixedStart !== null && shouldResponsive 条件时,将 CSS 属性 left 替换为 insetInlineStart,以支持 RTL(从右到左)布局模式。

Changes

Cohort / File(s) Summary
RTL 布局支持
src/Overflow.tsx
left: suffixFixedStart 替换为 insetInlineStart: suffixFixedStart,使用 CSS 逻辑属性以正确适配 RTL 文本方向。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰✨ RTL 的困扰已消散,
逻辑属性妙成双,
insetInlineStart 展笑颜,
无论左右都安畅,
代码小改,心意长!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确地总结了主要更改:将硬编码的左侧偏移替换为逻辑位置属性,以支持RTL模式。
Linked Issues check ✅ Passed 代码更改通过将 left 属性替换为 insetInlineStart 属性,使响应式后缀偏移遵循文档方向(#57680),解决了RTL模式下的选择器输入重叠问题。
Out of Scope Changes check ✅ Passed 所有更改都与链接问题 #57680 的范围相符,仅修改后缀定位样式以支持RTL,无其他无关修改。

✏️ 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.

Copy link
Copy Markdown

@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

This pull request updates the Overflow component to use the logical CSS property insetInlineStart instead of left for positioning. A review comment suggests explicitly appending the 'px' unit to this property to maintain compatibility with React versions prior to 18, which do not automatically add units to logical CSS properties.

Comment thread src/Overflow.tsx
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a 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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/Overflow.tsx`:
- Around line 318-323: 测试断言需要跟实现同步:在 Overflow.tsx 中当 suffixFixedStart !== null 且
shouldResponsive 时,后缀样式改为使用逻辑属性 insetInlineStart(由 suffixStyle 设置),请在
tests/responsive.spec.tsx 中把显式断言 left: 80 更新为断言逻辑属性(例如断言
element.style.insetInlineStart === '80px' 或使用匹配器同时接受 left 或
insetInlineStart),以兼容 RTL 修复并避免 CI 失败。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 064f6101-e98c-4ac6-8c10-569efb36682e

📥 Commits

Reviewing files that changed from the base of the PR and between 6efcec0 and 385db8d.

📒 Files selected for processing (1)
  • src/Overflow.tsx

Comment thread src/Overflow.tsx
@afc163
Copy link
Copy Markdown
Member

afc163 commented Apr 14, 2026

ci 挂了

@zombieJ zombieJ merged commit cf9ec2f into react-component:master Apr 14, 2026
8 of 9 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.

Select doesn't work correctly in RTL mode

3 participants