Skip to content
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

Tiled gallery: Use requestAnimationFrame for resize handling #29016

Merged
merged 1 commit into from
Dec 3, 2018

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Dec 1, 2018

Changes proposed in this Pull Request

  • Use requestAnimationFrame for resize observer handling

Testing instructions

gutenpack-jn

  • Insert a tiled gallery and resize the editor.
  • You can use an existing infinite loop bug to see how much smoother it is by applying left or right block alignment. See screens.

This version should deliver significantly better results.

Demo

Before

https://cloudup.com/cRMQ6_H66kG

After

https://cloudup.com/cT8GLQdfFYL

Part of #28978

@matticbot
Copy link
Contributor

@ghost
Copy link

ghost commented Dec 1, 2018

Warnings
⚠️

The PR is missing at least one [Status] label. Suggestions: [Status] In Progress, [Status] Needs Review

This is an automated check which relies on PULL_REQUEST_TEMPLATE. We encourage you to follow that template as it helps Calypso maintainers do their job. If you think 'Testing instructions' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS

@sirreal sirreal requested a review from simison December 1, 2018 22:15
@sirreal sirreal self-assigned this Dec 1, 2018
@sirreal sirreal added [Type] Enhancement Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Type] Performance [Goal] Gutenberg Working towards full integration with Gutenberg [Block] Tiled Gallery labels Dec 1, 2018
@sirreal sirreal requested review from MichaelArestad and a team and removed request for simison December 1, 2018 22:16
@sirreal sirreal requested review from simison and removed request for a team December 1, 2018 22:55
width,
} );
}
function handleResize( entries ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really like to get all the resize handling using the same code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, that would be good 👍

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it! 😍

Sooo funny that we can use an existing bug to test this. 😆

🚢

@simison simison added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 3, 2018
@sirreal sirreal merged commit d9c2b97 into master Dec 3, 2018
@sirreal sirreal deleted the update/g7g-tg-use-reqaniframe branch December 3, 2018 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants