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

✨ Code Folding Ribbon #43

Open
gaetgu opened this issue Apr 24, 2022 · 4 comments
Open

✨ Code Folding Ribbon #43

gaetgu opened this issue Apr 24, 2022 · 4 comments
Labels
editor enhancement New feature or request UI

Comments

@gaetgu
Copy link

gaetgu commented Apr 24, 2022

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

One of the features that I love most about XCode specifically is the code folding ribbon to the side. You can fold a level of braces by clicking anywhere in the gradient level that you want.
Screen Shot 2022-04-24 at 8 30 03 AM

Hover:
Screen Shot 2022-04-24 at 8 31 04 AM

Clicked (folded code):
Screen Shot 2022-04-24 at 8 31 40 AM

Here is a short recording of the whole process. There is a fancy animation that is not necessary, but it would be pretty cool to have!

Screen.Recording.2022-04-24.at.8.32.40.AM.mov

Describe alternatives you've considered

n/a

Additional context

For reference, here is a picture of the ribbon in both dark and light mode:
imgonline-com-ua-twotoone-0btV6nX2OfPxYH

@gaetgu gaetgu added the enhancement New feature or request label Apr 24, 2022
@gaetgu
Copy link
Author

gaetgu commented Apr 26, 2022

I have been messing around with CoreGraphics a little bit, and it looks like the ribbon is a gray (in light mode), transparent line with a width of 7 (not 6 or 8, which I find strange) and a round cap. They also have a very fine white stroke around the edge. My experiments are not that great and I can't quite get them to play nice with SwiftUI views, but I thought I would leave that basic information here in case it helps.

@nanashili
Copy link

I have been messing around with CoreGraphics a little bit, and it looks like the ribbon is a gray (in light mode), transparent line with a width of 7 (not 6 or 8, which I find strange) and a round cap. They also have a very fine white stroke around the edge. My experiments are not that great and I can't quite get them to play nice with SwiftUI views, but I thought I would leave that basic information here in case it helps.

Apple likes using odd numbers in everything

@austincondiff
Copy link
Collaborator

I never understood this. I typically like designing in multiples of 2 (2, 4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96, 104, etc.) because they can always divide into two without falling on a subpixel. This is especially helpful when dealing with responsive layouts and 1x and 2x densities. I think Apple chooses to design in odd numbers so that it can always have a center pixel.

@stale stale bot added the wontfix This will not be worked on label Jun 26, 2022
@CodeEditApp CodeEditApp deleted a comment from stale bot Jun 26, 2022
@stale stale bot removed the wontfix This will not be worked on label Jun 26, 2022
@austincondiff austincondiff changed the title ✨ Add Code Folding Ribbon ✨ Code Folding Ribbon Jun 28, 2022
@austincondiff austincondiff transferred this issue from CodeEditApp/CodeEdit Jun 28, 2022
@austincondiff
Copy link
Collaborator

This may require #127 to be complete in order to begin working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor enhancement New feature or request UI
Projects
Status: 📋 Todo
Development

No branches or pull requests

4 participants