Releases: compulim/react-scroll-to-bottom
Releases · compulim/react-scroll-to-bottom
[4.2.0] - 2021-10-14
Changed
- Added support of GitHub Codespaces, by @compulim in PR #104
- Changed peer dependencies requirement to
react >= 16.8.6
, by @compulim in PR #104 - Bumped dependencies, by @compulim in PR #104
- Production dependencies
- Non-production dependencies
@babel/cli@7.15.7
@babel/core@7.15.8
@babel/preset-env@7.15.8
@testing-library/jest-dom@5.14.1
concurrently@6.3.0
esbuild@0.13.5
eslint-plugin-prettier@4.0.0
eslint-plugin-react@7.26.1
eslint@7.32.0
husky@7.0.2
istanbul-lib-coverage@3.0.2
jest-environment-node@27.2.5
jest-image-snapshot@4.5.1
jest@27.2.5
lerna@4.0.0
lint-staged@11.2.3
lorem-ipsum@2.0.4
node-fetch@2.6.5
nodemon@2.0.13
prettier@2.4.1
react-dom@16.14.0
react-scripts@4.0.3
react@16.14.0
selenium-webdriver@4.0.0-rc-2
serve@12.0.1
strip-ansi@6.0.1
[4.1.2] - 2021-05-18
[4.1.1] - 2021-05-14
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 toNODE_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
Added
- Added
scroller
prop for limiting scroll distance whenmode
is set tobottom
, 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
Added
- Support
nonce
prop for Content Security Policy, in PR #62, PR #63 and PR #64
Changed
- Moved from
glamor@2.20.40
tocreate-emotion@10.0.27
, in PR #62
[3.0.0] - 2020-06-22
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 HTMLDOMElement.scrollIntoView
standard - During the transition, please always pass
{ behavior: 'smooth' }
to keep existing behavior
- Without the option, it is by default to artificial smooth scrolling (
Changed
- Bump dependencies, in PR #50
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
- The existing
- Added
scrollTo
function to scroll to a specificscrollTop
value, this is similar toDOMElement.scrollIntoView()
, in PR #49- The signature is
scrollTo(scrollTop: number, options: { behavior: 'auto' | 'smooth' })
- Pass
{ behavior: 'smooth' }
for synthetic smooth scrolling
- The signature is
- 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
- This effect function will be called rapidly on scroll, please avoid expensive code such as calling setter of
Fixed
[2.0.0] - 2020-05-07
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
- Moved all code to React functional components, in PR #31
*
: bump dependencies, in PR #47@babel/cli@7.8.4
@babel/core@7.9.6
@babel/plugin-proposal-object-rest-spread@7.9.6
@babel/preset-env@7.9.6
@babel/preset-react@7.9.4
babel-eslint@10.1.0
babel-jest@26.0.1
eslint-plugin-prettier@3.1.3
eslint-plugin-react-hooks@4.0.0
eslint-plugin-react@7.19.0
eslint@6.8.0
jest@26.0.1
lerna@3.20.2
lorem-ipsum@2.0.3
prettier@2.0.5
react-interval@2.1.1
react-scripts@3.4.1
*
: bump dependencies, in PR #31*
: bump dependencies, in PR #27
Added
Fixed
[1.3.2] - 2019-06-20
[1.3.1] - 2019-02-13
[1.3.0] - 2019-01-21
Changed
- Playground: bumped to
react@16.6.0
,react-dom@16.6.0
, andreact-scripts@2.1.6
*
: Update algorithm, instead of usingcomponentDidUpdate
, we now usesetInterval
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
eventComposer
:scrollTo()
now accepts"100%"
instead of"bottom"
Removed
- Removed
threshold
props because the algorithm is now more robust