mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 13:38:49 +08:00
feat(editor): implement view extension manager with builder pattern (#12193)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined and modularized the configuration of editor and theme extensions, introducing a chainable API for extension management. - Migrated extension setup to use new provider classes and centralized patch logic, improving maintainability and consistency. - Updated internal extension retrieval processes to use a more explicit, stepwise initialization sequence. - Removed legacy theme and editor config registration from common views and editor setups. - Removed direct patch registrations from editor views, consolidating them into extension providers. - Renamed classes and variables for clarity and consistency across the codebase. - **New Features** - Added new extension providers for editor configuration, theme management, and edgeless block header customization, enabling more flexible and validated extension registration. - Introduced animated viewport focus and dynamic header rendering for edgeless notes and embedded synced documents. - Integrated reactive editor settings and toolbar configurations with workspace-aware base URL resolution. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+6
-1
@@ -56,7 +56,12 @@ export const EdgelessSnapshot = (props: Props) => {
|
||||
const { editorSetting } = framework.get(EditorSettingService);
|
||||
|
||||
const extensions = useMemo(() => {
|
||||
const manager = getViewManager(framework, false);
|
||||
const manager = getViewManager()
|
||||
.config.init()
|
||||
.common(framework)
|
||||
.theme(framework)
|
||||
.database(framework)
|
||||
.linkedDoc(framework).value;
|
||||
return manager
|
||||
.get('preview-edgeless')
|
||||
.concat([ViewportElementExtension('.ref-viewport')]);
|
||||
|
||||
Reference in New Issue
Block a user