-
Notifications
You must be signed in to change notification settings - Fork 15
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
SceneQueryRunner: Detect new variable values when cloned #727
Conversation
tsconfig.json
Outdated
"rootDirs": [ | ||
"." | ||
] | ||
"rootDirs": ["."] | ||
}, | ||
"exclude": [ | ||
"dist/**/*" | ||
], | ||
"include": [ | ||
"utils/**/*.ts*", | ||
"src/**/*.ts*" | ||
], | ||
"exclude": ["dist/**/*"], | ||
"include": ["utils/**/*.ts*", "src/**/*.ts*"], | ||
"ts-node": { | ||
"compilerOptions": { | ||
"isolatedModules": false, | ||
"module": "commonjs" | ||
} | ||
} | ||
} No newline at end of file | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a vs code format, we need to update this file, we do not run typescript strict mode , but will do in separate PR
…ner-detect-new-values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
@@ -439,6 +439,8 @@ export class SceneQueryRunner extends SceneObjectBase<QueryRunnerState> implemen | |||
clone['_layerAnnotations'] = this._layerAnnotations.map((frame) => ({ ...frame })); | |||
} | |||
|
|||
clone['_variableValueRecorder'] = this._variableValueRecorder.cloneAndRecordCurrentValuesForSceneObject(this); | |||
clone['_containerWidth'] = this._containerWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch with the missing container width 👍
🚀 PR was released in |
Part of row repeat fixes grafana/grafana#87539
When changing so that we repeat the first row we are cloning scene query runners that have data and putting them into a new "variable context", but the scene query runners did not detect that variables are different so did not issue new queries.
This changes clone logic of SceneQueryRunner so that it will record the current variable values (Before this only happened on deactivate)
📦 Published PR as canary version:
4.18.0--canary.727.9027841193.0
✨ Test out this PR locally via:
npm install @grafana/scenes@4.18.0--canary.727.9027841193.0 # or yarn add @grafana/scenes@4.18.0--canary.727.9027841193.0