Support configurable secondary sidebar location#14148
Open
AlejandroRomeroG wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Collaborator
|
Thank you for this PR! However, we generally try to avoid getting too involved with the panel layout code from upstream VS Code. Would you consider opening this up as a PR against VS Code itself? It's a popular request over there too, and already on their backlog. We sync with VS Code regularly so it won't take long for it to make its way to Positron once it's in VS Code. |
Author
|
Thanks for the guidance. I opened the upstream VS Code PR here: microsoft/vscode#320701 I will keep this Positron PR available as a reference while the VS Code discussion happens. |
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.
Summary
This change adds a new
workbench.secondarySideBar.locationsetting so the secondary side bar can be placed independently from the primary side bar. The existing behavior remains the default through theoppositevalue, whileleftandrightallow users to explicitly choose where the secondary side bar should appear.The layout code now resolves the secondary side bar position from that setting when creating workbench parts, serializing the layout, and adjusting part positions at runtime. The secondary side bar context menu also updates this setting directly, so moving the secondary side bar no longer changes the primary side bar position.
Motivation
This is motivated by a common RStudio-style workflow where the source editor is kept on the upper left, the console sits below it, and the right side contains session-oriented views such as Environment at the top with Files, Plots, Packages, and related views available below. Positron already has the pieces for this kind of workflow, but the secondary side bar was effectively tied to the opposite side of the primary side bar. That made it difficult to keep Files, Packages, session views, and Plots together on the right side while preserving the editor and console layout on the left.
This keeps the current default intact while making that style of workspace layout configurable.
Validation
I ran
git diff --check, built a macOS arm64 package withgulp vscode-darwin-arm64, installed and launched the packagedPositron.applocally, and verified the right-side layout behavior with the workbench, session views, Python PET, and supervisor startup logs.Example