feat: add folder system#241
Conversation
- Add Folder model with parent-child self-references - Add folderId foreign key to File model - Include folder sharing support via ShareFolders relation - Establish database schema foundation for folder functionality
- Add folder CRUD operations and service layer - Support hierarchical folder navigation - Include folder content listing and management - Add folder move/rename functionality with validation
- Update file module to handle folder contexts - Extend share module for folder sharing capabilities - Add folder routes to server configuration - Update API documentation for folder endpoints
- Add folder API client methods and types - Support folder CRUD and navigation operations - Include hierarchical folder management utilities
- Add folder context to file operations - Update file and share types for folder relationships - Include folder-aware file management methods
- Add complete folder management proxy endpoints - Support folder CRUD, navigation, and content operations - Maintain API consistency with backend folder module
- Add file move proxy endpoint for folder organization - Update file proxy routes with folder support - Enable file-to-folder movement operations
- Add share-specific folder operations - Support adding/removing folders from shares - Include folder context in share management
- Implement hierarchical folder breadcrumb navigation - Add folder action dialogs (create, rename, delete) - Include move items modal for folder organization
|
Thank you so much for this amazing PR! This feature has been requested by users for quite some time, and your contribution will definitely be of great value. Thanks again! |
Sounds good, I'm going to see about consolidating the new breadcrumb and empty state components I added. Also should I rebase this PR off the main branch? |
Great! No need to rebase with main. You can keep it as it is on top of next. When merging, I’ll use a squash merge so your contribution goes into main as a single commit under your authorship, without mixing it with any of my previous commits. |
| <div className="relative"> | ||
| <IconFolder className="h-24 w-24 text-muted-foreground/30" /> | ||
| <div className="absolute inset-0 flex items-center justify-center"> | ||
| <div className="text-4xl">📭</div> |
There was a problem hiding this comment.
Could we use an icon from Tabler Icons here?
| description String? | ||
| objectName String | ||
|
|
||
| // Hierarchical structure |
There was a problem hiding this comment.
I noticed you’ve added several inline comments throughout the code. Since your implementation is already very clear and self-explanatory, it might be nice to remove most of them so we can keep the codebase clean. That said, please feel free to keep any comments you think are truly important for clarifying specific parts.
There was a problem hiding this comment.
Of course, will do👍
|
The screenshots in the docs may need updating. I can try to replicate your setup for them if you’d like, or you could update them, or they can just be left as is. I’ve run the migration once with Prisma, and another perspective on testing/reviewing would be helpful in case I missed something. |
|
Thank you so much @tommy141x! The folder system feature will be available in the next release of Palmr. This feature will definitely bring a huge improvement to the software. I truly appreciate your amazing contribution, it will have a lasting impact on the future of the project! |
feat: add folder system
🎯 Please make sure you are opening this Pull Request against the
nextbranch!📝 Description
Adds folder functionality to Palmr. Users can now create folders, organize files within them, and share entire folders.
Files now have a folderId to link them to folders. Folders can be shared using the same system as files through a ShareFolders table.
Added API endpoints for folder operations, has equivilant routes and controllers as files, except for presigned and download URLs.
Created tree navigation components, folder management modals, and made the FilesView component work for both the files page and share pages so as not to duplicate a ton of code.
This work was based off the main branch since the next branch was behind main when I started.
This is the largest PR I've ever made and I'm ready to make any necessary changes based on feedback.
🔗 Related Issue(s)
#193 Folders
#114 [Feature] Create folder organization for files and allow shares to be created from folders
💡 Motivation and Context
I like Palmr but wanted folders, and noticed others did too. Flat file structure doesn't scale well for users with many files who need organization.
🤖 Use of Artificial Intelligence (AI)
🧪 How Has This Been Tested?
Through both the development environment and after building the full app, I tested the following myself (not utilizing any test framework since I did not see one in the project):
📸 Screenshots (if appropriate)
🔄 Types of Changes
✅ Checklist
nextbranch🙏 Thank you for your contribution!