Docs: Add datasource picker virtualization migration guide#2581
Open
Docs: Add datasource picker virtualization migration guide#2581
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
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. |
Contributor
There was a problem hiding this comment.
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.
1 task
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
getBoundingClientRectvalues that JSDOM doesn't provide. The fix is to usemockBoundingClientRect()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.