-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(editor): modular custom specs #10398
refactor(editor): modular custom specs #10398
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #10398 +/- ##
==========================================
- Coverage 54.23% 54.23% -0.01%
==========================================
Files 2336 2340 +4
Lines 108117 108150 +33
Branches 17876 17887 +11
==========================================
+ Hits 58639 58652 +13
- Misses 48140 48169 +29
+ Partials 1338 1329 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merge activity
|
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.
d9327eb
to
60b994f
Compare
Key Changes:
blocksuite/affine/block-root/src/common-specs/widgets.ts
ReactWebComponent
type export inpackages/frontend/component/src/lit-react/index.ts
LitTextRenderer
component usingcreateReactComponentFromLit
enableAIExtension
enable_ai
flag is truespecs/custom/spec-patchers.ts
and distributed its functionality across multiple extension filesThis PR appears to be a significant refactoring effort focused on:
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.