Skip to content

feat: apply visible lazy-loading guard to canvas chart components#9005

Merged
djbarnwal merged 2 commits intomainfrom
feat/charts-network-on-visible
Mar 10, 2026
Merged

feat: apply visible lazy-loading guard to canvas chart components#9005
djbarnwal merged 2 commits intomainfrom
feat/charts-network-on-visible

Conversation

@djbarnwal
Copy link
Member

Canvas components use an IntersectionObserver to set a visible store to true the first time a component scrolls into the viewport. This pattern was already applied to KPI and leaderboard components to prevent data queries from firing off-screen, but chart components were not covered.

Threads visible: Readable<boolean> from CanvasChart.sveltegetChartDataForCanvasBaseChart.createChartDataQuery → each chart provider

https://linear.app/rilldata/issue/APP-157/optimize-data-fetching-based-on-widget-visibility

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@djbarnwal djbarnwal requested a review from ericpgreen2 March 10, 2026 10:36
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@djbarnwal djbarnwal merged commit 1179772 into main Mar 10, 2026
17 of 19 checks passed
@djbarnwal djbarnwal deleted the feat/charts-network-on-visible branch March 10, 2026 14:31
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.

2 participants