fix: pin error focuses the view instead of the view container#183
Merged
yoavbls merged 4 commits intoyoavbls:mainfrom Mar 9, 2026
Merged
fix: pin error focuses the view instead of the view container#183yoavbls merged 4 commits intoyoavbls:mainfrom
yoavbls merged 4 commits intoyoavbls:mainfrom
Conversation
When clicking 'Pin Error', the command previously used 'workbench.view.extension.prettyTsErrors' which reveals the view container. If the user has moved the Pretty TS Errors view to a different view container (e.g. Explorer sidebar), this would switch focus to the original (now empty) container instead of where the view actually lives. Changed to use 'prettyTsErrors.sidePanel.focus' which focuses the specific webview view regardless of which container it has been moved to. Fixes yoavbls#182
Collaborator
|
@tysoncung Thanks that was quick. @yoavbls https://github.com/yoavbls/pretty-ts-errors/pull/181/changes explicitly set it to |
yoavbls
approved these changes
Mar 9, 2026
Owner
yoavbls
left a comment
There was a problem hiding this comment.
Yes, it's probably my mistake after renaming the panel.
Thank you 😊
…y-ts-errors into fix/pin-error-view-focus
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.
Problem
When clicking "Pin Error" in the tooltip, the command reveals the view container using
workbench.view.extension.prettyTsErrors. If the user has moved the Pretty TS Errors webview view to a different view container (e.g. the Explorer sidebar), this command focuses the original (now potentially empty) container instead of where the view actually lives — causing an unexpected view switch.Fix
Changed to use
prettyTsErrors.sidePanel.focuswhich focuses the specific webview view regardless of which container it has been moved to. VS Code automatically generates a.focuscommand for each registered webview view.Testing
Fixes #182