Skip to content
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

Change all occurences and Command Palette is in every editor #74558

Closed
isidorn opened this issue May 29, 2019 · 12 comments
Closed

Change all occurences and Command Palette is in every editor #74558

isidorn opened this issue May 29, 2019 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-commands Editor text manipulation commands verified Verification succeeded
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented May 29, 2019

Refs: #74472

Notice how the context menu in the comment input box is pretty useless. It has all the unrelated actions. And we have similar problem in the debug console input box.

I belive the Change all occurences and the Command Palette belong only in the main editor and they should be removed from all others.
@bpasero @jrieken On what context keys do we contribute these commands. Can we fine tune them so they do not appear in every editor?

Screenshot 2019-05-29 at 15 45 02

@bpasero
Copy link
Member

bpasero commented May 29, 2019

Makes sense to not have them in there. I would think there should be a context key set whenever the editor is not used as a real text editor and then we can change those registrations.

@isidorn
Copy link
Contributor Author

isidorn commented May 29, 2019

There should be a context keys for this. Every editor should have this property is simple widget something.
I can look into adding this context keys for the two actions.

@rebornix
Copy link
Member

There is a context key isInEmbeddedEditor https://github.com/microsoft/vscode/blob/master/src/vs/editor/common/editorContextKeys.ts#L31 but it's only used in Playground/Walkthrough. We should probably make better use of it.

@rebornix rebornix added this to the On Deck milestone May 29, 2019
@rebornix rebornix added a11ymas Issue from accessibility team bug Issue identified by VS Code Team member as probable bug under-discussion Issue is under discussion for relevance, priority, approach comments Comments Provider/Widget/Panel issues and removed under-discussion Issue is under discussion for relevance, priority, approach a11ymas Issue from accessibility team labels Jul 27, 2019
@isidorn
Copy link
Contributor Author

isidorn commented Oct 9, 2019

I can look into this this mielstone, thus assignign to October and removing other asignees.

@isidorn isidorn added debt Code quality issues and removed comments Comments Provider/Widget/Panel issues bug Issue identified by VS Code Team member as probable bug labels Oct 9, 2019
@isidorn isidorn modified the milestones: On Deck, October 2019 Oct 9, 2019
@isidorn
Copy link
Contributor Author

isidorn commented Oct 22, 2019

@rebornix please review the fix. I checked out how it beahves and it seems good.
Adding label bug so we verify this

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug editor-commands Editor text manipulation commands and removed debt Code quality issues labels Oct 22, 2019
@rebornix
Copy link
Member

Thanks, I’ll take a look.

@rebornix
Copy link
Member

@isidorn not sure if I understand it incorrectly, restricting the command to ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.editorTextFocus) doesn't filter it out from Comment Editor, right?

@isidorn
Copy link
Contributor Author

isidorn commented Oct 24, 2019

I believe it does. Because the editorTextFocus is set only when the editor is not a simple widget. Check it out here https://github.com/Microsoft/vscode/blob/f554449e3baa6db81c04ed2c321c60ec3a8e9b9f/src/vs/editor/browser/widget/codeEditorWidget.ts#L1640

And I hope the comment editor is a simple editor widget like the repl input is. I set this here https://github.com/Microsoft/vscode/blob/f554449e3baa6db81c04ed2c321c60ec3a8e9b9f/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts#L43

@rebornix
Copy link
Member

I did use the simple editor by following repl input but turned out that language features won't be enabled when doing so. But we may still want to do so otherwise it's polluting the extension API.

@isidorn
Copy link
Contributor Author

isidorn commented Oct 25, 2019

Yeah. If you can make it to be a simple editor widget that would be great.
Not sure if possible since you want all the language features though.

@rebornix
Copy link
Member

@isidorn thanks, I changed it to simple editor and considering we only need suggestion / snippet, it should be fine.

@connor4312 connor4312 added the verified Verification succeeded label Oct 30, 2019
@isidorn
Copy link
Contributor Author

isidorn commented Nov 11, 2019

@rebornix great, thanks for doing that.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug editor-commands Editor text manipulation commands verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants