Skip to content

Plans & Suggestions for v2.0.0 #150

@KingSora

Description

@KingSora

Good 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 also IE9 and IE10 so IE 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 to destroy it, it will only destroy the generated DOM, EventListeners, Observers and so on. The instance itself can still be managed and you can also still utilize the scroll 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 a WeakMap 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 a static 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 the scrollStop function. The scroll and scrollStop 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 like virtualization or Grids, 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 that OverlayScrollbars can offer the possibility that at least a viewport 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 a viewport and some don't. So I would also add the possibility to pass following elements: host, viewport and content, where viewport 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions