Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VizPanel: Harden plugin change handling #902

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Sep 13, 2024

This is not needed for grafana/grafana#93045 as I was able to work around it.

But felt that VizPanel should handle pluginId changes a bit better, so making this change for that reason.

Copy link
Collaborator

@ivanortegaalba ivanortegaalba left a comment

Choose a reason for hiding this comment

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

The code looks good to me! What issues were causing the not detecting plugin changes on activation?

@@ -120,12 +120,17 @@ export class VizPanel<TOptions = {}, TFieldConfig extends {} = {}> extends Scene
}

private _onActivate() {
if (!this._plugin) {
if (!this._plugin || this.state.pluginId !== this._plugin.meta.id) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@ivanortegaalba this code did not check if the plugin id had changed

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