-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block Editor: update react-spring to 9.2.4 #30979
Conversation
Can we get some testing here. It would be cool to get this issue fixed for 5.8 |
I'm still able to reproduce the original issue. Tested on macOS Big Sur / Firefox 88 CleanShot.2021-05-05.at.15.12.42.mp4 |
Also looking at the tests, it seems this PR might not be building properly. |
2e67823
to
6edb026
Compare
The |
So with FF + React Spring 9.1.2 animations do work, but it looks like there's quite a bit of jank going on when v9.1.2.mp4 |
Size Change: +7.81 kB (+1%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
@talldan how do we enable the block navigator movers UI (or is this no longer exposed?) #18014 @youknowriad do you know who'd be good to ping to double check what's going on with package.json and source map issues? |
packages/block-editor/package.json
Outdated
"@react-spring/core": "^9.1.2", | ||
"@react-spring/shared": "^9.1.2", | ||
"@react-spring/types": "^9.1.2", | ||
"@react-spring/web": "^9.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need all these dependencies here since we're only using the "web" package directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably don't. I was having trouble getting a plain react-spring import working vs pointing at the web package. I can revisit.
Sorry missed the comments here. I think @gziolo would be the best person for package and package-lock related things |
🙈 So when 'privacy.resistFingerprinting' is true FF will reduce the javascript time precision to 100 ms!
https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#reduced_time_precision We might need to test if we need to add the following headers to enable higher precision:
|
efec104
to
c32727d
Compare
This one is ready for review. Dusting this one off since it may be harder to replace the last two usages of React Spring in favor of framer at the moment. (We'll need other performance improvements to do so). |
"redux-multi": "^0.1.12", | ||
"rememo": "^3.0.0", | ||
"tinycolor2": "^1.4.2", | ||
"traverse": "^0.6.6" | ||
}, | ||
"dependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it is here. It looks like it can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, updated in 317f1d8.
The only dependencies for web should be the following:
Maybe it was a stray item from when I was testing other imports. To fix this, I removed the entry for "@react-spring/web": "^9.2.4",
in package.json, npm install
, then added it back with another npm install
and it didn't appear to return.
c32727d
to
317f1d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good, thank you for bringing this dependency up to date.
Thanks for the review @gziolo I'll land once tests are green |
Thanks, I ended up needing to restart almost all the jobs. I'd be curious to see what the bug turns out to be for the cb issue. It smells like a cache issue, but sounds like it may be on the network layer. Have folks reproduced this on a local docker env? |
The jobs that fail have npm cache primed, so it’s rather related to installation process. One thing we suspect is related to forked packages that use git urls. Anyway, it might be everything 😅 |
closes #32398
This PR updates react-spring to 9.2.4. This should fix overlapping blocks in FF #19476 when
privacy.resistFingerprinting
is set to true inabout:config
. Note that whenprivacy.resistFingerprinting
is enabled, animations will not be as smooth due to the reduced time precision 100ms or more (https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#reduced_time_precision).There are a few breaking changes from React Spring 8 -> 9, most notably in the refactor of useTransition and rename of onFrame -> onChange. We'll want to verify that block moving animations still work in the list view and editor block list.
https://aleclarson.github.io/react-spring/v9/
https://aleclarson.github.io/react-spring/v9/breaking-changes/
Testing Instructions
CleanShot.2021-09-09.at.14.48.56.mp4