-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Icons for folding and unfolding #2948
Comments
To play around with the prototype, check out the |
Will themes be able to control the arrow colors? They may clash with certain themes even if there are just standard dark and light versions of them. |
Very nice and the folder regions are even remembered. I find it somewhat stressful to hit the twisties, they should have a larger hit target area. |
Along the lines of what @egamma said: To me, the glyphs seem overly inconspicuous. Maybe a bit larger in size would help with the hit area? |
@aeschli very nice work! Proposed DesignHere is what I'm thinking on the look and feel. It is based on Visual Studio's experience with code folding.
Nice to haves:
Alternative Designs...1. In-context affordance for foldingThis was an interesting idea, but I worry that it may not be scannable as easily to the eyes as a user tries to find where the folding expanders are in his/her code. They may also be confused with code since they are inline. Here it is. 2. Hierarchical in-contextSome IDE's do a similar approach. I have a competitive analysis doc if you want to take a look. 3. ChevronsAs you can see, this could get confusing, especially the more tabbed in you are. It's not clear what each chevron will do, especially in large chunks of a class, for instance. @stevencl, would love your feedback here. |
@bgashler1, love your first alternative design example with one exception: Please don't fold the closing brace. Atom does this and it really is annoying. Many people have asked that it be left exposed. |
I too like the look of the first alternative design but does it offer a larger hit area (as per @egamma's suggestion)? Can the user click on the vertical line for example to collapse the region? Can you also try showing what it looks like if you don't fold the closing brace? It might also be worth looking at how this works/looks for other languages. For example, will this work just as well with HTML, CSS, Visual Basic (and other languages that don't use punctuation marks as block delimiters)? |
I love the Visual Studio design with plus and minus signs and the line, like the proposal of @bgashler1, however I would like to fold the closing brace too, together with the starting brace replacing both with a hoverable tooltip icon, like visual studio does, so please make that an option. |
Closing brace could be folded like this:
instead of
I am definitly for folding closing brace. |
@LKorowicki and @ianwesterfield, I agree that if we show one brace we should show both. @Ristaaf, you bring up a very good point about how VS does it by folding both. These are both very good ideas that we will be considering. |
@stevencl It's not clear in the pictures here, but I would like to make these expandos slightly larger in VS Code than in VS for this reason. That way users get a visual reassurance that the hit area is larger instead of merely including a large and forgiving hit target. Furthermore, I'm thinking the hit target should be the height of the line with some padding to both the left and the right. I'll post some more images soon that we can discuss. |
Great work @aeschli @bgashler1 ! 👍 I'm 100% sure my favourite is 2. Hierarchical in-context.
Will this be in the next release ? Or are you doing an extension ? |
@LKorowicki I'm digging your suggestion for folding the closing brace to the same line, but keeping it visible. |
@Nimzozo: This will be in the actual product. |
I'm also for Hierarchical folding. Thank you for your hard work! |
@chrisdias Just added new icons, so perhaps we could make this on by default in the release. |
Created an issue for folding on a single line #3352, including a comparison with atom, brackets and sublime |
I'm working on adding folding to the editor. At the beginning of the line we show twisties that signal where you can fold and which ranges are already folded.
The folding arrows are only shown when hovering over the glyph margins. Unfold arrows are always visible.
The current prototype uses the twisties from the file explorer (16x16, arrow-collapse-dark.svg)
The following screenshot is made with the mouse over the glyph margin:
The following screenshot also shows git line decorators. The mouse is somewhere in the text area.
The text was updated successfully, but these errors were encountered: