-
Notifications
You must be signed in to change notification settings - Fork 555
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
Update fastdom #23076
Update fastdom #23076
Conversation
PRbuilds results: Screenshots 💚 A11y validation 💚 Microdata Validation Apache Benchmark Load Testing LightHouse Reporting --automated message |
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 and chunky 🐘, but maybe the API update and the other changes should be split into different PRs?
const transform = (1 - expectedPage) * 100; | ||
|
||
expect( | ||
(document.querySelector( | ||
'.js-carousel-pages' | ||
): any).getAttribute('style') | ||
).toEqual( | ||
`-webkit-transform: translate(${transform || '-000'}%, 0);` |
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.
For another PR!
@@ -11,7 +11,7 @@ beforeEach(() => { | |||
}); | |||
|
|||
test('gets info', () => { | |||
const el = $('.originalClassName'); | |||
const el = $('.originalClassName').get(0); |
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.
Another PR?
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 would but then the tests won't pass!
@@ -57,7 +57,7 @@ describe('Container Toggle', () => { | |||
const toggle = new ContainerToggle(container); | |||
toggle.addToggle(); | |||
|
|||
fastdom.defer(1, () => { | |||
fastdom.mutate(() => { |
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.
👍
@@ -8,7 +8,7 @@ Before | After | |||
|
|||
## Fastdom | |||
|
|||
**Do not use fastdom** when inserting elements with steady page. The utility uses fastdom under the hood to read and write where required. It batches the insertion of elements, so that if multiple elements are queued in the same animation frame they will be inserted in the same fastdom.write and the position scrolled once to prevent excessive page jumping. | |||
**Do not use fastdom** when inserting elements with steady page. The utility uses fastdom under the hood to read and write where required. It batches the insertion of elements, so that if multiple elements are queued in the same animation frame they will be inserted in the same fastdom.mutate and the position scrolled once to prevent excessive page jumping. |
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.
The steadypage utility was on for about half an hour and then we realised it was causing problems so I meant to fix it and that was like 4 years ago. 😆 (Not saying it's anything in this PR but probably something I can remove!)
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.
alpha4life
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.
Bit hard to review I guess, but looks good to me, +1 on upgrading it!
i know – thank you! i think there must be a better way of managing these kind of small-but-sweeping changes. think a few may be on the way with commercial stuff... |
Seen on PROD (merged by @sndrs 20 minutes and 56 seconds ago)
|
What does this change?
0.8.5
to1.0.9
)fastdom-promisify
projects/common/modules/identity/modules/switch.spec.js
projects/commercial/modules/hosted/onward-journey-carousel.spec.js
Why?
was looking to move
fastdom-promisify
to libs and/or usefastdom
as a peerDep in commercial-core, and as i went to install it I realised the entire api had changed since we last updated it.we're missing out on fixes (and types) and it would be valuable to be able to declare it as an up-to-date peerDep soon
Does this change need to be reproduced in dotcom-rendering ?