-
Notifications
You must be signed in to change notification settings - Fork 3
Support Nested Groups #15
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
base: master
Are you sure you want to change the base?
Conversation
|
More testing is needed to ensure everything works as expected. |
|
There is a bug where if you have .filefocus.json folders and you drag and drop one of those folders over a normal folder, it will get stuck there because it will copy as the same id as the original, being that unable to be deleted easily. I think the proper solution will be don't let people drag and drop folders from .filefocus.json bugfilefocus1.mp4 |
Bug fixed. |
|
If anyone want to test the extension changes right now, you install it from here: |
… folder with the 'Add group' button
|
I also fixed the bug that generated an annoying [object Object] every time you created a folder with the 'Add group' button (which is still present on current main extension) and not affecting the 'Add to focus group' behavior. |
🎉 Add Nested Groups Support
Overview
This PR implements nested groups functionality for File Focus, allowing users to organize their file groups in hierarchical structures. This addresses the long-standing feature request mentioned in the Known Issues section of the README.
✨ Features Added
🏗️ Hierarchical Group Structure
🖱️ Intuitive Drag & Drop
📋 Enhanced Context Menu
🔄 Recursive Operations
🌳 Improved Tree View
🏗️ Technical Implementation
Core Changes
Group.ts: AddedchildGroupsarray and parent-child relationship methodsGroupManager.ts: Enhanced with hierarchical group management and move operationsGroupFacade.ts: Added recursive operations and nested group commandsStorage Enhancements
StateStorage.ts: Updated to serialize/deserialize nested structuresFileStorage.ts: Enhanced .filefocus.json format to support hierarchyNew Commands
fileFocus.addNestedGroup- Add child group to selected groupfileFocus.moveToRootLevel- Move group to root levelfileFocus.moveToParentGroup- Move group to different parent🧪 Testing
🔄 Backwards Compatibility
📸 Usage Examples
Creating Nested Structure
.filefocus.json:
{ "store": [ { "name": "Frontend", "path": [], "groups": [ { "name": "Components", "path": [ "Frontend/Components/Button.tsx", "Frontend/Components/Modal.tsx" ] }, { "name": "Utils", "path": ["Frontend/Utils/helpers.ts"] } ] }, { "name": "Backend", "path": [], "groups": [ { "name": "Controllers", "path": [] }, { "name": "Models", "path": [] } ] } ] }Drag & Drop Operations
🎯 Benefits
📝 Notes
This PR transforms File Focus from a flat file organizer into a powerful hierarchical project management tool while maintaining the simplicity and performance users love! 🚀