-
Notifications
You must be signed in to change notification settings - Fork 93
✨ Code Folding #43
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
Comments
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 |
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. |
This may require #127 to be complete in order to begin working on this. |
UPD 5 mins later: I was referring to #65 ![]() |
FYI, I've added the issue description for increased clarity. |
Description
Code folding allows developers to collapse and expand sections of code (such as functions, classes, conditionals, and comments) to reduce visual clutter and focus on the parts they’re working on. This feature is particularly useful when navigating large files or deeply nested structures.
Proposed Behavior
Implementation Notes
Benefits
Additional Context
The folding ribbon provides a familiar and discoverable UI for interacting with folded sections and complements keyboard or menu-based folding commands.
Screenshots
Screen.Recording.2022-04-24.at.8.32.40.AM.mov
Additional Screenshots
Hover:

Clicked (folded code):

dark and light mode:

The text was updated successfully, but these errors were encountered: