Plans & Suggestions for v2.0.0
See original GitHub issueGood day!
In this issue I want to start a discussion what you’d expect from v2.0.0
of this plugin and what my plans are. Please feel free to post any suggestions or wishes you have, I’m open for everything! Also if you think any of my ideas are bad or aren’t making much sense, this is the right place to adress it.
Alright, lets start! My plans for v2.0.0
:
Browser support
- I’ll definitely drop
IE8
, ideally I would drop alsoIE9 and IE10
soIE 11
would be the “lowest standard”. This change would make the library smaller since less compatibility code is required.
Breaking Changes
-
Currently I don’t like how the instances work. Destroyed instances are basically useless. This shall change in
v2.0.0
as instances will be always of use, even if you decide todestroy
it, it will only destroy the generatedDOM
,EventListeners
,Observers
and so on. The instance itself can still be managed and you can also still utilize thescroll
function, so you don’t always have to do a awkward check which scroll function (native or plugin) you should use. -
Instance management, this change can only be done if we support
IE 11
as the lowest standard. Instad of applying a new property to a DOM element aWeakMap
should be used for instance management. -
The scroll function. Currently the scroll function is relatively big and I don’t really know how many users really needs it, so this change should definitely be discussed! The plan is to make it
optional
as astatic
method. So the standard lib comes without it but, you can always decide to download the extensions to use it. The usage would look something like this:
//scroll to coordinates or element
OverlayScrollbars.scroll(osInstance, coordinates [, duration] [, easing] [, complete])
OverlayScrollbars.scroll(osInstance, options)
//get scroll info
OverlayScrollbars.scroll(osInstance)
- The scrollStop function. If the
scroll
function changes the same would also apply to thescrollStop
function. Thescroll
andscrollStop
function would come in one extension, so you don’t have to download two separate extensions since both are essential for scrolling animations.
OverlayScrollbars.scrollStop(osInstance)
Features
-
Scrollbars management: Currently the scrollbars are applied inside the
host
element. Since this request was posted a few times in the past, it could be possible to pass a DOM element to which the scrollbars should be applied. (So scrollbars could be applied also outside of the generated DOM) This feature is also related to the Compatibility with other libraries feature since the DOM structure of such libraries sometimes requires a different parent element for the scrollbars. -
Compatibility with other libraries. Yeah, yeah, currently its hard to use
OverlayScrollbars
with other libraries for things likevirtualization
orGrids
, thats because often these libraries weren’t designed with optional custom scrollbars in mind. I don’t know exactly how it will turn out, but I think its possible thatOverlayScrollbars
can offer the possibility that at least aviewport
element can be passed somehow and then The library can adapt to that. The complex part is, that any library is designed differently and some libraries offer more elements than just aviewport
and some don’t. So I would also add the possibility to pass following elements:host
,viewport
andcontent
, whereviewport
is required and the others are optional.
Thats it for now! Thanks for your attention and please submit your ideas or any feedback you have.
@Grsmto @MarcosRakesh @Windvis @hamed-ehtesham @parsisolution @Acccent #55
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:72 (31 by maintainers)
v2
released today and with it new versions of the framework wrappers. I’ve also added asvelte
andsolid
wrapper. The changelogs can be read here:Read the details about this release in the corresponding changelogs:
They include things like
breaking changes
andnew features
.Thanks everyone for beeing patient and hopefully
v2
is a real benefit for you 😃@tryggvigy in the changelog are all breaking changes listed, also the ones related to styling. This should help you to migrate your styles.
After working almost non-stop on the plugin for the past month, I am happy to announce that I’m confident to share a at least a beta release at the end of the month.