Skip to content

feature/add collapsible/expandable folder tree with toggle controls#7

Merged
mgks merged 1 commit intomgks:mainfrom
raj-kapil:feature/collapsible-tree
Mar 17, 2026
Merged

feature/add collapsible/expandable folder tree with toggle controls#7
mgks merged 1 commit intomgks:mainfrom
raj-kapil:feature/collapsible-tree

Conversation

@raj-kapil
Copy link
Copy Markdown
Contributor

@raj-kapil raj-kapil commented Mar 16, 2026

This pull request introduces a collapsible folder feature to the file tree UI, allowing users to expand and collapse all folders or individual folders for improved navigation. The changes span HTML, JavaScript, and CSS to implement the new functionality and update the visual presentation.

Collapsible Tree Functionality

  • Added "Expand All" and "Collapse All" buttons to the UI for bulk folder toggling (index.html).
  • Implemented folder expand/collapse logic, including event handlers for row clicks, bulk toggling, and renumbering visible lines (script.js). [1] [2] [3]
  • Updated the visual hierarchy builder to track folder depth and added caret icons for folders (script.js). [1] [2]
  • Registered new DOM elements and event listeners for expand/collapse actions (script.js). [1] [2]

Styling Enhancements

  • Added CSS rules for collapsible tree folders, caret icons, and hidden child rows (style.css).

@mgks mgks merged commit d7a05b5 into mgks:main Mar 17, 2026
@mgks
Copy link
Copy Markdown
Owner

mgks commented Mar 17, 2026

Looks nice. Thanks for the contribution!

@mgks mgks added the enhancement New feature or request label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants