Skip to content

Releases: compulim/react-scroll-to-bottom

[4.2.0] - 2021-10-14

[4.1.2] - 2021-05-18

14 Oct 11:30
Compare
Choose a tag to compare

Changed

Fixed

  • Fixed #90. Added @babel/runtime-corejs3 and core-js@3 for transforming for Internet Explorer 11, by @compulim, in PR #93.

[4.1.1] - 2021-05-14

14 May 01:02
Compare
Choose a tag to compare

Added

  • Added a test harness, in PR #85

Fixed

  • Fixed #75. If debug is set, it will show debug in console log. If not specified, it will fallback to NODE_ENV === 'production', in PR #77.
  • Fixed #84. Fixed a race condition: while under heavy load, sticky, and at the end, calling useScrollTo() to any positions, the scroll view may scroll back to the bottom immediately, in PR #85

[4.1.0] - 2021-01-04

14 May 01:02
Compare
Choose a tag to compare

Added

  • Added scroller prop for limiting scroll distance when mode is set to bottom, in PR #73
  • Added initialScrollBehavior prop for first scroll behavior. When set to "auto" (discrete scrolling), it will jump to end on initialization. in PR #73
  • Added debug prop for dumping debug log to console, in PR #73
  • Improved performance by separating StateContext into 2 tiers, in PR #73

Fixed

  • Emptying container should regain stickiness, in PR #73

[4.0.0] - 2020-09-01

14 May 01:03
Compare
Choose a tag to compare

Added

Changed

  • Moved from glamor@2.20.40 to create-emotion@10.0.27, in PR #62

[3.0.0] - 2020-06-22

14 May 01:03
Compare
Choose a tag to compare

Breaking changes

  • scrollToBottom/scrollToEnd/scrollToStart/scrollToTop now accept an option { behavior: 'auto' | 'smooth' }
    • Without the option, it is by default to artificial smooth scrolling (smooth), to keep existing behavior
    • This behavior may change in the future, by defaulting to discrete scrolling (auto), to better align with HTML DOMElement.scrollIntoView standard
    • During the transition, please always pass { behavior: 'smooth' } to keep existing behavior

Changed

Added

  • Added version number to <meta name="react-scroll-to-bottom:version"> for diagnostic purpose, in PR #51
  • Added useAnimatingToEnd getter to indicate if it is animating towards to the end, in PR #49
    • The existing useAnimating getter only indicate if it is animating to any scroll positions
  • Added scrollTo function to scroll to a specific scrollTop value, this is similar to DOMElement.scrollIntoView(), in PR #49
    • The signature is scrollTo(scrollTop: number, options: { behavior: 'auto' | 'smooth' })
    • Pass { behavior: 'smooth' } for synthetic smooth scrolling
  • Added useObserveScrollTop hook to observe scroll event, in PR #49
    • This effect function will be called rapidly on scroll, please avoid expensive code such as calling setter of useState and any code that would cause re-render

Fixed

  • Cancel scroll animation on mouse wheel or touch gesture, in PR #49
  • Calling scrollTo should cancel any existing scroll animation, in PR #49

[2.0.0] - 2020-05-07

08 May 02:39
Compare
Choose a tag to compare

Breaking changes

  • We moved to React Hooks and it requires React 16.8.6 or up
    • Hooks will allow us to write simpler and more maintainable code
    • Developers can use our React Hooks to perform various operations

Changed

Added

Fixed

  • Fix atStart was not reporting correctly, in PR #31
  • Chrome: Fix scroll to bottom button should hide when using TAB to scroll the bottommost button into view, in PR #46

[1.3.2] - 2019-06-20

20 Jun 23:43
Compare
Choose a tag to compare

Changed

  • *: bumped to babel-jest@24.8.0, lerna@3.15.0, and jest@24.8.0, in PR #22

Fixed

  • Composer: fix #22, synthetic scroll events crafted by Chrome should not cause stickiness to lose, in PR #23

[1.3.1] - 2019-02-13

13 Feb 22:57
Compare
Choose a tag to compare

Changed

  • Composer: fix #13, user scrolling in Firefox may have the scroll position locked occasionally, in PR #12
  • SpineTo: fix #10, set stopping threshold from 0.5 to 1.5, in PR #14
  • Composer: fix #15, set near-end threshold from 0 to (less than) 1, in PR #16

[1.3.0] - 2019-01-21

22 Jan 04:13
Compare
Choose a tag to compare

Changed

  • Playground: bumped to react@16.6.0, react-dom@16.6.0, and react-scripts@2.1.6
  • *: Update algorithm, instead of using componentDidUpdate, we now use setInterval to check if the panel is sticky or not, this help to track content update that happen outside of React lifecycle, for example, HTMLImageElement.onload event
  • Composer: scrollTo() now accepts "100%" instead of "bottom"

Removed

  • Removed threshold props because the algorithm is now more robust