mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-04 08:38:34 +00:00
Key Changes: 1. **Removal of Scroll Anchoring Widget** - Removed the scroll anchoring widget import and its related implementation from `blocksuite/affine/block-root/src/common-specs/widgets.ts` 2. **Enhanced React-Lit Integration** - Added `ReactWebComponent` type export in `packages/frontend/component/src/lit-react/index.ts` - Refactored text renderer component to use React integration: - Added React import and created `LitTextRenderer` component using `createReactComponentFromLit` - Moved the component declaration to a more appropriate location 3. **AI Feature Flag Integration** - Added feature flag check for AI functionality in `enableAIExtension` - Only enables AI extensions if the `enable_ai` flag is true 4. **Component Restructuring** - Moved several components and utilities to dedicated extension files - Consolidated Lit adapter implementations - Removed direct widget imports in favor of extension-based approach - Reorganized editor component structure for better maintainability 5. **File Reorganization** - Removed `specs/custom/spec-patchers.ts` and distributed its functionality across multiple extension files - Created new extension files for various features like: - Attachment embed views - Doc mode service - Doc URL handling - Edgeless clipboard - Mobile support - Note configuration - Various service patches (notification, peek view, quick search, etc.) 6. **Mobile Support Improvements** - Refactored mobile extension enablement to be more modular - Moved mobile-specific widget omissions into a dedicated extension 7. **Type System Improvements** - Added more specific type imports for editors and components - Enhanced type safety across the codebase This PR appears to be a significant refactoring effort focused on: 1. Improving code organization through better separation of concerns 2. Enhancing the integration between React and Lit components 3. Adding feature flag support for AI capabilities 4. Making the codebase more maintainable and modular 5. Improving mobile support 6. Strengthening type safety The changes suggest a move towards a more extension-based architecture, where functionality is more clearly separated into distinct modules rather than being centralized in larger files.