-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
GH-6428: Refactored the built-in monaco commands. #7481
Conversation
@marechal-p Could you help with testing please too? |
97fbb9a
to
f48ba38
Compare
packages/plugin-ext-vscode/src/browser/plugin-vscode-commands-contribution.ts
Outdated
Show resolved
Hide resolved
83be302
to
95a99dc
Compare
I did my best to address all remarks, the PR is ready for the review. @RomanNikitenko, @marechal-p can you please help with the verification? Thank you! 🙏 |
@kittaakos or according to
it's expected to test the changes for |
Yes. Always 😊
Just go for the browser now. |
Sorry for misleading you, I have a meeting, can start testing in ~2 hours... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kittaakos
I'm testing browser
side at the moment.
Looks like, for step:
Type bar and select the Selection > Select All menu item. Assert: the input value is bar and is selected.
I have the different behavior from VS Code:
So, it does nothing.
But it works from context menu.
For master I have another behavior, but is different from VS Code as well:
So it selects editor content, I think because:
- the command is executed using this method
and editor.focus()
is present inmaster
branch
Please let me know if my testing steps are wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kittaakos This PR is awesome! It is going to solve so many issues.
@kittaakos About:
I'm not sure where the cursor is at this step But I can apply |
Well, your cursor does not blink in the main editor, at least I cannot see it. |
@kittaakos
Looks like it's not fixed for me for |
👍 Thanks for finding it. Checking... |
Very useful findings. The following commands do not have a
VS Code refs: |
Closes #6428 Signed-off-by: Akos Kitta <[email protected]>
Signed-off-by: Akos Kitta <[email protected]>
Fixed now. It delegates to the browser's |
Testing... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested for browser
side.
Faced with the issue related to Ctrl+z
withing testing the changes
Checked that master
has the same problem, so it's not a regression.
I still can see Commiting pending changes before change accessor leaves due to read access.
:
I can confirm that:
- first two sets from the Test Plan work well for me
Find Next
(Enter) andFind Previous
(Shift +Enter) are fixed - thanks!- the problem was fixed - now
It delegates to the browser's Find functionality
We are not yet using that version. microsoft/vscode@6beb757
Let me check this one too. Ohh, sorry 😕 |
@RomanNikitenko, did you see this when undoing in the editor? #7486 |
@kittaakos |
I leave this open till the end of the day if anyone wants to object. Thank you for the review @akosyakov and for the multiple verifications @RomanNikitenko 🙏 |
Signed-off-by: Akos Kitta [email protected]
What it does
Changes the way how we handle monaco commands, and hopefully providers a better UX for the
Undo
,Redo
, andSelect All
commands. It is the fix for electron, as itHow to test
Test Plan:
Selection
menu is missing from the electron app #6425).Reset Workbench Layout
.input
widget has the focus.Select All
). Assert: theinput
value is foo and is selected.input
is empty.Undo
). Assert: theinput
value is foo and is selected.Redo
). Assert: theinput
is empty.Selection
>Select All
menu item. Assert: the input value is bar and is selected.input
is empty.Edit
>Undo
menu item. Assert: the input is bar and is selected. (Note: there is a bug here. The SIW widget'sinput
does not listen on value change and does not re-run the query.)Edit
>Redo
menu item. Assert: the input is empty.Selection
menu is missing from the electron app #6425).theia
as a workspace in Theia.Reset Workbench Layout
.input
widget has the focus, type baz.os.ts
module via the Command Palette. If it is opened in a preview mode, make sure the editor has the focus; the cursor blinks inside the editor.Undo
). Assert: foo is not there.Redo
). Assert: foo is there.Undo
). Assert: foo is not there.Select All
). Assert: the editor content is selected.Edit
>Undo
menu item. Assert: bar is not there.Edit
>Redo
menu item. Assert: bar is in the editor.input
.Select All
). Assert: baz is selected.Selection
>Select All
menu item. Assert: the editor content is selected.isWindows
in the editor and selectPeek
>Peek References
from the context menu. Assert: embedded editor is open. The cursor blinks onisWindows
in the main editor.Select All
). Assert: the main editor content is selected.Select All
). Assert: the embbedded editor content is selected. (Fixes [monaco] Select all does not work in inline, embedded editors #7483)🎖Let's verify other issues:
os.ts
module, press Ctrl/⌘+F, typeis
into the search widget. If you press Enter (multiple times) the selection jumps to the nextis
occurrence position in the editor. Bonus: it works inside the embedded editor too. (Fixes Search behaves differently than it used to (and compared to VS code) #7460)Select All
command executes incorrectly #6428), open the Command Palette and make sure you can doUndo
,Redo
, andSelect All
from the keyboard. (Fixes [electron] Ctrl/Cmd+A does not select the content of the quick open item #2756)core.find
command. (Fixes [core] Revisit core commands, such as Find, Replace, Select All, Undo, andRedo
#7474)TODOs:
Commiting pending changes before change accessor leaves due to read access.
warning when running the electron example. Hmm, but the logger code was removed by the VS Code guys in January. Let's double-check it. Verified ✅ (microsoft/vscode@6beb757)Review checklist
Reminder for reviewers
@akosyakov, @RomanNikitenko, here is an early preview of my changes. I am going to verify the behavior locally and write down the verification steps. Please take a look at my changes. Thank you!