-
Notifications
You must be signed in to change notification settings - Fork 28
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: 修复scrollIntoView的参数behavior设置为smooth时引导面板定位异常的问题 #50509 #66
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改涉及对多个文件的修改,主要包括在 Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- docs/examples/scrollIntoView.tsx (2 hunks)
- src/hooks/useTarget.ts (3 hunks)
- src/util.ts (1 hunks)
Additional comments not posted (3)
src/util.ts (1)
22-33
: 新增的debounce
函数实现良好!该函数通过闭包有效地管理超时,符合最佳实践。
docs/examples/scrollIntoView.tsx (1)
68-68
: 添加behavior: 'smooth'
改进用户体验!此更改通过提供平滑滚动来增强视觉效果,实施正确。
src/hooks/useTarget.ts (1)
5-5
: 使用debounce
优化滚动事件处理!引入
debounce
函数来减少滚动事件处理频率,提高性能,实施正确。Also applies to: 65-66, 74-78
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- docs/examples/scrollIntoView.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- docs/examples/scrollIntoView.tsx
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- docs/examples/scrollIntoView.tsx (2 hunks)
- src/hooks/useTarget.ts (3 hunks)
Files skipped from review as they are similar to previous changes (2)
- docs/examples/scrollIntoView.tsx
- src/hooks/useTarget.ts
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/hooks/useTarget.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/hooks/useTarget.ts
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/hooks/useTarget.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/hooks/useTarget.ts
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/hooks/useTarget.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/hooks/useTarget.ts
修复ant-design tour引导组件设置滚动参数behavior:smooth时定位异常的问题 #50509
效果预览:https://rc-tour.xiaonuo.love/demo/scroll-into-view https://rc-tour.vercel.app/demo/scroll-into-view
Summary by CodeRabbit
新特性
文档