Use hideFind() and showFind() when retainContextWhenHidden enabled#161174
Merged
mjbvz merged 5 commits intomicrosoft:mainfrom Sep 21, 2022
Merged
Use hideFind() and showFind() when retainContextWhenHidden enabled#161174mjbvz merged 5 commits intomicrosoft:mainfrom
mjbvz merged 5 commits intomicrosoft:mainfrom
Conversation
mjbvz
reviewed
Sep 19, 2022
| // We previously hid find when we did this.release() | ||
| // https://github.com/microsoft/vscode/issues/157424 | ||
| if (this._options.retainContextWhenHidden) { | ||
| this._webview.value.showFind(); |
Collaborator
There was a problem hiding this comment.
What if the find widget wasn't previously showing when the webview was hidden? Will this cause it to show?
Contributor
Author
There was a problem hiding this comment.
Thanks for the callout! That does indeed need to be handled.
I'll start looking into a way to handle that cleanly. Preferably the solution would avoid any more state variables, but it may end up being necessary. Just depends how everything is currently implemented so I'll dig into it a bit more.
Contributor
Author
|
Apologies for all the amendments. Github workflow is much different than Gerrit... |
mjbvz
approved these changes
Sep 21, 2022
Collaborator
|
Thanks! |
Collaborator
|
This will be in the next insiders build and go out to stable with VS Code 1.72 |
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.
I suspect this PR will fix the issue noted with #157424. However, I was unable to test because Code - OSS Dev wouldn't activate the extension I was trying to test with. I am attaching a short (but feels long) video showing the result I'm getting while trying to test.
But, to summarize the video, I startup Code - OSS from vscode with the code changes applied, I install a dummy extension with code to create web view panel using vsce and Install by VSIX, I show that the Runtime Status remains as "Not yet activated", then I attempt to run the extension command which creates the web view panel. I am shown an error message (FYI -- It takes rougly 20 seconds to show the error after I run the command) saying that the command is not available (presumably just because the extension isn't getting loaded).
I'm guessing some kind of disconnect between what the command pallet sees and what the app sees when the ext would get activated 🤷. I know it's not ideal to submit a PR without having been able to successfully test the change, but I was unable to find any useful information about running custom extensions from Code - OSS. (Besides what I saw at #23831) With that in mind, I am open to trying things if anyone has any ideas.
157424_test_attempts.mp4