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

[Canvas][tech-debt] Fix SVG not shrinking vertically properly #73866

Closed

Conversation

clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Jul 30, 2020

Summary

Fixes #32108

With a non-zero line-height, and SVG will be automatically padded vertically once the size of the element is smaller than that line-height. This fixes that (long-standing) issue.

I also decided to remove the debounce call from render_with_fn. It makes sizing SVGs "stuttery". We should find a conditional method of debouncing for particular elements, rather than all elements:

Before

Jul-30-2020 15-35-51

After

Jul-30-2020 15-51-37

@clintandrewhall clintandrewhall requested a review from a team as a code owner July 30, 2020 19:50
@kibanamachine
Copy link
Contributor

kibanamachine commented Jul 30, 2020

💔 Build Failed

Failed CI Steps

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
canvas 1189 -129 1318

async chunks size

id value diff baseline
canvas 1.4MB -143.5KB 1.5MB

page load bundle size

id value diff baseline
canvas 1.4MB +27.0B 1.4MB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Canvas] Shapes shift out of the element when vertical size is small
2 participants