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.stylesRootproperty 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.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
- Bumped dependencies, by @compulim in PR #95
- Updated
playgroundscaffold - Production dependencies
- Non-production dependencies
- Updated
- Fixed #90. Added
@babel/runtime-corejs3andcore-js@3for transforming for Internet Explorer 11, by @compulim, in PR #93.
- Added a test harness, in PR #85
- 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
- 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
- Emptying container should regain stickiness, in PR #73
- Support
nonceprop for Content Security Policy, in PR #62, PR #63 and PR #64
- Moved from
glamor@2.20.40tocreate-emotion@10.0.27, in PR #62
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 (
- Bump dependencies, in PR #50
- 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
- Cancel scroll animation on mouse wheel or touch gesture, in PR #49
- Calling
scrollToshould 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.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
- Fix
atStartwas 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, syntheticscrollevents 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.5to1.5, in PR #14Composer: fix #15, set near-end threshold from0to (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 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
thresholdprops because the algorithm is now more robust
AutoHideFollowButton: will now hide when it start animating scroll positionBasicScrollToBottom: will now passdebounceandthresholdtoComposer, fix #2Composer:debounceprop to control debouncing ononScrollevent, default to17FunctionContext:scrollTonow support"bottom", in addition to anumber, fix #1- This will help when animating scroll position while new content was added to the panel
FunctionContext:scrollToStartfunction to scroll to the start, depends onmodeStateContext:animatingreturnstrueif the scroll position is being animatedStateContext:atStartindicates if the scroll position is at the start or not, depend onmode
- Performance improvements
Contextis now separated intoFunctionContext,InternalContextandStateContextfor better performance and reduce exposureFunctionContextis static and only hold functions for manipulating the panelInternalContextis static and for internal use (to overcome shortcomings ofReact.createRef)StateContextis dynamic and change when scroll position change
StateContextwill now only update if there are any meaningful changes
- Added
displayNameto context lernabumped from2.11.0to3.4.3
- Container class name
- Initial release