Skip to content

Folding Ribbon: Collapsed Indicators, Masking, Bracket Emphasis #332

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

Open
wants to merge 41 commits into
base: feat/code-folding
Choose a base branch
from

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jun 6, 2025

Description

  • Adjacent folds (folds that start/end on the same line) are drawn with a horizontal line instead of overlapping their pills.
  • Collapsed folds are drawn with the correct indicator
    • This indicator does not respond to hovering
    • When a lower-depth fold is hovered, the collapsed indicator masks itself to that hovered fold's bounds. This creates a nice effect to avoid overlapping the hovered fold boundary and the collapsed box. The hovered fold's chevrons are also hidden if they overlap the collapsed fold.
    • When a collapsed indicator is clicked it toggles the fold.
  • Adds an emphasis to hovered folds that have brackets surrounding their fold range.
    • @austincondiff may start working on a better emphasis style, so this is a placeholder for now just to indicate the functionality. It should be very easy to replace with the new style once it's done.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2025-06-06.at.10.57.01.AM.mov

@thecoolwinter thecoolwinter changed the base branch from main to feat/code-folding June 6, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant