Skip to content
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): move editor components to frontend core #10335

Merged

Conversation

Saul-Mirone
Copy link
Contributor

@Saul-Mirone Saul-Mirone commented Feb 21, 2025

TL;DR

Moved editor components from BlockSuite presets to AFFiNE core and updated imports accordingly.

What changed?

  • Relocated EdgelessEditor and PageEditor components from BlockSuite presets to AFFiNE core
  • Removed basic editor examples from playground
  • Updated import paths across the codebase to reference new component locations
  • Added editor effects registration in AFFiNE core
  • Removed editor exports from BlockSuite presets

How to test?

  1. Launch the application
  2. Verify both page and edgeless editors load correctly
  3. Confirm editor functionality remains intact including:
    • Document editing
    • Mode switching
    • Editor toolbars and controls
    • Multiple editor instances

Why make this change?

This change better aligns with AFFiNE's architecture by moving editor components closer to where they are used. It reduces coupling with BlockSuite presets and gives AFFiNE more direct control over editor customization and implementation.

Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added test Related to test cases app:core labels Feb 21, 2025
@Saul-Mirone Saul-Mirone changed the title refactor(editor): remove ref to AffineEditorContiner refactor(editor): move editor components to frontend core Feb 21, 2025
@Saul-Mirone Saul-Mirone marked this pull request as ready for review February 21, 2025 02:52
@Saul-Mirone Saul-Mirone requested a review from a team as a code owner February 21, 2025 02:52
@graphite-app graphite-app bot requested review from a team February 21, 2025 02:52
@Saul-Mirone Saul-Mirone force-pushed the 02-21-refactor_editor_remove_ref_to_affineeditorcontiner branch 2 times, most recently from cc47be2 to e351bad Compare February 21, 2025 02:59
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.37%. Comparing base (7f833f8) to head (adcc6b5).
Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #10335      +/-   ##
==========================================
+ Coverage   54.36%   54.37%   +0.01%     
==========================================
  Files        2336     2334       -2     
  Lines      108103   108055      -48     
  Branches    17854    17848       -6     
==========================================
- Hits        58769    58758      -11     
+ Misses      48011    47974      -37     
  Partials     1323     1323              
Flag Coverage Δ
server-test 78.71% <ø> (ø)
unittest 31.28% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Saul-Mirone Saul-Mirone force-pushed the 02-21-refactor_editor_remove_ref_to_affineeditorcontiner branch from e351bad to 2683c12 Compare February 21, 2025 03:22
Copy link

graphite-app bot commented Feb 21, 2025

Merge activity

### TL;DR
Moved editor components from BlockSuite presets to AFFiNE core and updated imports accordingly.

### What changed?
- Relocated `EdgelessEditor` and `PageEditor` components from BlockSuite presets to AFFiNE core
- Removed basic editor examples from playground
- Updated import paths across the codebase to reference new component locations
- Added editor effects registration in AFFiNE core
- Removed editor exports from BlockSuite presets

### How to test?
1. Launch the application
2. Verify both page and edgeless editors load correctly
3. Confirm editor functionality remains intact including:
   - Document editing
   - Mode switching
   - Editor toolbars and controls
   - Multiple editor instances

### Why make this change?
This change better aligns with AFFiNE's architecture by moving editor components closer to where they are used. It reduces coupling with BlockSuite presets and gives AFFiNE more direct control over editor customization and implementation.
@graphite-app graphite-app bot force-pushed the 02-21-refactor_editor_remove_ref_to_affineeditorcontiner branch from 2683c12 to adcc6b5 Compare February 21, 2025 04:28
@graphite-app graphite-app bot merged commit adcc6b5 into canary Feb 21, 2025
66 checks passed
@graphite-app graphite-app bot deleted the 02-21-refactor_editor_remove_ref_to_affineeditorcontiner branch February 21, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:core test Related to test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants