memos/web/src
Johnny 2516cdf2b4 refactor: clean up MemoView and MemoEditor component architecture
This commit refactors MemoView and MemoEditor components for better
maintainability, introducing React Context, custom hooks, and improved
folder structure.

MemoView improvements:
- Introduce MemoViewContext to eliminate prop drilling
- Reduce MemoHeader props from 18 to 8
- Reduce MemoBody props from 9 to 4
- Extract custom hooks: useMemoViewDerivedState, useMemoEditor,
  useMemoHandlers for better separation of concerns
- Fix React hooks ordering bug in edit mode

MemoEditor improvements:
- Extract state management into useMemoEditorState hook
- Extract keyboard handling into useMemoEditorKeyboard hook
- Extract event handlers into useMemoEditorHandlers hook
- Extract initialization logic into useMemoEditorInit hook
- Reduce main component from 461 to 317 lines (31% reduction)

Folder structure cleanup:
- Move SortableItem to memo-metadata (correct location)
- Move ErrorBoundary to components folder
- Flatten Toolbar/InsertMenu structure (remove unnecessary nesting)
- Consolidate hooks in main hooks folder
- Consolidate types in main types folder

Benefits:
- Better separation of concerns
- Improved testability
- Easier maintenance
- Cleaner code organization
- No functionality changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 11:15:20 +08:00
..
components refactor: clean up MemoView and MemoEditor component architecture 2025-11-30 11:15:20 +08:00
helpers refactor: migrate eslint 2025-04-01 00:04:43 +08:00
hooks fix(web): resolve tag sidebar filtering and reactivity issues 2025-11-25 22:17:01 +08:00
layouts fix(web): resolve tag sidebar filtering and reactivity issues 2025-11-25 22:17:01 +08:00
lib chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
locales refactor: remove enable link preview setting 2025-11-30 10:34:22 +08:00
pages chore(web): add external link icon for memo attachments 2025-11-24 21:56:14 +08:00
router chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
store feat: add midnight theme (#5288) 2025-11-27 21:21:57 +08:00
themes feat: add midnight theme (#5288) 2025-11-27 21:21:57 +08:00
types refactor: remove enable link preview setting 2025-11-30 10:34:22 +08:00
utils feat: add midnight theme (#5288) 2025-11-27 21:21:57 +08:00
App.tsx chore(web): migrate from ESLint+Prettier to Biome 2025-11-14 23:58:07 +08:00
grpcweb.ts refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00
i18n.ts feat: add norwegian bokmål (nb) translation (#4561) 2025-03-27 13:14:12 +08:00
index.css fix(web): refactor task list styles to follow GitHub standard (#5253) 2025-11-14 23:37:00 +08:00
main.tsx refactor: rename workspace to instance throughout codebase 2025-11-05 23:35:35 +08:00