memos/web/tests
boojack 1e3ec38fa1 refactor(editor): modularize formatting and simplify editor state
Behavior-preserving restructure of the MemoEditor subsystem for simplicity
and extensibility:

- Add a data-driven command catalog (editorCommands.ts) as the single source
  for formatting verbs; the toolbar, active-state hook, and WYSIWYG handle all
  derive from it, so adding a verb is a one-file change.
- Add a createSuggestionExtension factory; TagSuggestion consumes it, so new
  `/` or `@` triggers reuse the shared popup in ~10 lines.
- Collapse FormattingController into a single EditorController with an optional
  `formatting` capability; PlainEditor is an honest textarea fallback (no faked
  formatting); replace stringly-typed isActive with typed getActiveFormats.
- Move audio-recorder state out of the reducer into useAudioRecorder, keeping a
  single recorderBusy flag in the store.
- Convert the editor context to an external store (useSyncExternalStore) with
  per-slice subscriptions, so typing no longer re-renders the toolbar, insert
  menu, or metadata.
- Extract the shared #tag lexing grammar (tag-grammar.ts) used by both the
  editor tokenizer and the remark renderer.
- Remove dead reducer actions/cases and fix a preview blob-URL leak on the
  upload path.

Add tests for the command catalog, suggestion factory, and autosave.
2026-06-22 23:51:59 +08:00
..
fixtures/markdown-corpus feat(web): markdown WYSIWYG editor with raw-mode toggle (#6030) 2026-06-12 09:34:51 +08:00
about-page.test.tsx fix(web): improve mobile control spacing 2026-06-09 21:04:47 +08:00
activity-calendar-tooltip.test.ts feat(activity-calendar): aggregate by ViewContext.timeBasis 2026-05-02 00:26:53 +08:00
auth-redirect.test.ts refactor(web/routing): guard-based auth flow, migrate tests to Vitest (#5848) 2026-04-18 01:06:54 +08:00
calendar-cell-empty-clickable.test.tsx feat(memo): create memos on the selected calendar date (#5925) 2026-05-02 11:53:50 +08:00
derive-default-create-time.test.ts feat(memo): create memos on the selected calendar date (#5925) 2026-05-02 11:53:50 +08:00
editor-commands.test.ts refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
editor-controller.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
editor-load-guard.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
editor-mode-toggle.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
editor-mode.test.ts refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
editor-preserved.test.ts refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
editor-tag.test.ts refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
filtered-memo-stats.test.ts chore: add batch get settings API 2026-05-09 09:30:28 +08:00
formatting-controller.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
formatting-toolbar.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
guards.test.tsx refactor(web): use / as the home route instead of /home 2026-05-12 23:17:46 +08:00
hoist-new-memo.test.ts feat: surface newly created memo above pinned list 2026-06-21 14:11:46 +08:00
hooks.test.tsx refactor(frontend): remove react-use dependency 2026-05-31 18:32:17 +08:00
i18n-locale-search.test.ts feat(i18n): add searchable locale picker 2026-06-09 09:33:17 +08:00
insert-menu-mode-toggle.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
locale-picker.test.tsx feat(i18n): add searchable locale picker 2026-06-09 09:33:17 +08:00
location-picker.test.tsx perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00
markdown-roundtrip.test.ts refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
markdown-task-actions.test.ts feat(memo): add task list quick actions (#5983) 2026-05-27 09:13:55 +08:00
memo-body-compact.test.tsx fix(memo): preserve expanded todo list state 2026-06-08 19:11:29 +08:00
memo-content-compact-threshold.test.ts feat: surface newly created memo above pinned list 2026-06-21 14:11:46 +08:00
memo-content-list.test.tsx fix(markdown): keep task item content in one grid column 2026-05-27 23:57:23 +08:00
memo-content-paragraph.test.tsx feat(stats): support filtered all-user stats 2026-05-09 09:11:04 +08:00
memo-content-security.test.tsx fix(web): preserve task checkbox state (#5867) 2026-04-20 23:27:00 +08:00
memo-editor-cache.test.ts fix(web): preserve task checkbox state (#5867) 2026-04-20 23:27:00 +08:00
memo-editor-paste.test.tsx refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
memo-share-image.test.ts chore: remove duplicate tags from share image preview 2026-04-25 22:22:49 +08:00
mermaid-block.test.tsx perf: lazy load heavy first-screen dependencies (#5947) 2026-05-12 20:11:39 +08:00
oauth.test.ts feat(auth): add SSO user identity linkage (#5883) 2026-04-23 08:51:45 +08:00
paged-memo-list.test.tsx feat(frontend): add pixel bird tilemaps 2026-05-14 00:03:21 +08:00
placeholder-component.test.tsx feat(frontend): add pixel bird tilemaps 2026-05-14 00:03:21 +08:00
placeholder-pool.test.ts feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
plain-editor-controller.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
preview-image-dialog.test.tsx chore(media): add zoom controls to preview dialog 2026-06-02 22:46:07 +08:00
redirect-safety.test.ts feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
remark-tag.test.tsx fix(markdown): ignore tags inside links 2026-06-06 00:01:28 +08:00
router-config.test.tsx feat(about): add about page with bird sprites 2026-05-14 20:30:37 +08:00
setup.ts feat(web): markdown WYSIWYG editor with raw-mode toggle (#6030) 2026-06-12 09:34:51 +08:00
suggestion-extension.test.ts refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
suggestion-menu.test.tsx refactor(web): rename editor dirs and simplify raw mode to a plain textarea 2026-06-13 01:08:38 +08:00
toolbar-compact-width.test.ts feat(editor): add focus-mode formatting toolbar 2026-06-21 11:57:45 +08:00
use-auto-save.test.tsx refactor(editor): modularize formatting and simplify editor state 2026-06-22 23:51:59 +08:00
video-poster.test.tsx fix(web): render video attachment posters on mobile 2026-06-02 23:08:16 +08:00