Skip to content

Plugin E2E: Fix addPanel timeout when dashboardNewLayouts is disabled#2612

Merged
sunker merged 2 commits intomainfrom
plugin-e2e/fix-addpanel-new-layout-toggle
May 5, 2026
Merged

Plugin E2E: Fix addPanel timeout when dashboardNewLayouts is disabled#2612
sunker merged 2 commits intomainfrom
plugin-e2e/fix-addpanel-new-layout-toggle

Conversation

@sunker
Copy link
Copy Markdown
Contributor

@sunker sunker commented May 5, 2026

What this PR does / why we need it:

DashboardPage.addPanel() unconditionally entered the new Grafana 13 sidebar flow for any Grafana >= 13.0.0, but the Sidebar container only exists when the dashboardNewLayouts toggle is on. With the toggle off, every addPanel() call timed out for 30s.

The fix detects the toggle via isLegacyFeatureEnabled and falls back to the legacy toolbar flow when it is off (same pattern as the dashboardScene check above it).

Which issue(s) this PR fixes:

Reported via grafana/grafana#123826.

Special notes for your reviewer:

Regression from #2572 (shipped in 3.5.0). Plugin-e2e CI didn't catch it because docker-compose.yaml sets dashboardNewLayouts=true. Verified locally against Grafana 13.0.1 with the toggle off — fails without the fix, passes with it.

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install website@5.5.4-canary.2612.25370213167.0
npm install @grafana/create-plugin@7.3.1-canary.2612.25370213167.0
npm install @grafana/plugin-e2e@3.7.1-canary.2612.25370213167.0
# or 
yarn add website@5.5.4-canary.2612.25370213167.0
yarn add @grafana/create-plugin@7.3.1-canary.2612.25370213167.0
yarn add @grafana/plugin-e2e@3.7.1-canary.2612.25370213167.0

…uts toggle

addPanel() unconditionally entered the new Grafana 13 sidebar flow for any
Grafana >= 13.0.0, which timed out for 30s when the dashboardNewLayouts
toggle was disabled. Detect the toggle and fall back to the legacy toolbar
flow when it is off.
@sunker sunker added patch Increment the patch version when merged release Create a release when this pr is merged labels May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

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

✨ This PR can be merged and will trigger a new patch release.
NOTE: When merging a PR with the release label please avoid merging another PR. For further information see here.

@sunker sunker self-assigned this May 5, 2026
@grafana-plugins-platform-bot grafana-plugins-platform-bot Bot moved this from 📬 Triage to 🔬 In review in Grafana Catalog Team May 5, 2026
@sunker sunker marked this pull request as ready for review May 5, 2026 11:51
@sunker sunker requested a review from a team as a code owner May 5, 2026 11:51
@sunker sunker requested review from Copilot and mckn and removed request for Copilot May 5, 2026 11:51
Copy link
Copy Markdown
Contributor

@ashharrison90 ashharrison90 left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@grafana grafana deleted a comment from github-actions Bot May 5, 2026
@sunker sunker merged commit 5d713d3 into main May 5, 2026
40 checks passed
@sunker sunker deleted the plugin-e2e/fix-addpanel-new-layout-toggle branch May 5, 2026 12:08
@github-project-automation github-project-automation Bot moved this from 🔬 In review to 🚀 Shipped in Grafana Catalog Team May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Increment the patch version when merged release Create a release when this pr is merged

Projects

Status: 🚀 Shipped

Development

Successfully merging this pull request may close these issues.

3 participants