Skip to content

Latest commit

 

History

History
528 lines (342 loc) · 39.7 KB

CHANGELOG.md

File metadata and controls

528 lines (342 loc) · 39.7 KB

Changelog

13.0.2

  • fix: scrollViewport directive removes custom CSS classes applied on the viewport element, closes #505 in 8e1f663.

13.0.1

  • feat: Add reached event unit tests.
  • fix: Reached event is not fired, closes #495 in 5233793.
  • enhance: Reached directives should subscribe to the scroll event outside angular zone.
  • refactor: Replace the usage of the deprecated pluck RXJS operator with map

13.0.0

  • feat: Standalone component mode.

Breaking changes

  • SmoothScrollModule has been removed, you can import SmoothScroll directive directly instead!
  • NgScrollModule.withConfig() function has been removed, use NG_SCROLLBAR_OPTIONS to set the global config instead!

12.0.1

  • fix: when enable strictTemplates, incorrect types error on boolean value for input properties, closes #491 in #492

12.0.0

  • Update to Angular 16
  • Remove bezier-easing package from dependencies

11.0.0

10.0.1

  • Virtual Scroll integration is broken after Angular CDK 14.1.0, closes #448 in efdaff9.

10.0.0

9.0.2

9.0.1

  • Fix rxjs peerDependencies warning on installation and update dependencies in #419

9.0.0

  • Upgrade to Angular 13, closes #413 in b105a0a.
  • Use the proper types for events and objects instead of using any, in f613d4f and 6829c0e.

8.0.0

  • feat: Build library in partial compilationMode, in 7c6e49d.

Breaking changes

  • Possible breaking change in case of using it with Angular 9.

7.6.1

  • feat: Ability to change scrollbar transition duration and delay using CSS variables, closes #383 in 221b700.
  • feat: Add overscroll-behavior option as a CSS variable --scrollbar-overscroll-behavior, in 1aa81e4.
  • fix: Update scrollbar when dir changes, in cce5c14.

7.6.0 (Important Update)

  • Fix performance issue regarding change detection loop in case OnPush is not used, closes #373 in 11128c9.

NOTE: In v7.6.0 Do not disable the sensors if you are integrating the scrollbar with the CDK virtual scroll component

7.5.6

  • fix: peerDependencies for Angular 12, closes #368 in 132ab56.

7.5.5

NOTE: This version has peerDependencies error on install

7.5.4

  • fix thumb drag position after scrolling the outer container, closes #342 in 30158e9.

7.5.3

  • fix: Create ResizeObserver interface, closes #336 in dd0718c.
  • Update peer-dependencies to Angular 11

7.5.2

  • fix build: Add resize-observer-browser dependency, closes #336 in 60dd480.

7.5.0

  • feat: Add resize sensor unit tests

Breaking changes

  • Deprecate the resize observer polyfill (package: @juggle/resize-observer), closes #329 in 9069192.
  • Auto-height: the feature became disabled by default, in bf8cda1.

The reason to disable the auto-height by default is to avoid performance issues with users who are unaware that it is turned on. When the auto-height is on, and the content size changes very frequently, it could cause performance issue, like in virtual scroll and infinite scroll libraries.

7.4.2

  • feat: Add the options missing interface of scrollToElement method in 5867163.
  • fix: scrollToElement customOptions default value in fff0c72.

7.4.1

  • fix(Auto-width): Set component width instead of minWidth, closes #319 in 4d2176f.
  • refactor(Auto-height, Auto-width) features
  • make sure child container are equal to component height when set (auto-height/auto-width)
  • fix tests

7.4.0

  • Update dependencies to Angular 11.
  • Refactor the library with strict mode.
  • feat: Include scrollbar padding when hovering, closes #300 in f907c72 and f4c0a0d.
  • feat: Ability to disable auto-height feature, closes #311 in f76d347.
  • feat: Auto-width feature, in c934b04.

7.3.1

  • fix: Safe-check viewport clientHeight in auto-height mode, closes #307 in 8136f9d.

7.3.0

  • feat: Upgrade to Angular 10.
  • fix(reached): Can't bind to 'reachedOffset' since it isn't a known property of 'ng-scrollbar', closes #293 in cc9b1b5.

7.2.3

  • fix(core): fix crash when executing on SSR, closes #267 in 17d8bb1.

7.2.1-beta.0

  • fix: adjust hiding the native scrollbar, closes #266 in 110a24e and 110a24e.
  • fix(ivy): Use directive instead of pipe in 5058a8a.
  • fix(Angular 9): Update dependencies (Angular and CDK), closes#272 in ffbceab.

7.2.0

  • Feat: Ability to set NgScrollbarModule.withConfig(options) in 6fca314.
  • Feat: Ability to propagate mousemove events of the viewport element, closes#255 in d24804a.
  • Feat: Ability to use string value on boolean inputs in 752d715.
  • Fix: Fix ivy problem by using a directive instead of a pipe to set the CSS variable, closes #217 in c43ca40.
  • Fix: Adjust hiding the native scrollbars on MacOS and Android in 0b590d7.
  • Fix: Fix compatibility with Angular material 9 in a97f69f and 3ce361f.
  • Fix: Remove installation warning in Angular 9 in d8080a7

7.1.0

  • Feat: Add scrollAuditTime option to tweak performance when on a low framerate budget, closes #245 in 0e0bccb.
  • Fix: check options param for null values, closes #247 in b3e67ed.
  • Fix: Production build fails with 'strictNullChecks' compiler option, closes #219 in ac1a0d6.

7.0.2

  • Fix: Remove scroll-behavior CSS rule, closes #242 in 6b89d6f.
  • Fix: fix auto-height update, closes #243 in 7cac0fb.

7.0.1

  • Fix: Scrollbar breaks when loading on mobile, closes #236 in 33dfa71.
  • Update package dependencies in 9523194.

7.0.0

  • Fix: auto-height feature in aa16191 and 0560af2.
  • Enhance: Prevent selection on track click, in 529450f and 4f66fd2.
  • Enhance: Make sure viewport pointer-events are cleaned up on destroy, in 4b909f6.

7.0.0-beta.0

  • Feat: Add [pointerEventsMethod]="viewport | scrollbar" option, this sets the method used for detecting scrollbar pointer events, closes #216 in c552e60.
  • Feat: Add auto-height, closes #214 in 940d8df..
  • Refactor: Rename disabled attribute, closes #218 in f0206fd.
  • Refactor: Use a directive for each scrollbar part.
  • Feat: Add CSS variable to disable transition for scrollbar thumb size change.
  • Refactor: Merge [trackClicked] and [thumbClicked] with into one option [pointerEventsDisabled], closes #229 in ef1176b.
  • Fix: Production build fails with 'strictNullChecks' compiler option, close #219 in 45fc235.

Breaking changes:

  • Add [pointerEventsMethod] input that can be either "scrollbar" or "viewport", default "scrollbar".

    • Use viewport pointer events to detect scrollbar clicks and drag event. Pro:
      • Scrolling works when mouse is over the scrollbar element Cons:
      • If used with [appearance]="standard" and both vertical and horizontal direction were scrollable, content may overlap under the scrollbar.
    • Use scrollbar pointer events to detect scrollbar clicks and drag event. Pro:
      • This works properly with [appearance]="standard" content never overlap with the scrollbar. Cons:
      • Scrolling doesn't work when mouse is over the scrollbar element
  • Replace [trackClickedDisabled] and [thumbDragDisabled] with one option [pointerEventsDisabled].

6.0.0

  • Feat(SmoothScroll): Ability to pass HTMLElement, ElementRef or string for element selector in the smooth scroll functions.
  • Feat(SmoothScroll): Ability to use scrollTo function using top, left, right, bottom, start and end.
  • Feat(SmoothScroll): Ability to set an offset in scrollToElement function using top and left options' properties.
  • Feat(SmoothScroll): Use bezier-easing makes it easier to customize the smooth scroll ease function #208 in c3436a2.
  • Fix all smooth scroll problems, closes #186 in b5072b2.
  • Fix Scrollbar appears in some cases even if content isn't scrollable, closes #198 in a4233b4.
  • Fix white page issue in Edge, closes #205 in 4547370.
  • Add @juggle/resize-observer to dependencies, closes #185 in c2b524c.
  • Avoid calling getRtlScrollAxisType() in scroll reached events, closes in #203 in 295ac17

Breaking changes

  • Smooth scroll functions options parameters has been modified scrollToBottom, scrollToTop, scrollToLeft, scrollToRight, scrollToSelector
  • Refactor smooth scroll functions parameters scrollTo and scrollToElement, see the wiki for new option interface.
  • ngScrollbar.scrollToSelector('#target') has been removed, you can now use ngScrollbar.scrollToElement('#target') instead

5.0.2

  • Fix reached events in RTL in Mozilla and Safari, closes #193 in 8279828.
  • Fix reached events in AOT, closes #187, closes #187 in 5f67fe3.
  • Refactor scroll viewport layout with absolute positioning, closes #189 in c9c4dae.

5.0.1

  • fix: Hovering on a scrollbar highlights both scrollbars, closes #181 in b533413.
  • fix: Add missing polyfill @juggle/resize-observer to peerDependencies.

5.0.0

  • Feat: Add sensorDebounce and sensorDisabled to NgScrollbarOptions.
  • Feat: Use native ResizeObserver API if available, otherwise lazy-load the polyfill, in 7efd0a2.
  • Feat: Ability for element parameters types to be ElementRef in smooth scroll functions, in 1a4d578.
  • Enhance: Validate boolean and number inputs, in 298e91b.
  • Refactor: Rename disableThumbDrag to thumbDragDisabled in component inputs and NgScrollbarOptions, in df31a97.
  • Refactor: Rename disableTrackClick to trackClickDisabled in component inputs and NgScrollbarOptions, in df31a97.
  • Refactor: Rename scrollToDuration to trackClickScrollDuration in component inputs and NgScrollbarOptions, in df31a97.
  • Refactor: Use standard positioning instead of the absolute in 4cbe7ee.
  • Refactor: Use the CDK's getRtlScrollAxisType instead of browser check, in 275cce3.
  • Refactor: Remove NgScrollbarModule.withConfig() option.
  • Bug: fix hover transition when visibility="hover", in f67a69.

Breaking Changes

To remove complexity, the ResizeObserver API by default if it is available in the browser otherwise import the polyfill async

  • Remove ContentSensor and ResizeSensor directives.
  • Remove NgScrollbarContentSensorModule and NgScrollbarResizeSensorModule modules.
  • Remove disableThumbDrag in favor of thumbDragDisabled in component inputs and NgScrollbarOptions.
  • Remove disableTrackClick in favor of trackClickDisabled in component inputs and NgScrollbarOptions.
  • Remove scrollToDuration in favor of trackClickScrollDuration in component inputs and NgScrollbarOptions.
  • Remove NgScrollbarModule.withConfig() option, provide the NG_SCROLLBAR_OPTIONS token for global options instead.

5.0.0-beta.1

  • Enhance: Enable scrolling when pointer is over the scrollbar in the standard appearance is used.
  • Bug: Scrollbar hover behavior is inconsistent (especially when a hover size is used).
  • Bug: CDK content wrapper is not getting ng-scroll-content-wrapper class.
  • Bug: CSS variable --scrollbar-hover-color isn't effective after disabling the pointer events.
  • Remove the CSS variables --scrollbar-wrapper-color and --scrollbar-viewport-margin.

5.0.0-beta.0

  • Upgrade to Angular 8, closes #161.
  • Feat: Mobile browser support, closes #172.
  • Feat: Scroll works when mouse is over the scrollbars, closes #168.
  • Feat: Resize Sensor directive, closes #166.
  • Feat: Use with 3rd party libraries such as ngx-infinite-scroll, closes #155.
  • Feat: Add global options provider, closes #154.
  • Feat: Add an option to set the minimum size for the scrollbar thumbnail, closes #171.
  • Feat: Add reached outputs, closes #159.
  • Bug: Fix RTL for horizontal scrollbar, closes #169.
  • Bug: Nested scrollbars, child component scroll event not working, closes #146.
  • Enhance: Refactor component layout with CSS Grid, closes #157.
  • Enhance: Use promises for smooth scroll functions, closes #152.
  • Enhance: Use empty space in the scrollbars corner when both vertical and horizontal is shown, closes #151
  • Enhance: Provide smooth scroll functionality as a service, closes #162.
  • Enhance: Add unit testing, closes #163.
  • Enhance: Scrollbar is getting too much space depending on OS and Browser, closes #147.

Known issue

  • BUG: When used with CDK Virtual scroll, scrolling goes up and down.

4.2.0

  • feat: Add support for virtual scrolling, closes #140 in aaf5dc5.
  • enhance: Update scrollbars on window resize #123 in 252e769.

4.1.1

  • fix: Horizontal scrollbar in non-compact mode on Firefox and Edge, in 35ae8d4
  • fix: Remove webkit-scrollbar transparent background, closes #106 in 7fe3749.
  • fix: in some cases, native scrollbar are shown after it is enabled, in 59124ff.
  • fix: Nested <ng-scrollbar>s inherit overflow style, in 9c83b22.
  • fix: Compact mode on Edge, in 2be44c6.

4.1.0

  • feat: Fix horizontal scrollbar position, closes #113 in c435932.
  • feat: Ability to always show scrollbars even if content is not scrollable, closes #112 in 2df15de.
  • refactor: Add [shown] input and remove [autoHide], Ability to always show scrollbars.

Breaking changes

  • The [autoHide] input has been removed in favor of [shown].

Before: [autoHide]="true" shows scrollbar only when mouse is over the scroll view.

After: Use shown="hover" or [shown]="'hover'".

4.0.0

  • feat(RTL Support): Fix horizontal scrollbar on RTL, in 9d992e6.
  • feat: Add invertX and invertY inputs to invert scrollbars position, in 3571b63.
  • feat: Add CSS variables to ease styling the component, in 33ed138.
  • enhance: Improve layout using flex-box.
  • refactor: Rename [overlay] to [compact]
  • fix: Using the default change detection strategy with [disabledOnBreakpoints]="false" produces ExpressionChangedAfterItHasBeenCheckedError, closes #108 in .

Breaking changes

  • The input [overlay] has been renamed to [compact]

3.3.4

  • Fix breakpoints unable to enable the scrollbar after it was disabled, closes #109 in 3485d68.

3.3.3

  • fix smooth scroll error which was introduced in 3.3.1 (40540bb).

3.3.2

  • enhance: Show native scrollbars when disabled, closes #99 in 1bb5a08.
  • enhance: Remove overflow: scroll when disabled, in 39badee and d5dcbdb.

3.3.1

  • fix(NgScrollbar): fix server-side rendering crash, in 9c14b18 and b02f4be.

3.3.0

  • fix(NgScrollbar): Avoid enable execution if disabled, in d51d07e.
  • fix(NgScrollbar): fix server-side rendering crash, in edde8ff.
  • enhance(NgScrollbar): Avoid overriding scrollbar component box-sizing value, closes #96 in d51d07e.
  • refactor(NgScrollbarThumb): Use vertical and horizontal component for clearer code, in (49ac18b and 83fc884.
  • ci: test Node.js 8, 10 and 11 (189b849).

3.2.2

  • fix(SmoothScroll): Fix smooth scroll duration and scrollToBottom(), closes #90 in c4e03d4.

3.2.1

  • enhance(NgScrollbar): Keep native scrollbars hidden when the component is disabled,closes #88 in 4762a7e and 3ef3d8a.
  • enhance(NgScrollbar): Push the native scrollbars 1px more to fix its appearance in Edge browser.
  • refactor(NgScrollbarThumb): Refactor scrollbar initializer function, in 5dbcc22.

3.2.0

  • feat(NgScrollbar): Add [overlay] input to make scrollbars position appears over content.
  • feat(NgScrollbar): Add [disabled] input to enable/disable the custom scrollbars, in 9ac7f8d.
  • feat(NgScrollbar): Add characterData: true to MutationObserver to update on text changes, remove the need to manually update the scrollbars.
  • fix(NgScrollbar): Content goes out of the container when scroll bar is not present, closes #86 in c8d9505.
  • enhance(NgScrollbar): Don't update scrollbar if disabled, in 7f154e9.
  • enhance(NgScrollbarThumb): Make sure the last emit from MutationObserver is not ignored by throttleTime, in fff2083.
  • refactor(NgScrollbar, NgScrollbarThumb): Set scrollbar display value from parent component.
  • refactor(NgScrollbarThumb): Use rxjs syntax to initialize scrollbar thumbnail size, in f201736.

3.1.3

  • enhance(NgScrollbar): Use animationFrameScheduler to set scrollbar thumb position, in 717d221.
  • enhance(NgScrollbar): Add a smooth transition on scrollbar thumbnail size, in 8da5c31.
  • fix(NgScrollbar): Enable back the scrollbar after it was disabled, closes #81 in 9ce2f56.

3.1.2

  • refactor(NgScrollbar): Remove padding from view port styles and use container bottom and right to hide the native scrollbars, in 0f98686.
  • regret(NgScrollbar): return height: 100% on component styles.

3.1.1

  • fix(NgScrollbar): Fix autoHide option styles, closes #76 in a94dd6a.

3.1.0

  • feat(NgScrollbar, SmoothScroll): Add offset value in scrollToElement() in 937374c.
  • fix(NgScrollbar): Fix scrollbar view on dynamic height, closes #72 in 3ea592f.
  • fix(NgScrollbar): Fix scrollbar dragging in prod, in f109322.
  • enhance(NgScrollbar): Hide the scrollbar when its thumbnail size is 0, in 55f37e6.
  • enhance(NgScrollbarThumb): Move scrollbar thumb styles to NgScrollbar component styles, removes the need to add !important to override the styles, in 8b59b64.
  • enhance(NgScrollbarThumb): Use OnPush change detection, in b05ee45.

3.0.0

  • feat(SmoothScroll): Add [smoothScroll] directive which can be imported independently e.g. import {SmoothScrollModule} from 'ngx-scrollbar'.
  • feat(NgScrollbar): Add [disableOnBreakpoints] to disable the custom scrollbars on certain breakpoints.
  • refactor(NgScrollbar): Improve performance by removing (scrollState) output which causes a change detection on each emit.
  • fix(NgScrollbar): Fallback to native scrollbars on mobile, closes #59.
  • enhance(NgScrollbar): Improve component default styles.

Breaking Changes

  • The component class name has changed from ScrollbarComponent to NgScrollbar.
  • The module class name has changed from ScrollbarModule to NgScrollbarModule.
  • (scrollState) output is removed, to get the scroll event use the component ref, example:
@ViewChild(NgScrollbar) ngScrollbar: NgScrollbar;
ngScrollbar.scrollable.elementScrolled().subscribe(e => console.log(e))

2.3.0

  • feat(ScrollbarComponent): All scrollTo functions return an observable that emits when the scroll function is done.
  • feat(ScrollbarComponent): Add scrollTo and scrollToElement functions, in 6acdf70.
  • feat(ScrollbarComponent): Add cross-browser smooth scroll, in 6acdf70.
  • fix peerDependencies for Angular >= 6, in 6c78229.
  • fix(ScrollbarComponent): Scrollbar are not shown on init, closes #48 in bac70d5.
  • refactor(ScrollbarComponent): Use right and bottom to hide the native scrollbars, in 91b6b6f.
  • refactor(ScrollbarComponent): Encapsulate component styles, in 0fd9b92.
  • enhance(ScrollbarComponent): Use CDK ScrollModule instead of native scroll event, in d5d59b3.

Breaking changes:

  • Must subscribe on any scrollTo function you use, e.g. ScrollbarComponent.scrollToBottom().subscribe()

2.2.0

  • fix(ScrollbarComponent): fix SSR by checking if the MutationObserver code is running on the browser, in 86adf42.
  • refactor(ScrollbarComponent): General refactor, in 3d406a3.
  • Update dependencies

2.1.0

  • feat(ScrollbarComponent): Adds scrollToTop, scrollToBottom, scrollToRight, scrollToLeft functions, closes #39 in 664982d.

2.0.4

  • enhancement(ScrollbarComponent): Ability to scrollTo without animation, closes #29 in #37

2.0.3

  • refactor(ScrollbarComponent): rxjs style for scrollbar thumb workers events in #36

2.0.2

  • fix(ScrollbarComponent): Strange scrollbar thumb behavior in Firefox, closes #33 in #34

2.0.1

  • fix(Build): fix AOT build error, closes #30 in f0a5c85

2.0.0

  • Upgrade to Angular 6, closes #26 in #27.

1.5.7

  • Remove pointer from scrollbar to default

1.5.6

  • Fixes a bug: Check if the subscription is defined before unsubscribing, closes #18.

1.5.5

  • Regret: use renderer again, remove the state architecture.
  • Fix wrong subscriptions, closes #12.
  • Fix the tiny delay before rendering scrollbars thumbnails (which was introduced in v1.5.0).

1.5.0 (deprecated)

  • Refactor: bind a state instead of using renderer
  • Refactor: Make classes inputs reactive
  • Improve performance: run code using NgZone
  • Support Universal: remove unsupported interfaces in Universal like MouseEvent

1.4.2

  • Refactor with RxJS 5.5 pipe style

1.4.0

  • Feature(autoUpdate): Add [autoUpdate] option to automatically update on content changes
  • Feature(Update function): Add update() function to manually update scrollbars
  • Enhancement: Add height: 100% to the component style

1.3.0

  • Feature(custom classes) [viewClass], [barClass] and [thumbClass] inputs to add custom classes

1.2.0

  • Feature(ScrollTo function): Add animated scroll to a specific position
  • Fix(scrollbar positions when content is changed)

1.1.0

  • Refactor(Scrollbar Component)
  • Fix(dragging scrollbars) closes #3

1.0.1

  • Change trackX input to false by default

1.0.0

  • Remove characterData: true from the MutationObserver which was causing a issue in nested scrollbars
  • Use ViewEncapsulation.None for the component style

0.5.0

  • Initial release