Shopify / polaris-viz

A collection of React and React native components that compose Shopify's data visualization system
https://polaris-viz.shopify.dev
Other
335 stars 25 forks source link

Move containerBounds to ChartContext #1763

Open envex opened 1 week ago

envex commented 1 week ago

What does this implement/fix?

As an improvement to https://github.com/Shopify/polaris-viz/pull/1757 we're moving containerBounds to the ChartContext so we no longer have to prop drill it.

We're also removing containerDimensions which was a subset of containerBounds. We will use containerBounds from now on.

Storybook link

Before merging

github-actions[bot] commented 1 week ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
polaris-viz-core-cjs 61.65 KB (+0.04% 🔺) 1.3 s (+0.04% 🔺) 1.2 s (+24.04% 🔺) 2.4 s
polaris-viz-cjs 222.7 KB (-0.24% 🔽) 4.5 s (-0.24% 🔽) 2.1 s (+3% 🔺) 6.6 s
polaris-viz-esm 180.54 KB (-0.26% 🔽) 3.7 s (-0.26% 🔽) 1.7 s (+12.4% 🔺) 5.3 s
polaris-viz-css 5.55 KB (-0.15% 🔽) 111 ms (-0.15% 🔽) 344 ms (+9.69% 🔺) 455 ms
polaris-viz-esnext 187.26 KB (-0.28% 🔽) 3.8 s (-0.28% 🔽) 1.3 s (-14.46% 🔽) 5.1 s
philschoefer commented 14 hours ago

Thanks @susiekims! Updated the PR. LMK if it's good to go.