All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added
styleOptions.stylesRoot
property which allows to specify a container node component styles will be placed into, by @OEvgeny in PR #137
- 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
- Bumped dependencies, by @compulim in PR #95
- Updated
playground
scaffold - Production dependencies
- Non-production dependencies
- Updated
- Fixed #90. Added
@babel/runtime-corejs3
andcore-js@3
for transforming for Internet Explorer 11, by @compulim, in PR #93.
- Added a test harness, in PR #85
- 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
- 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
- Emptying container should regain stickiness, in PR #73
- Support
nonce
prop for Content Security Policy, in PR #62, PR #63 and PR #64
- Moved from
glamor@2.20.40
tocreate-emotion@10.0.27
, in PR #62
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 (
- Bump dependencies, in PR #50
- 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
- Cancel scroll animation on mouse wheel or touch gesture, in PR #49
- Calling
scrollTo
should cancel any existing scroll animation, in PR #49
- 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
- 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
- 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
*
: bumped tobabel-jest@24.8.0
,lerna@3.15.0
, andjest@24.8.0
, in PR #22
Composer
: fix #22, syntheticscroll
events crafted by Chrome should not cause stickiness to lose, in PR #23
Composer
: fix #13, user scrolling in Firefox may have the scroll position locked occasionally, in PR #12SpineTo
: fix #10, set stopping threshold from0.5
to1.5
, in PR #14Composer
: fix #15, set near-end threshold from0
to (less than)1
, in PR #16
- 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
threshold
props because the algorithm is now more robust
AutoHideFollowButton
: will now hide when it start animating scroll positionBasicScrollToBottom
: will now passdebounce
andthreshold
toComposer
, fix #2Composer
:debounce
prop to control debouncing ononScroll
event, default to17
FunctionContext
:scrollTo
now support"bottom"
, in addition to anumber
, fix #1- This will help when animating scroll position while new content was added to the panel
FunctionContext
:scrollToStart
function to scroll to the start, depends onmode
StateContext
:animating
returnstrue
if the scroll position is being animatedStateContext
:atStart
indicates if the scroll position is at the start or not, depend onmode
- Performance improvements
Context
is now separated intoFunctionContext
,InternalContext
andStateContext
for better performance and reduce exposureFunctionContext
is static and only hold functions for manipulating the panelInternalContext
is static and for internal use (to overcome shortcomings ofReact.createRef
)StateContext
is dynamic and change when scroll position change
StateContext
will now only update if there are any meaningful changes
- Added
displayName
to context lerna
bumped from2.11.0
to3.4.3
- Container class name
- Initial release