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.1concurrently@6.3.0esbuild@0.13.5eslint-plugin-prettier@4.0.0eslint-plugin-react@7.26.1eslint@7.32.0husky@7.0.2istanbul-lib-coverage@3.0.2jest-environment-node@27.2.5jest-image-snapshot@4.5.1jest@27.2.5lerna@4.0.0lint-staged@11.2.3lorem-ipsum@2.0.4node-fetch@2.6.5nodemon@2.0.13prettier@2.4.1react-dom@16.14.0react-scripts@4.0.3react@16.14.0selenium-webdriver@4.0.0-rc-2serve@12.0.1strip-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
debugis 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
scrollerprop for limiting scroll distance whenmodeis set tobottom, in PR #73 - Added
initialScrollBehaviorprop for first scroll behavior. When set to"auto"(discrete scrolling), it will jump to end on initialization. in PR #73 - Added
debugprop for dumping debug log to console, in PR #73 - Improved performance by separating
StateContextinto 2 tiers, in PR #73
Fixed
- Emptying container should regain stickiness, in PR #73
[4.0.0] - 2020-09-01
Added
- Support
nonceprop for Content Security Policy, in PR #62, PR #63 and PR #64
Changed
- Moved from
glamor@2.20.40tocreate-emotion@10.0.27, in PR #62
[3.0.0] - 2020-06-22
Breaking changes
scrollToBottom/scrollToEnd/scrollToStart/scrollToTopnow 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.scrollIntoViewstandard - 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
useAnimatingToEndgetter to indicate if it is animating towards to the end, in PR #49- The existing
useAnimatinggetter only indicate if it is animating to any scroll positions
- The existing
- Added
scrollTofunction to scroll to a specificscrollTopvalue, 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
useObserveScrollTophook 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
useStateand 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.4babel-eslint@10.1.0babel-jest@26.0.1eslint-plugin-prettier@3.1.3eslint-plugin-react-hooks@4.0.0eslint-plugin-react@7.19.0eslint@6.8.0jest@26.0.1lerna@3.20.2lorem-ipsum@2.0.3prettier@2.0.5react-interval@2.1.1react-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 usesetIntervalto check if the panel is sticky or not, this help to track content update that happen outside of React lifecycle, for example,HTMLImageElement.onloadeventComposer:scrollTo()now accepts"100%"instead of"bottom"
Removed
- Removed
thresholdprops because the algorithm is now more robust