Skip to content

Releases: taion/scroll-behavior

v0.6.0

03 May 04:22
v0.6.0
ed94437
Compare
Choose a tag to compare

This release is in preparation for releasing react-router-scroll, which will properly integrate this scroll behavior management with React Router.

  • Breaking: Remove scroll behaviors other than the former withStandardScroll, and make the former withStandardScroll the package main import (#63)
  • Breaking: Remove async shouldUpdateScroll support (#63)
  • Feature: Extract ScrollBehavior class with core scroll management for use in other libraries (#63)

v0.5.0

02 May 04:22
v0.5.0
f31e1d3
Compare
Choose a tag to compare
  • Breaking: Extend history objects rather than enhancing history factories (#60)
  • Feature: Add support for async shouldUpdateScroll (#58)
  • Bugfix: Initialize prevLocation for shouldUpdateScroll callback as null instead of undefined (#61)

v0.4.0

14 Apr 02:21
Compare
Choose a tag to compare
  • Breaking: Try harder to scroll to the right position (#56)
  • Feature: Support returning custom scroll position from shouldUpdateScroll (#53)

v0.3.4

01 Apr 19:43
Compare
Choose a tag to compare
  • Bugfix: Update currentKey in useStandardScroll even when suppressing scroll update

v0.3.3

11 Mar 17:23
Compare
Choose a tag to compare
  • Bugfix: Fix IE8 support

v0.3.2

11 Feb 22:46
Compare
Choose a tag to compare
  • Feature: Add shouldUpdateScroll option for controlling when to update scroll position after transitions

v0.3.1

03 Feb 17:42
Compare
Choose a tag to compare

This is a trivial release that just marks compatibility with history v2.x.

v0.3.0

13 Nov 04:30
Compare
Choose a tag to compare

This is a significant upgrade to how scroll behavior is handled.

Instead of asynchronously updating scroll position on a timer after the location update, this release updates scroll position immediately after the location update. This should avoid flashes of the incorrect scroll position.

The current API has never supported asynchronous React Router transitions particularly well, and now it really doesn't support them in any particularly elegant way. We now explicitly note this given the change to update scroll position synchronously.

v0.2.0

06 Nov 20:15
Compare
Choose a tag to compare

Three changes on this release:

  • We dropped "Behavior" from the names of the history enhancers, so it's just e.g. useStandardScroll now
  • The scroll behaviors now only set up listeners when the history is first used, and clean up properly after themselves when the histories stop being used
  • We now have test coverage on Chrome and Firefox for basic use cases

v0.1.0

05 Nov 22:05
Compare
Choose a tag to compare

This is the initial release of the scroll-behavior package. This initial release includes three scroll behaviors:

  • useScrollToTopBehavior
  • useSimpleScrollBehavior
  • useStandardScrollBehavior

Ideally, we would like useStandardScrollBehavior to be appropriate for the typical use case of imitating browser scroll behavior. This release includes the other scroll behaviors for completeness, and to allow users to compare the scroll behaviors and to offer feedback.