Skip to content

Make nodes collapsible with double-click functionality #31

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 1 commit into
base: main
Choose a base branch
from

Conversation

mentatbot[bot]
Copy link
Contributor

@mentatbot mentatbot bot commented Apr 21, 2025

This PR implements collapsible nodes in the repository visualization:

  • By default, only directories and files are visible
  • Double-clicking a file expands it to show all internal components
  • Double-clicking a directory shows/hides contained files
  • Double-clicking again collapses the expanded node
  • Visual indicators (+ or -) show expandable nodes and their current state
  • Added distinct colors for different component types

Closes #29


🤖 See my steps and cost here

  • Wake on any new activity.

This PR implements collapsible nodes in the repository visualization:

- By default, only directories and files are visible
- Double-clicking a file expands it to show all internal components
- Double-clicking a directory shows/hides contained files
- Double-clicking again collapses the expanded node
- Visual indicators (+ or -) show expandable nodes and their current state
- Added distinct colors for different component types

Closes # 29

Mentat precommits passed. Log: https://mentat.ai/log/61c5c667-5735-41e2-b52d-7b6b936dcdba
@mentatbot mentatbot bot mentioned this pull request Apr 21, 2025
@mentatbot mentatbot bot requested a review from jakethekoenig April 21, 2025 16:56
Copy link
Contributor Author

mentatbot bot commented Apr 21, 2025

I've implemented the collapsible node feature as requested. Here's what the changes provide:

  • By default, only directories and top-level files are visible
  • Double-clicking a file expands it to show all its internal components (classes, functions, etc.)
  • Double-clicking a directory shows or hides its contained files
  • Double-clicking an expanded node collapses it
  • Visual indicators (+ or -) show which nodes are expandable and their current state
  • Added distinct colors for different component types for better visual differentiation
  • Added a small hint at the bottom of the visualization about the double-click functionality

The implementation maintains all existing functionality (selection, drag-and-drop, zooming) while adding this new feature.

Let me know if you'd like any adjustments to the implementation!

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.

Make nodes collapsible
0 participants