Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 16 additions & 0 deletions .changeset/orange-rivers-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@react-spring/animated': patch
'@react-spring/core': patch
'@react-spring/parallax': patch
'@react-spring/shared': patch
'@react-spring/konva': patch
'@react-spring/native': patch
'@react-spring/three': patch
'@react-spring/web': patch
'@react-spring/zdog': patch
'@react-spring/rafz': patch
'react-spring': patch
'@react-spring/types': patch
---

[r18] fix cleanup fluid observer in withAnimated
21 changes: 21 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"@react-spring/demo": "1.0.0",
"@react-spring/docs": "1.0.6",
"@react-spring/animated": "9.4.4",
"@react-spring/core": "9.4.4",
"@react-spring/parallax": "9.4.4",
"@react-spring/rafz": "9.4.4",
"react-spring": "9.4.4",
"@react-spring/shared": "9.4.4",
"@react-spring/types": "9.4.4",
"@react-spring/konva": "9.4.4",
"@react-spring/native": "9.4.4",
"@react-spring/three": "9.4.4",
"@react-spring/web": "9.4.4",
"@react-spring/zdog": "9.4.4"
},
"changesets": []
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/blob-npm-0.0.5-5e6b11bda5-ca6a025f11.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ob1-npm-0.66.2-e102a55adf-18f4ddecd7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/phin-npm-2.9.3-8661be52b1-7e2abd7be7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/sane-npm-4.1.0-8ab7d6a963-97716502d4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/timm-npm-1.7.1-4d0984663a-c80df538ec.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/utif-npm-2.0.1-b6892ce22a-66b0bffc18.zip
Binary file not shown.
Binary file removed .yarn/cache/uuid-npm-3.4.0-4fd8ef88ad-58de2feed6.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ws-npm-7.4.6-9c9a725604-3a990b32ed.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/xhr-npm-2.6.0-c4a4d64db8-a1db277e37.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
159 changes: 0 additions & 159 deletions cypress/integration/__snapshots__/parallax.spec.js.snap

This file was deleted.

28 changes: 22 additions & 6 deletions cypress/integration/parallax.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ const ANIMATION_WAIT = 4000

describe('Parallax - vertical', () => {
const HEIGHT = Cypress.config('viewportHeight')
const WIDTH = Cypress.config('viewportWidth')

beforeEach(() => {
cy.visit('/vertical')
})

it('should translate layers as expected', () => {
// intial snapshot
cy.findByTestId('container').toMatchSnapshot()
console.log(HEIGHT, WIDTH)

cy.findByTestId('container').matchImageSnapshot('vertical #1', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// initial layer positions
cy.findByTestId('default-layer')
Expand Down Expand Up @@ -37,7 +42,9 @@ describe('Parallax - vertical', () => {
cy.wait(ANIMATION_WAIT)

// halfway snapshot
cy.findByTestId('container').toMatchSnapshot()
cy.findByTestId('container').matchImageSnapshot('vertical #2', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// halfway layer positions
cy.findByTestId('default-layer')
Expand Down Expand Up @@ -65,7 +72,9 @@ describe('Parallax - vertical', () => {
cy.wait(ANIMATION_WAIT)

// final snapshot
cy.findByTestId('container').toMatchSnapshot()
cy.findByTestId('container').matchImageSnapshot('vertical #3', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// final layer positions
cy.findAllByTestId(/-layer/).each(layer =>
Expand All @@ -83,6 +92,7 @@ describe('Parallax - vertical', () => {
})

describe('Parallax - horizontal', () => {
const HEIGHT = Cypress.config('viewportHeight')
const WIDTH = Cypress.config('viewportWidth')

beforeEach(() => {
Expand All @@ -91,7 +101,9 @@ describe('Parallax - horizontal', () => {

it('should translate layers as expected', () => {
// intial snapshot
cy.findByTestId('container').toMatchSnapshot()
cy.findByTestId('container').matchImageSnapshot('horizontal #1', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// initial layer positions
cy.findByTestId('default-layer')
Expand Down Expand Up @@ -119,7 +131,9 @@ describe('Parallax - horizontal', () => {
cy.wait(ANIMATION_WAIT)

// halfway snapshot
cy.findByTestId('container').toMatchSnapshot()
cy.findByTestId('container').matchImageSnapshot('horizontal #2', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// halfway layer positions
cy.findByTestId('default-layer')
Expand Down Expand Up @@ -148,7 +162,9 @@ describe('Parallax - horizontal', () => {
cy.wait(ANIMATION_WAIT)

// final snapshot
cy.findByTestId('container').toMatchSnapshot()
cy.findByTestId('container').matchImageSnapshot('horizontal #3', {
clip: { x: 0, y: 0, width: WIDTH, height: HEIGHT },
})

// final layer positions
cy.findAllByTestId(/-layer/).each(layer =>
Expand Down
4 changes: 2 additions & 2 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { initPlugin } = require('cypress-plugin-snapshots/plugin')
const { addMatchImageSnapshotPlugin } = require('cypress-image-snapshot/plugin')

module.exports = (on, config) => {
initPlugin(on, config)
addMatchImageSnapshotPlugin(on, config)
return config
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
import '@testing-library/cypress/add-commands'
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command'

addMatchImageSnapshotCommand()
1 change: 0 additions & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

// Import commands.js using ES2015 syntax:
import './commands'
import 'cypress-plugin-snapshots/commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
4 changes: 2 additions & 2 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"lodash.clamp": "^4.0.3",
"lodash.shuffle": "^4.2.0",
"lorem-ipsum": "^2.0.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-feather": "^2.0.9",
"react-use-gesture": "^9.1.3",
"react-use-measure": "^2.1.1",
Expand Down
9 changes: 5 additions & 4 deletions demo/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import * as React from 'react'
import ReactDOM from 'react-dom'
import ReactDOM from 'react-dom/client'
import './index.css'
import App from './App'

ReactDOM.render(
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
</React.StrictMode>
)

// ReactDOM.createRoot(document.getElementById('root')).render(<App />)
8 changes: 4 additions & 4 deletions demo/src/sandboxes/animating-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "src/index.tsx",
"dependencies": {
"@react-spring/web": "*",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "4.0.3",
"react-use-measure": "2.0.4"
},
Expand All @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
9 changes: 4 additions & 5 deletions demo/src/sandboxes/animating-auto/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from 'react'
import ReactDOM from 'react-dom'
import ReactDOM from 'react-dom/client'
import App from './App'
import './index.css'

const rootElement = document.getElementById('root')
ReactDOM.render(
const rootElement = document.getElementById('root')!
ReactDOM.createRoot(rootElement).render(
<React.StrictMode>
<App />
</React.StrictMode>,
rootElement
</React.StrictMode>
)
8 changes: 4 additions & 4 deletions demo/src/sandboxes/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "src/index.tsx",
"dependencies": {
"@react-spring/web": "*",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-scripts": "4.0.3",
"react-use-gesture": "^9.1.3"
},
Expand All @@ -22,8 +22,8 @@
"not op_mini all"
],
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"typescript": "^4.2.3"
}
}
Loading