-
-
Notifications
You must be signed in to change notification settings - Fork 8
Nested scroll containers #89
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
|
@hirasso Regarding naming: TLDR Let's go with Long rant I tried a few different namings/spellings in this PR. Hadn't bothered to check back with you because it's still in draft. Would have written up a few notes to start a discussion. But let's discuss now :) I found the My confusion specifically stems from thinking that Other alternatives:
WDYT? |
|
Sounds very reasonable. The |
Signed-off-by: Philipp Daun <post@philippdaun.net> # Conflicts: # package-lock.json # src/index.ts
Signed-off-by: Philipp Daun <post@philippdaun.net>
Signed-off-by: Philipp Daun <post@philippdaun.net>
|
Got nested containers working nicely now. Ready for review :) |
|
Computing all the offsets got so frustrating and I never got the same results as the native browser implementation. Then I stumbled upon compute-scroll-into-view which is spec-compliant and does all the heavy lifting. It e.g. supports The package also enables easy horizontal scrolling, but I decided to add that in a separate PR in case we need to tweak any public APIs (very probable). |
|
Updated the naming around element, container and target. And added a screen recording in the PR description. |
|
Looks great! And damn - I discovered that package as well recently, but forgot to mention it here. Glad you found it yourself! I'm AFK at the moment, but will test this as soon as I get the chance. |
|
Actually - this looks great and I don't want to cancel momentum. Approved! Since we are doing more work before merging this all into main, chances are we'll catch any issues before that when tackling the remaining features. This is fun 🤩 |
|
Nice. And yeah, life on the |
Description
compute-scroll-into-viewpackage to ensure compliance with spec and browsersPlayground example
Checks
mainbranchnpm run lint)All tests are passing (npm run test)New or updated tests are includedThe documentation was updated as required