-
Notifications
You must be signed in to change notification settings - Fork 67
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
[BD-46] Add fixed increment scroll behavior to useOverflowScroll #2151
[BD-46] Add fixed increment scroll behavior to useOverflowScroll #2151
Conversation
Thanks for the pull request, @UvgenGen! When this pull request is ready, tag your edX technical lead. |
✅ Deploy Preview for paragon-openedx ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
ed8f782
to
b6177ce
Compare
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.
Overall, this is looking good. A few other comments:
- Linting errors (
npm run lint
) will need to be resolved. - Include tests for new functionality.
- Document and include example(s) of new functionality in documentation website.
if (offsetString.endsWith("px")) { | ||
offset = parseInt(offsetString); | ||
} else if (offsetString.endsWith("%")) { |
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.
[suggestion] Would it be helpful to potentially treat the offset
value as a distinct argument than the offset
type (pixel or percent). For example, something like:
useOverflowScrollActions({
offset: 25, // number or string
offsetType: 'fixed', // "percentage" or "fixed" (default)
});
This way, this logic wouldn't need to have conditionals based on px
or %
in a string itself.
Curious to hear your thoughts :)
b6177ce
to
6f587a0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2151 +/- ##
==========================================
- Coverage 91.38% 91.36% -0.02%
==========================================
Files 234 234
Lines 4120 4148 +28
Branches 982 997 +15
==========================================
+ Hits 3765 3790 +25
- Misses 348 351 +3
Partials 7 7
☔ View full report in Codecov by Sentry. |
@UvgenGen 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
🎉 This PR is included in version 20.44.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Added fixed increment scroll behavior to useOverflowScroll
useOverflowScroll
#1950Merge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist