From f7b28597b41042f02940839ebb152e4752ad95e1 Mon Sep 17 00:00:00 2001 From: bySabi Files Date: Fri, 6 Jul 2018 22:54:58 +0200 Subject: [PATCH] bump version 6.0.0 --- CHANGELOG.md | 8 ++++++++ CONTRIBUTING.md | 10 ---------- README.md | 22 ++++++++++++++-------- package.json | 2 +- 4 files changed, 23 insertions(+), 19 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fe0873..73c6c54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## master (unreleased) +## 6.0.0 + +`Scrollchor` React component now belong to `Some React Component` Organization Team. This move will ensure its future development and manteniance. + +- Added configurable `scrollable container` feature, `target` prop. Thanks to @xephuk dedicated effort. +- [@xehpuk](https://github.com/xehpuk) join `React-Schollchor` Team +- minor Doc corrections + ## 5.1.0 - Replace internal function `updateHistory` implementation for prevent scroll jumps on browser history update diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index a6b5e76..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -We love pull requests. Here's a quick guide: - -1. Fork the repo. -2. Run the tests. We only take pull requests with passing tests, and it's great - to know that you have a clean slate: `npm install && npm test`. -3. Add a test for your change. Only refactoring and documentation changes - require no new tests. If you are adding functionality or fixing a bug, we - need a test! -4. Make the test pass. -5. Push to your fork and submit a pull request. diff --git a/README.md b/README.md index 2a08d73..eb6a6fb 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ See it in action: `hash` is the `id` of a HTML tag on current page. - ## Installation ### npm @@ -108,9 +107,9 @@ export default (props) => ( ### Reactive `props` Update `props` will re-render `Scrollchor` element -Ex: [updating "to" prop](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L28) +Example: [updating "to" prop](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L28) -## Custom animation +## Custom animations Animation behavior can be customized: @@ -132,15 +131,15 @@ This setting is equivalent to default jQuery.animate `easing: swing` ## `before` and `after` Animate callbacks -Use these callbacks to trigger behaviors like, for example, update state, load async stuff, etc. +Use these callbacks to trigger behaviors like: update state, load async stuff, etc. ```js updateState(this)}>Home ``` ## Simulate click API -Scrollchor includes a dedicate API for init animate scroll programmatically that works like normal click events using `simulateClick()`. +Scrollchor includes a dedicate API to do animate scroll programmatically that works like normal click events using `simulateClick()`. -Ex: [using simulateClick](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L17) +Example: [using simulateClick](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L16) When used programmatically, some use-cases don't need `anchor tags`. On these cases use childless `Scrollchor`. @@ -149,7 +148,7 @@ This component will render `null` and the user is reponsible for storing the com ```js (this._back = ref)} to="_back" /> ``` -Ex: [calling `simulateClick()` on childless `ref`](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L16) +Example: [calling `simulateClick()` on childless `ref`](https://github.com/some-react-components/react-scrollchor/blob/example/src/App.js#L16) ```js _afterAnimate = () => { this.setState({ to: this._iterator.next().value }); @@ -157,7 +156,14 @@ _afterAnimate = () => { }; ``` -## Example +## Scrollable ancestor container +Scrollchor works within any scrollable parent container. The root element of the `document` will be choose if none is specified. + +Hosted example show how to use a different container using prop `target`. +* Click `Within scrollable container` checkbox: [hosted example](https://some-react-components.github.io/react-scrollchor/)(full example below) + + +## Full Example [react-scrollchor--example](https://github.com/some-react-components/react-scrollchor/tree/example) diff --git a/package.json b/package.json index 52b7f71..83eef52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-scrollchor", - "version": "5.1.0", + "version": "6.0.0", "description": "A React component for scroll to #hash links with smooth animations", "files": [ "lib"