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

Draw FoamTree labels also during animation #414

Merged
merged 3 commits into from Jan 20, 2021

Conversation

stanislawosinski
Copy link
Contributor

This should improve the user experience and should still be fairly smooth on recent hardware.

… smooth on recent hardware.

(cherry picked from commit 17716db)
@valscion
Copy link
Member

Thanks! Would you be able to showcase the difference in behavior with a small screencap or something? It would make it easier to understand how this behavior has changed now ☺️

@stanislawosinski
Copy link
Contributor Author

Before:

labels-during-zooming-before.mp4

After:

labels-during-zooming-after.mp4

@valscion
Copy link
Member

Ooh neat! Thanks for the video, this helps me understand this change a lot better ☺️

Would you be able to write a small changelog entry about this change?

@th0r
Copy link
Collaborator

th0r commented Jan 20, 2021

I'm not sure about this change as it may make a significant negative impact on the rendering performance during the animation for the large bundles especially on high-dpi screens e.g. retina.

@stanislawosinski
Copy link
Contributor Author

Actually, the zooming animation is rendered with pixelRatio=1. On High-DPI screens you should see a faded switch between the low- and high-resolution rendering before and after the animation.

Additionally, when the number of groups is large, FoamTree does not render labels if their on-screen size is smaller than a threshold. The labels render only when the label size increases as a result of zooming.

I was thinking of adding a configuration checkbox that would enable/disable labels during zooming, but then decided the gain may not be worth cluttering the UI. Ultimately, it's a matter of testing the performance on typical developer configurations. The no-labels zoom is a default that dates back to the first versions of FoamTree released nearly 10 years ago. The hardware has progressed a lot since then, so it may be a good moment to rethink this behaviour :-)

@th0r
Copy link
Collaborator

th0r commented Jan 20, 2021

Ok, I've checked that and looks like the rendering slowdown is acceptable. Could you fix a conflict in changelog please?

@th0r th0r merged commit 1ccda17 into webpack-contrib:master Jan 20, 2021
@th0r
Copy link
Collaborator

th0r commented Jan 20, 2021

Thanks!

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.

None yet

3 participants