Repository navigation
SimpleFindWidget Add next,previous,history: Fixes #29708 #29661 - #32113
Peng Lyu (rebornix) merged 7 commits into
Conversation
There was a problem hiding this comment.
you don't want to check in this, right :)
|
Peng Lyu (@rebornix) BTW I saw in the August milestones the re- factoring of the FindWidget and a red ball indicating |
There was a problem hiding this comment.
We'd better not expose input box to external callers, let's handle input, checkboxes inside the widget.
There was a problem hiding this comment.
Peng Lyu (@rebornix)
I really wanted to hide this further but for right now the context key has to come from above
There was a problem hiding this comment.
Let's align the casing this time, use Webview always instead of mix of both WebView and Webview.
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Doh, have to get find in open files working! Bad stray console lines.
There was a problem hiding this comment.
Terminal: prefix is redundant.
There was a problem hiding this comment.
Done
|
Issues found while playing with it locally
|
|
Peng Lyu (@rebornix) Update: The editor FindWidget does use an update history delay: I can make this parallel |
A few more adds and will have two competing find widgets ;-) |
|
Christopher Leidigh (@cleidigh) your latest change looks good to me. Currently I only have one question left, is it necessary to create keyshorts for ShowNextFind/ShowPreviousFind for every context (Terminal, Extension Editor, Webview)? The key shortcuts are all the same and the context doesn't affect the behavior. You may want to simply create two generic commands which covers all of them. FindPrevious/FindNext is good, they sit where they should be 👍 Matt Bierner (@mjbvz) it makes a few changes to webview so I'd like to have you review it. |
|
We can probably have a generic context key called |
Matt Bierner (mjbvz)
left a comment
There was a problem hiding this comment.
Webview changes look good overall. I'd like to see if we can minimize the number of duplicate commands though and just have a single set of commands for navigating any find widget's history
|
Peng Lyu (@rebornix) Lastly, it seems like we would have to demultiplex somewhere in the middle of the call stack |
|
Peng Lyu (@rebornix) |
|
Christopher Leidigh (@cleidigh) there are several possible approaches
The first approach is more intuitive and straightforward to me. |
|
Peng Lyu (@rebornix) I don't like the hardwired Keybord event handling within the widget either. I will work on option one, probably take me a bit given my limitations and learning to do it correctly. |
|
Christopher Leidigh (@cleidigh) no worries, ping me whenever you need suggestions or so. Thanks for doing most of the code work for me, it used to be my debt task :) |
|
Peng Lyu (@rebornix) I thought I had the right place to add the simple find widget command contributions: Thanks |
|
Peng Lyu (@rebornix) |
|
Christopher Leidigh (@cleidigh) for editor contributions, we usually have a controller, in which we registers commands, and the controller usually gets added to BTW, I really appreciate your help on this but I don't want it to take too much of your time. So we can make the PR focus on you intended to do and have it merge fast. Then everyone interested in this topic can jump in and help fix things. If you need any kind of help, let me know, you can even add me to your fork and let me contribute there (fix annoying hidden magic things like this one). Have a good weekend. |
Christopher Leidigh (cleidigh)
left a comment
There was a problem hiding this comment.
works save placeholder - cleanup to follow Monday afternoon
Commenting on your remarks Friday: That said, I of course don't want to be in the way of progress. I think this PR is ready for a good review cc: Daniel Imms (@Tyriar) I made a fair amount of changes, actually mostly removing code, to the integrated terminal and webView |
There was a problem hiding this comment.
Remove since we already have the terminalFocusContextKey getter at line 41?
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Change this and the import back to it's regular casing?
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Remove comments?
There was a problem hiding this comment.
How did I miss that???
No more late-night commits ;-)
There was a problem hiding this comment.
Change the casing back to normal
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Remove extra space
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Remove comment
There was a problem hiding this comment.
Done
There was a problem hiding this comment.
Daniel Imms (@Tyriar)
I found many pre-existing inconsistencies for private variables , eg some with underscore some without.
When working with any files should I fix these types of things? Change any private variables
to use underscore?
There was a problem hiding this comment.
I know there are inconsistencies, try to stick to the style of the file, all the properties and constructor args above use the _ prefix
There was a problem hiding this comment.
Okay, will follow that convention
Done
There was a problem hiding this comment.
What is this.find? Can subclasses just reimplement that instead?
There was a problem hiding this comment.
Mistaken thought that base class function was required.
Removed, tested.
|
Daniel Imms (@Tyriar) I can change to whatever you guys want. |
|
Matt Bierner (@mjbvz) Peng Lyu (@rebornix) what do you guys think about the generic simpleFind commands not working in the command palette? I'm sure a bug will be created out of this during endgame testing (just as it was for copy selection in terminal). |
|
Daniel Imms (@Tyriar) Does this effect commands like |
|
Matt Bierner (@mjbvz) If it is desired show/focus either the Find or simpleFind from anywhere including the command palette |
|
Peng Lyu (@rebornix) Existing Find/simpleFind commands and behavior: Show/Focus Find:
Terminal simpleFind: Show/Focus:
ExtensionEditor and WebView (readme,MarkDown): Show/Focus:
Intermediary commit abaae0cc6ea88060d3d8912ef7befdfafc829795 :
Latest PR Commit:
These commands do not show up in the command pallet. Questions:
|
d820ee1 to
25c79be
Compare
25c79be to
bda04b8
Compare
|
Christopher Leidigh (@cleidigh) thanks for your great work. Sat with Matt Bierner (@mjbvz) this afternoon and went through the PR, we think it's Okay that the commands are not avail in Command Palette. As we might have more commands avail in the Find Widget and maybe more places using Find (or just Webview), adding all commands to Command Palette may make it query a bit confusing. Merge it and I'll tweak the code when necessary. |
|
Peng Lyu (@rebornix) |
Christopher Leidigh (@cleidigh) can you elaborate more on this? We played with the bits and the Find Widget in Editor works as usual, we didn't want to change the behavior of it, right? |
|
Peng Lyu (@rebornix) I will redo testing tomorrow to see if I can reproduce. I apologize if I didn't make this clear before , I was expecting to discuss it along with the other issues. I will post my results as soon as possible tomorrow. I am also hoping I can help out more on further re- factoring ! |
|
Peng Lyu (@rebornix) Steps to reproduce (simplest method)
One "fix": Add context requirement to ShowSimpleFind (editor not focused) const showWidgetSimpleFindCommand = new ShowWidgetSimpleFindCommand({ This does one good thing and one bad thing:
If we had a ContextOr operation we could 'Or' all simpleFind contexts for the show command. I am frustrated I did not detect this before... |
|
Peng Lyu (@rebornix) I also added an editor focused check for simpleFind next/previous. Without a key binding comparison, let me know if either of these look good and I will do a new PR (I don't think I can use this one?) |
Revert "Use simpleFind.xyz for simpleFind command IDS" This reverts commit 9066eed. Revert "Review cleanup" This reverts commit c0a2180. Revert "SimpleFindWidget Re-Factor next,previous,history, single global commands Cleanup1" This reverts commit 1a26638. Revert "Working SimpleFind Service, isolation - pre- cleanup" This reverts commit bd8f5eb. Revert "Reveal Find on find n/p, add delayed update history" This reverts commit c586e52. Revert "Hide input focus tracker, cleanup" This reverts commit 27f4523. Revert "simpleFind Add next,previous,history fix" This reverts commit b69d45b.
|
Peng Lyu (@rebornix) Daniel Imms (@Tyriar) Matt Bierner (@mjbvz) I've had to revert all these commits one-by-one. Please test before merging anything and please merge with one merge commit which would make it easy for someone to revert a bad merge. The issue is #33240 |
|
alexandrudima Will determine best fix with group. |
|
The third possible fix is to reintroduce Terminal: Focus simpleFind and ExtensionEditor, WebView as well. Let me know how I can help fix this. |
|
Peng Lyu (@rebornix)
Other options:
|
Peng Lyu (@rebornix)
Daniel Imms (@Tyriar)
Matt Bierner (@mjbvz)
Replaced PR SimpleFindWidget Add next,previous,history: Fixes #29708 #29661 #32074
Of course the last five percent was all the work
The need for a new context for FindInput Focused was somewhat messy
Had to touch more files than expected, was necessary as there are four clients
Re-FactoringTheFindWidget for common use everywhere will take quite a bit of worksince it's so intertwined with the editor
Hopefully this is useful until we re- factor TheWidget
Fixes Find: No find history #29708 No next and previous keyboard shortcuts for Find widget in Integrated Terminal #29661 also services the modified simpleFindWidget to all users
--