-
-
Notifications
You must be signed in to change notification settings - Fork 623
fix: precision for ue #1246
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: precision for ue #1246
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次 PR 修改了 Changes
Sequence Diagram(s)sequenceDiagram
participant Cell as Cell 组件
participant Scroll as 滚动状态
participant Calc as 计算逻辑
Cell->>Scroll: 获取滚动位置 (absScroll) 与总宽度 (scrollWidth)
Cell->>Calc: 计算 (absScroll - fixStart) 是否 >= 1
Cell->>Calc: 计算 (scrollWidth - absScroll - fixEnd) 是否 >= 1
Calc-->>Cell: 返回开始/结束阴影显示结果
Cell->>Cell: 根据判断结果显示或隐藏阴影
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
src/Cell/index.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct. The config "prettier" was referenced from the config file in "/.eslintrc.js". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 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 (
|
| (isFixStart && fixedStartShadow && absScroll) - | ||
| // For precision, we not show shadow by default which has better user experience. | ||
| (fixStart as number) >= | ||
| 1; |
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.
哈哈,安卓滚动有0.几的误差
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.
默认小于 1 的就不展示了,这样也就是少一点距离出现阴影。比永远有阴影舒服,哈哈哈~
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1246 +/- ##
=======================================
Coverage 98.02% 98.02%
=======================================
Files 76 76
Lines 7385 7391 +6
Branches 1138 1138
=======================================
+ Hits 7239 7245 +6
Misses 140 140
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ref ant-design/ant-design#52928
Summary by CodeRabbit