Skip to content

Docs: Add datasource picker virtualization migration guide#2581

Open
mckn wants to merge 5 commits intomainfrom
mckn/datasource-picker-migration
Open

Docs: Add datasource picker virtualization migration guide#2581
mckn wants to merge 5 commits intomainfrom
mckn/datasource-picker-migration

Conversation

@mckn
Copy link
Copy Markdown
Collaborator

@mckn mckn commented Apr 16, 2026

What this PR does / why we need it:

Adds a migration section to the 12.x to 13.x migration guide documenting that the datasource picker is now virtualized. This guides plugin authors on how to update their unit/integration tests (Jest/Vitest) that render the datasource picker, since the virtualizer requires non-zero getBoundingClientRect values that JSDOM doesn't provide. The fix is to use mockBoundingClientRect() from @grafana/test-utils.

Based on grafana/grafana#122826.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

The website dependencies aren't installed in my local workspace so I couldn't verify a full docusaurus build, but the markdown structure follows the existing patterns in the file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Grafana 12.x → 13.x plugin migration guide to document that the Grafana 13 datasource picker now uses list virtualization, and explains the resulting test failures in JSDOM-based unit/integration tests.

Changes:

  • Adds new keywords for discoverability of the datasource picker virtualization change.
  • Adds a new migration section explaining why tests may fail and how to fix them using mockBoundingClientRect() from @grafana/test-utils.
  • Provides example snippets (including a “replace manual mock” diff) for Jest/Vitest-style test suites.

@mckn mckn self-assigned this Apr 16, 2026
@mckn mckn moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team Apr 16, 2026
@mckn mckn added the no-changelog Don't include in changelog and version calculations label Apr 16, 2026
@mckn mckn requested review from hugohaggmark, jackw and sunker and removed request for jackw April 16, 2026 20:22
Copy link
Copy Markdown
Contributor

@sunker sunker left a comment

Choose a reason for hiding this comment

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

Nice, LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Don't include in changelog and version calculations

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

3 participants