Do not sync Variables pane for a Data Explorer "editor"#12219
Merged
juliasilge merged 3 commits intomainfrom Mar 4, 2026
Merged
Do not sync Variables pane for a Data Explorer "editor"#12219juliasilge merged 3 commits intomainfrom
juliasilge merged 3 commits intomainfrom
Conversation
|
E2E Tests 🚀 |
juliasilge
commented
Mar 2, 2026
| await notebooks.assertCellOutput('Modified numbers: [1, 2, 3, 4, 5, 6]'); | ||
| }); | ||
|
|
||
| test('Python - Verify Variables pane stays on notebook session after opening Data Explorer', { |
Contributor
Author
There was a problem hiding this comment.
This test runs with the legacy notebook editor, which I think is fine for now. The fix applies to both notebook types since it's in the Variables service.
nstrayer
approved these changes
Mar 4, 2026
Contributor
nstrayer
left a comment
There was a problem hiding this comment.
Looks good to me.
I do think we're approaching a point in this conditional logic where we want to white-list when we do switch rather than decide when we dont.
For example if you switch from a quarto doc to the settings pane right now it will change the variables, which feels a bit odd. Out of scope for this PR but a future note.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Addresses #7539
When a user opens the Data Explorer from a notebook's Variables pane, the Variables pane would incorrectly switch to the foreground console session instead of staying on the notebook session. This happened because the
_syncToActiveEditor()method thought the Data Explorer "editor" was just a regular old editor, causing it to fall through to the default behavior of switching to the foreground console session.This PR makes the Data Explorer "transparent" to session following; when a Data Explorer editor becomes active, the Variables pane now stays on whichever session it was showing. This preserves the context for users working in a notebook.
Release Notes
New Features
Bug Fixes
QA Notes
@:variables @:data-explorer @:notebooks
dfvariable to open it