wikimedia / vegalite-wordpress-plugin

4 stars 2 forks source link

Charts re-render unnecessarily when viewport changes #10

Open kadamwhite opened 1 year ago

kadamwhite commented 1 year ago

I noticed on some pages that if the viewport changes size very slightly, not enough to cause a different variant of the chart to load, the graphs may still re-render. This causes a small visual flicker, and uses device resources unnecessarily since no change has been made which would require the chart to be re-rendered.

This issue tracks investigating the resize observer code within this plugin to ensure it is only triggering a re-render when absolutely necessary.

varnent commented 1 year ago

@kadamwhite - should we migrate this to the main repo for tracking?

kadamwhite commented 1 year ago

That's a good governance question. I'd vote to make a proxy ticket over there if this is a priority for you -- if we close this issue, it precludes open source participation in this repo specifically

varnent commented 1 year ago

@kadamwhite - that's a really great point - and thank you for thinking of FLOSS aspect (we're usually one of the only folks doing that! ;) )! Would it be possible to setup a way to automagically create a "tracking ticket" on the main development repo anytime an issue is created on one of the "child" repos?

kadamwhite commented 1 year ago

Excellent question, @varnent, we'll look into that! Or into whether we can "capture" tickets from this project on that board, now or in the future once we finish wrangling where the ZenHub instance lives.

varnent commented 1 year ago

Ticket created to track this idea: https://github.com/humanmade/Wikimedia/issues/836 (unrelated to this actual issue)