feat: Add folder support with drag & drop #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Folder Support Implementation
Closes #4
β Implemented Features
1. Data Model & Persistence
parentID: UUID?- Hierarchical structure (nil = root level)isFolder: Bool- Distinguish folders from favoritesorder: Int- Sorting within the same level2. User Interface
DisclosureGroup(collapsible)3. Drag & Drop
4. Export (JSON & Plist)
{ "name": "Work Links", "children": [ { "name": "GitHub", "url": "https://github.com" } ] }childrenbeforenamein Plist)orderfield for consistent output5. UX Improvements
π Changes Overview
Modified Files:
Favorite.swift- Data model with hierarchy fieldsFavoritesViewModel.swift- Folder management & drag & drop logicContentView.swift- Drag & drop UI implementationFolderRowView.swift- Folder display componentFormatGenerator.swift- JSON/Plist generation with children arraysSettingsView.swift- TopLevel Name configurationAppKitTextField.swift- Drag & drop protection (not needed after Settings move)π§ͺ Testing
Tested Scenarios:
π¦ Version
This PR prepares for v1.1.0 release (MINOR version bump - new features, backward compatible)
πΈ Screenshots
Main View with Folders:
Settings:
Ready for review and merge into
main! π