theia-sticky-sidebar icon indicating copy to clipboard operation
theia-sticky-sidebar copied to clipboard

[Question] Vanilla JS alternative?

Open willstocks opened this issue 5 years ago • 3 comments

Hello! Let me start by saying - great script/library! Super duper duper useful - thank you so much. Question for you: Why the dependency on jQuery? Would a vanilla JS version be something you'd consider in the future? Plain Javascript is now on-part with jQuery in terms of features, and has the potential to even outperform - not only that, but it'd also alleviate some people having to load jQuery!

willstocks avatar Feb 25 '19 12:02 willstocks

Hi Will, thank you for the kind words. :) The library was started a long time ago when jQuery was the obvious choice, at least for me. But you are right, it would make sense to remove jQuery entirely as a dependency, maybe even throw in ES6 while we're at it and also provide a minified+polyfill version.

liviucmg avatar Feb 27 '19 17:02 liviucmg

Hey Liviu!

That would definitely be an interesting thing to see!

Making use of things like IntersectionObserver as well, for maximum scrolling performance?

I’d be truly interested in that - especially with the general internet migration to native rather than dependencies!

I’ve been trying to go as native as possible where I can, as well as only polyfill when absolutely necessary (I have a little script I built out) - I’d be super interested in seeing a vanilla variant of this (hit me up if you want a beta tester!!!)! 👍🏻👍🏻👍🏻

On Wed, 27 Feb 2019 at 17:36, Liviu Cristian Mirea-Ghiban < [email protected]> wrote:

Hi Will, thank you for the kind words. :) The library was started a long time ago when jQuery was the obvious choice, at least for me. But you are right, it would make sense to remove jQuery entirely as a dependency, maybe even throw in ES6 while we're at it and also provide a minified+polyfill version.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/WeCodePixels/theia-sticky-sidebar/issues/63#issuecomment-467957405, or mute the thread https://github.com/notifications/unsubscribe-auth/Apt9AtDtyYYkGU_WwwUxVwVOVxT4qoJeks5vRsIGgaJpZM4bPu4j .

willstocks avatar Feb 27 '19 17:02 willstocks

Hi!

I'm also highly interested in this topic. :D

As Jquery was dropped off the project I had to replace your library with a plain and simple position sticky ; but that makes parts of the sidebar invisible unless your scroll to the end of the page (which can be a pain if you also use ajax loaded content on scroll on the main section).

Cheers anyway for the great work so far!

Nincha avatar Sep 12 '21 16:09 Nincha