-
Notifications
You must be signed in to change notification settings - Fork 29.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
Improve layout in horizontal search view #45063
Comments
@isidorn another thing to discuss in UX is discoverability of search when it moves to be a panel where there is no visible action in the UI to trigger it. |
Another thing is how to discover the settings and how to move it. One idea is for the activity bar context menu actions to aslo have "move to panel / move to sidebar" which would just write the setting. An alternative is to allow drag and drop but only for search - I think this is less discoverable and has the downside of us not allowing it for other viewlets. Anyways we can discuss in ux meeting |
Also what you mention seems to be a general issue with the panels and not search specific. |
@isidorn true |
Is it strange if the layout is very different when the view is in a sidebar vs a panel? If I move the view from one place on the screen to another, I wouldn't expect it to totally rearrange itself. On the other hand, it seems like one should be organized to conserve horizontal space, and the other should conserve vertical space.
I like the way that the input boxes line up with the text results below on the left edge. Since the labels are not the same length, we would either left-justify the labels and have the text inputs not line up, or align the text boxes but lose the common baseline on the left. Example, sublime has the second approach: Radical idea, we could merge the include/exclude boxes and use
Should all of those row decorations (x, count, and replace button) be on the left? How does that fit in with the indentation and the twistie on the file?
Should we also do this for the code in 'find all references'? I think that's been discussed. |
I think it is fine if the layout changes in a non dramatic way. I like the sublime approach of aligning to the right. I am always open for radical ideas, but not sure what we save on that. Since we have enough horizontal space to put two of those boxes on the same line. And changing something that the users are used to is always problematic. Yes, clickable actions should go to the right (count should stay where it is since it is not so important imho). I think we can still align them nicely wrt the twisite - there is enough space. Checkout how open editors pushes the x to the left. Find all references should also do it, but I think we tried it out and people hated it for some reason. Let's first see how it looks in the search view before we make any big plans. |
I'm not sure if I like that. I think at least we would have to keep the labels above the input box. Two labels and two input boxes inline would take up too much horizontal space. Especially in German :P
I think that packing input boxes into a small space could make it look more complicated than it is. Like a bad web signup form. Otherwise, for changes like that, we could just go with a responsive design where it reflows when the view is narrow enough. Instead of making assumptions about how much space we have based on where the search view is. Putting the x on the left is consistent with tabs and Open Editors, for the File row, it would be sticking into the margin unless we move it over. Might want a designer's feedback. |
Responsive design would definetly be the best and most general solution. @roblourens maybe you talk to some designer in Redmond to sketch up something? @stevencl do we have some designer available for tasks like this? |
Just some fan input: This would get rid of a little vertical space if you match a lot of files, and would add the line number into the search (something people have wanted #39219). You'd have to be more precise to fold a file since you couldn't click the entire line anymore, and pressing "enter" with the folder highlighted would select the first open file instead of doing nothing (like it currently does), but other than that I don't see too much of an issue with the difference in navigation. EDIT: |
The horizontal layout is a great opportunity for including #16488 -- multiple searches could be shown as sub-tabs as they are in other editors such as webstorm. |
It would be great if you could also include:
|
Thanks for the suggestions. @GammaGames showing the first result on the same line as the file name is an interesting idea and could save some space. But unless we put the whole thing in a grid-like view, the text results would not be nicely aligned on the left side anymore because the alignment would depend on the length of the file name, and thinking about how to show it with long file names could get complicated. I was also thinking about how to get something on the same line as the search query box, but I don't want the replace or include/exclude boxes to be visible all the time, and showing/hiding those inline would be unusual.
What do people think about scrolling the view container all together, instead of just the search results? I think this would make browsing results easier when the vertical space is constrained. Another idea, when the view is wide, switch to text-based buttons. We don't have to use these tiny icons to save space in a very wide panel view, and text labels will be less ambiguous. |
Two things I love about Sublime Text search:
Combined these two features are very powerful |
I am a fan of a tree view over a grid view, and I don't have a good tree-grid control right now. Tried some things around this point:
Also ignore the fact that these mockups show the activity bar, I was just testing them in different contexts... this is either with search in the panel specifically in mind, or for both. A) Mockup of current view with Xs on left I have a negative reaction to this right away. I don't like that the X feels like it's getting in the way of the file collapse twistie. When a user is clicking around to collapse several file results, it's dangerous to put the delete button right there. Maybe it would be better to put the X inside the twistie but I don't want to shift the file name over when hovering that row, which we would have to do to make room. B) We could also put them on the right, but just at the end of the text. Then we also have room for the replace button. Downside is that they aren't lined up vertically so it's hard to remove several in a row quickly. Some prior art for this, in the problems view, each file row has its count at the end of the row. And a location, which we should also copy for search! C) I am also interested in text-label buttons like this mockup. Possibly expanding them from the icon buttons when we have extra room. I think they look more natural than the icons in a wide view, but we don't have any UI element like this in VS Code and it looks un-vscodey. D) Maybe it would look ok on the right side if there's something else that pulls it together. I kind of like the look of a border on each file name row E) Or just leave it as is |
I agree with @JAStanton on the useful features from Sublime search that can hopefully be reproduced here. The other benefit of it being a text buffer (or document) is that you can then save the results. I also think it would be useful to have before/after context lines as an option, which you could also apply syntax highlighting to based upon the file type (i.e. if the search result shows up in a javascript file, apply javascript highlighting). Also, I would prefer not to lose the Search icon from the Activity Bar, regardless of where the search is positioned. It makes it easier to access as a shortcut. |
The editors have extra whitespace for the X when it's not showing, so the X for the search result could also just have empty space so that the X appears without shifting the text? (Hopefully I read that sentence right).
I really like that! It makes it easier to differentiate between files.
That's one thing I miss, I'm learning the shortcuts but I thought it was nice to have that button on the left. I know this is off topic, but adding optional buttons for togging the other panels into the activity bar might be a nice feature, since I normally have the panels hidden until I want them. |
Nice work with the mockups. Some feedback:
Just my 2 cents |
This is true in your theme, but it looks nicer in Monokai and Dark+. It's up to the theme. |
It's definitely more satisfying to look at, but there's so much empty space it kinda bothers me. And I like the "File Patterns" text more, maybe put the full text (with examples) in a tooltip? The normal search and replace have tooltips, though they're useless. |
Any reason search results could not be shown in an editor instead? If nothing else, it could be an option, because I, for one, think it'd be much easier to see than having to scroll down and through it, or having to click on Maximise Panel Size (having it open automatically, as suggested by @garygreen, wouldn't help much as clicking the result would show the file in a tiny space above, so one would have to click Restore Panel Size again in order to see the file content). I believe Sublime Text and Atom do a great job in doing this, and it's the only thing (better search experience) that I'm missing form vscode. |
Just my thoughts, let's present in the ux meeting today to get more feedback. For people asking about search results in the editor. You can write an extension for that, and if we fail in making the horizontal search satisfy the needs of customers asking for results in the editor then vscode team could invest in that extension to make it nice and polished. |
It would be worth considering a different layout when in the horizontal panel. For example, we could put the results to the right of the controls, allowing more room for the list of results than in the current horizontal implementation but still allowing more vertical room for each individual result: |
@stevencl if we decide that we want a brand new layout for the horizontal search then we can do special things (something like you proposed). But in a perfect world we would first improve the layout such that both sidebar and panel benefit, and hopefully the layout is dynamic in a way that it moves when there is more space available. Anyways let's discuss in the ux meeting in greater detail. |
My thinking is that moving actions to the left would only apply when the view is wide enough. It would make no sense in the normal narrow viewlet view. @stevencl I actually really like that idea. It solves the problem of the header generally taking up lots of space, and of the results seeming too stretched out. It would also be easy to make the search view reflow like that when there's enough space.
I see @stevencl's design as fitting into that category |
I kind of like the search fields on the left image. What if the fields stayed in the left panel, similar to Explorer/Debug/Extensions, and results stay on the bottom? That would be somewhat similar to Visual Studio proper where the search is a pop up, and the results go in the panel. |
Our viewlets and panel views are all self-contained things, I think it would be unexpected to have two of them working together like that. Would much rather find a solution that works well in just one. Discussing this with people today, we couldn't come to a conclusion. We mainly looked at my mockup that puts all the controls on the left, and @stevencl's. I can't get excited about either one. We think that the large left margin on the first design looks out of place with other panels and feels off. No other panels have any sort of margin like that. I like @stevencl's but I don't think it will look natural when all the search fields are collapsed. We talked about using the extra empty space in that design for other features, like storing multiple searches, so we could revisit it later if we do that. We discussed making it simpler by moving over just the X button or just the replace, and leaving the other on the right. I'm still not a fan of putting these right next to the file twistie on the left. I think the twisties are clicked 100s of times more often than the other buttons so I shouldn't have to aim carefully. So eventually we came around to the idea that we could just leave those action items on the right side for now, with a few things to improve the experience:
And we can also continue investigating
|
@roblourens agree with the conclussion, those are small changes which would help with the experience. As for the remove, just use the keybingind as everywhere else (breakpoints for example). Delete on windows and linux, cmd + back on mac. From the implementation perspective, make sure to use commands. Here's an example Apart from those changes I would be interested in experimenting with a different font. To make it look more like an editor. Let's try to get those changes in and then we can sync start of next week after we try this out for a day. |
Is there an option to make the base "in file search" use the new panel feature as well? I think that would be a good idea as well (for those of us used to the atom layout). Great job with this feature! |
Just me, but I don't ever use the X button. I only ever use the twisties because clicking the entire row collapses the file. Which made me think, moving the X wouldn't cause issues for me since I don't have to click precisely for the twistie anyway. |
I would like to have some integration between "Find All References" and the new search panel. I really miss the way that Eclipse allowed me to find all references across the whole project and display the file occurrences in an extra window like this new Search panel. |
I would also dearly love to see some way to make "Find all references" use the search panel as mbenkmann commented - in fact that is my biggest gripe with VS Code at the moment, and very nearly stopped me from using it at all when I first tried it (actually it did at first, but I gave it a second shot after a recommendation from a colleague). That would have been a shame, as I otherwise love it... |
and include keyboard shortcut in label. #45063
All planned work here is done. |
@roblourens I don't saw the news about |
@marcusmalmberg Yes, but when you open settings you will see:
As you can see it says Preview. So I'm wondering if it's still done because I don't saw any notes in 1.22.0. |
We'll remove the "preview" tag for 1.23 :) @isidorn |
Now that search view can be moved to the panel area we need to improve the layout to take advantage of the additional horizontal space.
The text was updated successfully, but these errors were encountered: