-
Notifications
You must be signed in to change notification settings - Fork 3k
refactor(notes): improve notes management with local state and file handling #10395
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: main
Are you sure you want to change the base?
Conversation
…andling - Replace UUID-based IDs with SHA1 hash of file paths for better consistency - Remove database storage for notes tree, use local state management instead - Add localStorage persistence for starred and expanded states - Improve cross-platform path normalization (replace backslashes with forward slashes) - Refactor tree operations to use optimized in-memory operations - Enhance file watcher integration for better sync performance - Simplify notes service with direct file system operations - Remove database dependencies from notes tree management 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Note This comment was translated by Claude. Several issues
Original Content几个问题
|
Note This comment was translated by Claude. A few points that need optimization
Original Content有几个需要优化的点
|
- 将starred和expanded路径状态从localStorage迁移到Redux store - 添加版本159迁移逻辑,自动从localStorage迁移现有数据到Redux - 优化NotesPage组件,使用Redux状态管理替代本地localStorage操作 - 改进SaveToKnowledgePopup的错误处理和验证逻辑 - 删除NotesTreeService中已废弃的localStorage写入函数 - 增强组件性能,使用ref避免不必要的依赖更新 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Note This comment was translated by Claude. We can unify the style-related changes later. Original Content样式相关的之后再统一改吧 |
Note This comment was translated by Claude. When there's time, two points can be further optimized to significantly improve the notes experience:
Original Content有时间可以继续优化两个点,可以让笔记使用体验大幅提高:
|
- Implemented an input field for renaming the current note directly in the HeaderNavbar. - Added handlers for title change, blur, and key events to manage renaming logic. - Updated the breadcrumb display to accommodate the new title input. - Enhanced styling for the title input to ensure seamless integration with the existing UI. This feature improves user experience by allowing quick edits without navigating away from the notes list.
Note This comment was translated by Claude. Since it involves data changes, let's make these modifications in v2. Original Content涉及到数据,在v2中改吧 |
Fix #10285 Fix #10388