mirror of
https://github.com/outline/outline.git
synced 2026-12-06 03:05:08 +03:00
* refactor: Convert Document scene from class to functional component Replace the @observer class component with a functional component using hooks (useStores, useTranslation, useHistory, useLocation) instead of HOC wrappers (withStores, withTranslation, withRouter). All @observable state converted to useState with companion refs for stale closure avoidance in debounced callbacks and unmount cleanup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: Extract save/dirty tracking into useDocumentSave hook Moves all save, autosave, dirty-tracking, template insertion, and unmount cleanup logic from DocumentScene into a dedicated hook. This reduces the component from ~790 to ~500 lines and isolates re-renders from save state changes (isSaving, isPublishing, etc.) to a smaller surface. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: Add JSDoc to DocumentScene Props and function Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * unused * Remove withStores --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>