-
-
Notifications
You must be signed in to change notification settings - Fork 363
feat(GotoTop): add ScrollBehavior parameter #4885
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
Conversation
Reviewer's Guide by SourceryThis PR adds a ScrollBehavior parameter to the GoTop component, allowing customization of the scroll animation behavior. The implementation includes updates to the component's parameters, markup, and JavaScript code to support both smooth and auto scroll behaviors. Sequence diagram for GoTop component scroll behaviorsequenceDiagram
actor User
participant GoTopComponent as GoTop Component
participant JSFunction as JavaScript Function
User->>GoTopComponent: Click GoTop button
GoTopComponent->>JSFunction: init(id, target)
JSFunction->>JSFunction: Get data-bb-target and data-bb-behavior
JSFunction->>JSFunction: element.scrollTo({ top: 0, left: 0, behavior: behavior })
JSFunction-->>User: Scroll to top with specified behavior
Class diagram for GoTop component with ScrollBehaviorclassDiagram
class GoTop {
+string? Target
+ScrollIntoViewBehavior ScrollBehavior
+string? TooltipText
-IIconTheme? IconTheme
-string? ScrollBehaviorString
}
note for GoTop "Added ScrollBehavior parameter and ScrollBehaviorString property"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ArgoZhang - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please provide a more detailed English description of the changes and complete the PR template sections (particularly risk assessment and verification details).
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4885 +/- ##
========================================
Coverage 99.99% 100.00%
========================================
Files 623 623
Lines 27832 27834 +2
Branches 3983 3984 +1
========================================
+ Hits 27831 27834 +3
+ Partials 1 0 -1 ☔ View full report in Codecov by Sentry. |
add ScrollBehavior parameter
Summary of the changes (Less than 80 chars)
简单描述你更改了什么, 不超过80个字符;如果有关联 Issue 请在下方填写相关编号
Description
fixes #4884
Regression?
[If yes, specify the version the behavior has regressed from]
[是否影响老版本]
Risk
[Justify the selection above]
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a ScrollBehavior parameter to the GoTop component to allow customization of scroll behavior, and update the component to handle this new parameter. Enhance the component's functionality by supporting different scroll behaviors and add corresponding unit tests to verify the implementation.
New Features:
Enhancements:
Tests: