Skip to content

v9.0.0 #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
92b79fb
improved masonry grid
aleclarson Apr 7, 2019
0f0ed9b
fix: blackflag demo
aleclarson Apr 9, 2019
c97e3e4
fix: notification-hub demo
aleclarson Apr 9, 2019
050a548
fix: "trails" demo
aleclarson Apr 15, 2019
430bca4
nit: remove unsupported prop
aleclarson Apr 15, 2019
d036ed1
add demo for issue 436
aleclarson Apr 16, 2019
f085563
add tests for some GH issues
aleclarson Apr 19, 2019
bd5b23c
feat: support sass/scss files
aleclarson Apr 19, 2019
f0dfb13
chore: remove old bugs folder
aleclarson Apr 19, 2019
0d75c40
slightly improve "flip-card" demo
aleclarson Apr 19, 2019
7b57601
better debug logs for "notification-hub"
aleclarson Apr 19, 2019
546a5ae
feat: improved "script" demo
aleclarson Apr 19, 2019
eacd827
add import comment to index.js
aleclarson Apr 19, 2019
413b5db
add issues to components/examples-tests.js
aleclarson Apr 19, 2019
80d876e
feat: more issue-related tests
aleclarson Apr 30, 2019
d47a2ec
feat: convert "chain-animation" to typescript
aleclarson Apr 30, 2019
55d7f26
fix: async "script" demo
aleclarson Apr 30, 2019
24fcafa
fix(ts): add missing @types packages
aleclarson Apr 30, 2019
89153bf
fix: "freshtilledsoil" demo
aleclarson May 7, 2019
647f36a
feat: support react-spring monorepo
aleclarson Jun 4, 2019
5f05a11
chore: add favicon
aleclarson Jun 4, 2019
d2f08d8
build: use awesome-typescript-loader
aleclarson Jun 4, 2019
b086387
build: fix sourcemaps
aleclarson Jun 4, 2019
b57ca70
build: fix resolve.alias
aleclarson Jun 4, 2019
b75df27
chore: update yarn.lock
aleclarson Jun 4, 2019
98ebc4f
fix: type checking
aleclarson Jun 7, 2019
6c42df8
chore: upgrade prettier
aleclarson Jun 7, 2019
9e9f6c3
fix: webpack aliases
aleclarson Jun 9, 2019
fda7f65
chore: update tsconfig.json
aleclarson Jun 9, 2019
6e38a1f
chore: fix "start" script
aleclarson Jun 9, 2019
5b4511a
fix: local package aliases in webpack.config.js
aleclarson Jun 12, 2019
4cb799b
update dependencies, switch examples to .to() interp
drcmda Jul 1, 2019
e3b2222
feat: add "sorted-clicks" demo
aleclarson Oct 2, 2019
953f9d9
chore: tweak webpack config
aleclarson Jul 10, 2019
38d2d6c
wip: useTransition rework
aleclarson Jul 10, 2019
4b5d75e
chore: added react-use-gesture
dbismut Aug 30, 2019
de180ac
chore: replaced react-with-gesture with react-use-gesture
dbismut Aug 30, 2019
5709590
nit: using convenience transform props
dbismut Aug 30, 2019
e160542
chore: added react-use-gesture
dbismut Aug 30, 2019
8cce0ad
feat: added clamp-bounce example
dbismut Aug 30, 2019
8f0ec1e
feat: added inertia example
dbismut Aug 30, 2019
6cbef6a
nit: pass "y" to animated style in "list-reordering"
aleclarson Sep 13, 2019
d99f73f
fix: multistage-transitions example
aleclarson Sep 13, 2019
6cda8b5
chore: convert some examples to new useTransition signature
aleclarson Sep 14, 2019
68c42ba
chore: update demos for #809
aleclarson Sep 18, 2019
2e3f820
fix: call "start" method in "inertia" demo
aleclarson Sep 29, 2019
f52ddc6
fix: emulate "unique: false" in simple-transition demo
aleclarson Sep 29, 2019
d57096d
nit: remove console.log calls
aleclarson Oct 6, 2019
bd13ca8
fix: use new "velocity" property
aleclarson Oct 6, 2019
0bb11e6
feat: add "parallax" test
aleclarson Oct 13, 2019
20a5739
chore: update yarn.lock
aleclarson Oct 13, 2019
b4b9f37
feat: add linear-gradient demo
aleclarson Oct 15, 2019
d10553d
feat: add "issue-707" test
aleclarson Oct 15, 2019
12d5089
chore: update react-use-gesture
dbismut Nov 16, 2019
60a84aa
chore: update to react-use-gesture v6
dbismut Nov 16, 2019
9ba3923
fix: import {Spring, animated} from react-spring
dbismut Nov 16, 2019
a98e7ed
chore: switched to functional component
dbismut Nov 16, 2019
55c5776
chore: work correctly
dbismut Nov 16, 2019
c0569d9
chore: works but needs conversion to functional component
dbismut Nov 16, 2019
0ffbbc3
chore: no error but requires animation fix
dbismut Nov 16, 2019
96000b0
chore: red error when moving to v9
dbismut Nov 16, 2019
3ba1375
chore: remove leftover logs
aleclarson Nov 27, 2019
1f541d9
fix: bugs in multistage-transitions demo
aleclarson Nov 27, 2019
551bab2
fix: add "key" prop in sorted-clicks demo
aleclarson Nov 27, 2019
b7e9376
fix: default to examples-hooks and DEBUG=false
aleclarson Nov 27, 2019
df47e60
fix: list-reordering demo
aleclarson Dec 25, 2019
5935a3b
fix(masonry-grid): disable unmounting
aleclarson May 3, 2020
ced0d23
chore: disable unfinished examples
aleclarson May 3, 2020
09b5094
test: multiple targets
aleclarson May 3, 2020
427aeb0
feat: add a bunch of issue-related tests
aleclarson May 3, 2020
0d62315
chore: install three and r3f
aleclarson May 3, 2020
0bda085
chore: upgrade react-use-gesture
aleclarson May 3, 2020
c142781
chore: update lockfile
aleclarson May 3, 2020
1a6951a
fix: prevent whole rerender on tag hover
aleclarson May 7, 2020
9626d9b
feat: add SpringContext test
aleclarson May 7, 2020
9b4103f
feat: add test for issue 738
aleclarson May 7, 2020
55cfadd
chore: upgrade typescript
aleclarson May 7, 2020
8cc9ae8
nit: tweak the "notification-hub" example
aleclarson May 15, 2020
374cffc
nit: tweak the "issue-907" test
aleclarson May 15, 2020
a40ae0a
feat: add test for pausing/resuming a loop
aleclarson May 15, 2020
cb6f20f
feat: add `Logs` component
aleclarson May 21, 2020
38b3fb6
chore: update lockfile
May 21, 2020
10d9259
fix: call `console.error` when a demo throws an error
aleclarson May 22, 2020
14b8219
feat: add `DevTools` component
aleclarson May 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@ Demos will be live at http://localhost:8080
# Contributors

1. clone react-spring and react-spring-examples under the same root folder
````

```
/root
/react-spring
/react-spring-examples
````
```

2. yarn/npm install both
3. cd react-spring-examples
4. edit index.js
````

```
import examples from './components/examples-tests'

//const DEBUG = false
const DEBUG = 'latestbug'
````
```

5. go to /demos/tests/latestbug and set up a demo that reproduces the problem
6. npm start, you can now make hot-reload edits in both repos (react-spring and react-spring-examples)
7. you can test integrity by running all examples, edit index.js again:
````

```
import examples from './components/examples-hooks'

const DEBUG = false
//const DEBUG = 'latestbug'
````
```
62 changes: 32 additions & 30 deletions components/Demo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'
import Loadable from 'react-loadable'
import styled from 'styled-components'

Expand All @@ -9,6 +9,7 @@ class ErrorBoundary extends React.Component {
}

static getDerivedStateFromError(error) {
console.error(error)
return { hasError: true }
}

Expand All @@ -19,7 +20,7 @@ class ErrorBoundary extends React.Component {
}

export default class Demo extends React.Component {
state = { code: undefined, visible: false }
state = { visible: false }
constructor(props) {
super()
this.component = Loadable({
Expand All @@ -33,19 +34,13 @@ export default class Demo extends React.Component {

setVisible = visible => this.setState({ visible })

enter = tag =>
this.props.code &&
this.props.code[tag] &&
this.setState({ code: this.props.code[tag] })
leave = tag => this.setState({ code: undefined })

render() {
const {
title,
description,
code,
tags,
link,
code,
overlayCode = true,
fullscreen = false,
} = this.props
Expand All @@ -62,21 +57,7 @@ export default class Demo extends React.Component {
</p>
)}
{description && <p>{description}</p>}
{tags && (
<p>
{tags.map(tag => (
<Tag
key={tag}
children={tag}
onMouseEnter={() => this.enter(tag)}
onMouseLeave={() => this.leave(tag)}
style={{
background: code && code[tag] ? '#5f5f5f' : '#9f9f9f',
}}
/>
))}
</p>
)}
{tags && <TagList tags={tags} code={code} />}
</Header>
<Content>
<ErrorBoundary>
Expand All @@ -98,6 +79,27 @@ export default class Demo extends React.Component {
}
}

const TagList = props => {
const [code, setCode] = useState(undefined)
return (
<p>
{props.tags.map(tag => (
<Tag
key={tag}
children={tag}
onMouseEnter={() =>
props.code && props.code[tag] && setCode(props.code[tag])
}
onMouseLeave={() => setCode(undefined)}
style={{
background: code && code[tag] ? '#5f5f5f' : '#9f9f9f',
}}
/>
))}
</p>
)
}

const Container = styled('div')`
position: relative;
width: 100%;
Expand All @@ -114,12 +116,12 @@ const Header = styled('div')`
'Segoe UI Symbol';

& > h1 {
margin: 0 0 0.17em 0!important;
text-transform: uppercase!important;
color: rgba(0, 0, 0, 0.85)!important;
font-size: 13.6px!important;
font-weight: 500!important;
line-height: 19.9px!important;
margin: 0 0 0.17em 0 !important;
text-transform: uppercase !important;
color: rgba(0, 0, 0, 0.85) !important;
font-size: 13.6px !important;
font-weight: 500 !important;
line-height: 19.9px !important;
}

& > p {
Expand Down
16 changes: 16 additions & 0 deletions components/examples-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ return <animated.div style={{ transform }} children="Slide">`,
link: 'https://codesandbox.io/embed/r5qmj8m6lq',
tags: ['useSprings'],
},
// {
// name: 'hooks/inertia',
// title: 'Inertia',
// tags: ['useSprings'],
// },
// {
// name: 'hooks/clamp-bounce',
// title: 'Clamp bounce',
// tags: ['useSprings'],
// },
{
name: 'hooks/mouse-parallax',
title: 'Mouse parallax',
Expand Down Expand Up @@ -246,4 +256,10 @@ return items.map(i =>
link: 'https://codesandbox.io/embed/rloj7nw3pn',
tags: ['useSpring'],
},
// {
// name: 'hooks/sorted-clicks',
// title: 'Sort items by number of clicks',
// link: 'https://codesandbox.io/embed/rloj7nw3pn',
// tags: ['useSprings'],
// },
]
78 changes: 52 additions & 26 deletions components/examples-renderprops.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,157 +2,183 @@ export default [
{
name: 'renderprops/parallaxvert',
title: 'Vertical Parallax',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/parallaxvert',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/parallaxvert',
tags: ['parallax'],
},
{
name: 'renderprops/parallax',
title: 'Horizontal Parallax',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/parallax',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/parallax',
tags: ['parallax'],
},
{
name: 'renderprops/transitions',
title: 'Transitions',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/transitions',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/transitions',
tags: ['transitions'],
},
{
name: 'renderprops/nativespring',
title: 'Native springs',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/nativespring',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/nativespring',
tags: ['native', 'springs'],
},
{
name: 'renderprops/areas',
title: 'D3 areas',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/areas',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/areas',
tags: ['vx', 'd3', 'transitions'],
},
{
name: 'renderprops/trails',
title: 'Trails',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/trails',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/trails',
tags: ['trails'],
},
{
name: 'renderprops/pagetransitions',
title: 'Simple Page transitions',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/pagetransitions',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/pagetransitions',
tags: ['transitions'],
},
{
name: 'renderprops/reveals',
title: 'Simple reveals',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/reveals',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/reveals',
tags: ['transitions'],
},
{
name: 'renderprops/gestures',
title: 'Gestures',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/gestures',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/gestures',
tags: ['springs', 'gestures'],
},
{
name: 'renderprops/timing',
title: 'Scripted keyframes',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/timing',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/timing',
tags: ['keyframes'],
},
{
name: 'renderprops/simple-spring',
title: 'Simple spring',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/simple-spring',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/simple-spring',
tags: ['springs'],
},
{
name: 'renderprops/tree',
title: 'D3 Tree view',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/tree',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/tree',
tags: ['d3', 'vx', 'transitions'],
},
{
name: 'renderprops/grid',
title: 'Grid view',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/grid',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/grid',
tags: ['transitions', 'trails'],
},
{
name: 'renderprops/list',
title: 'List re-ordering',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/list',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/list',
tags: ['transitions'],
},
{
name: 'renderprops/morph',
title: 'SVG morphing',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/morph',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/morph',
tags: ['flubber', 'svg', 'springs'],
},
{
name: 'renderprops/sunburst',
title: 'D3 sunburst',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/sunburst',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/sunburst',
tags: ['d3', 'vx', 'springs'],
},
{
name: 'renderprops/treeview',
title: 'Tree view',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/treeview',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/treeview',
tags: ['springs'],
},
{
name: 'renderprops/keyframes',
title: 'Panel Keyframes',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/keyframes',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/keyframes',
tags: ['keyframes', 'springs', 'trails'],
},
{
name: 'renderprops/script',
title: 'Scripted keyframes',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/script',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/script',
tags: ['keyframes'],
},
{
name: 'renderprops/auto',
title: 'Auto',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/auto',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/auto',
tags: ['springs', 'auto'],
},
{
name: 'renderprops/router',
title: 'react-router',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/router',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/router',
tags: ['react-router', 'transitions'],
},
{
name: 'renderprops/scroll',
title: 'animating scroll',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/scroll',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/scroll',
tags: ['springs', 'scroll'],
},
{
name: 'renderprops/dashoffset',
title: 'SVG dashOffset',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/dashoffset',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/dashoffset',
tags: ['SVG', 'springs'],
},
{
name: 'renderprops/transitiongroup',
title: 'Multistage transitions',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/transitiongroup',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/transitiongroup',
tags: ['transitions'],
},
{
name: 'renderprops/chat',
title: 'Chat',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/chat',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/chat',
tags: ['transitions'],
},
{
name: 'renderprops/messages',
title: 'Notifications',
link: 'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/notifications',
link:
'https://github.com/react-spring/react-spring-examples/tree/master/demos/renderprops/notifications',
tags: ['transitions'],
},
]
Loading