Skip to content

feat(editor): add mobile auto-save toggle with i18n and cleanup fixes#1152

Merged
perber merged 2 commits into
mainfrom
feat/mobile-autosave-toggle
Jun 10, 2026
Merged

feat(editor): add mobile auto-save toggle with i18n and cleanup fixes#1152
perber merged 2 commits into
mainfrom
feat/mobile-autosave-toggle

Conversation

@perber

@perber perber commented Jun 10, 2026

Copy link
Copy Markdown
Owner
  • Add auto-save toggle to mobile MarkdownToolbar dropdown (DropdownMenuCheckboxItem)
  • Show 'paused' badge next to auto-save label on version conflict
  • Share autoSaveStatus via useEditorStore (non-persisted) to avoid prop drilling
  • Fix: unmount cleanup now resets store autoSaveStatus to 'idle'
  • Fix: remove dead 'saved' member from AutoSaveStatus union
  • Fix: add comment explaining local useState is a load-bearing effect dependency
  • Translate all toolbar tooltip labels, aria-labels and table picker strings (editor ns)
  • Translate useAutoSave toast messages via useTranslation hook

- Add auto-save toggle to mobile MarkdownToolbar dropdown (DropdownMenuCheckboxItem)
- Show 'paused' badge next to auto-save label on version conflict
- Share autoSaveStatus via useEditorStore (non-persisted) to avoid prop drilling
- Fix: unmount cleanup now resets store autoSaveStatus to 'idle'
- Fix: remove dead 'saved' member from AutoSaveStatus union
- Fix: add comment explaining local useState is a load-bearing effect dependency
- Translate all toolbar tooltip labels, aria-labels and table picker strings (editor ns)
- Translate useAutoSave toast messages via useTranslation hook
Copilot AI review requested due to automatic review settings June 10, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a mobile-friendly auto-save control and broader editor i18n coverage, while centralizing auto-save status in the editor store to reduce prop drilling and improve UI feedback (e.g., “paused” on version conflict).

Changes:

  • Introduces autoSaveStatus (non-persisted) in useEditorStore, and syncs it from useAutoSave.
  • Localizes editor toolbar tooltips/labels (including table picker aria-labels) and auto-save toast messages via the editor i18n namespace.
  • Adds mobile dropdown checkbox items for line wrap and auto-save, including a “paused” badge when a version conflict pauses auto-save.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
ui/leafwiki-ui/src/stores/editor.ts Adds AutoSaveStatus and exposes autoSaveStatus/setAutoSaveStatus in the Zustand editor store (non-persisted via partialize).
ui/leafwiki-ui/src/locales/en/editor.json Adds editor.toolbar.* strings and localized auto-save toast strings.
ui/leafwiki-ui/src/features/editor/useAutoSave.ts Removes dead 'saved' status, localizes toast messages, and mirrors status into the editor store; resets store status on unmount.
ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx Localizes tooltips/labels/aria-labels and adds mobile dropdown checkbox toggles for line wrap + auto-save with a paused indicator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx
Comment thread ui/leafwiki-ui/src/features/editor/MarkdownToolbar.tsx
@perber
perber merged commit 0f7048a into main Jun 10, 2026
9 checks passed
@perber
perber deleted the feat/mobile-autosave-toggle branch June 10, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants