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: @blocksuite/editor -> @blocksuite/presets #5570

Merged
merged 4 commits into from
Dec 5, 2023
Merged

Conversation

doodlewind
Copy link
Member

@doodlewind doodlewind commented Dec 5, 2023

This is intended to expose more prebuilt editors and auxiliary components under the concept of preset. The auxiliary components will be defined as fragments.

  • The EditorPresets include DocEditor, EdgelessEditor and more.
  • The FragmentPresets include AI copilot panel and TOC panels, which shares the block tree under the same page instance, but may not share the same lifecycle of the editor component.

Migration steps:

  1. Perform the package renaming with no API breaking changes in this PR.
  2. Bump AFFiNE.
  3. Expose the new entities and APIs in PR afterwards, with EditorContainer kept for backwards compatibility.

Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 3:38am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Dec 5, 2023 3:38am

@@ -190,7 +190,7 @@ export const PagePreset: BlockSpec[] = [
},
},
},
embedGithubBlockSpec,
EmbedGithubBlockSpec,
];

export const EdgelessPreset: BlockSpec[] = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to rename _presets in blocks to _blocks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about make it _specs?

@doodlewind doodlewind marked this pull request as ready for review December 5, 2023 03:40
@doodlewind doodlewind merged commit 5a936ff into master Dec 5, 2023
20 checks passed
@doodlewind doodlewind deleted the 1205/presets branch December 5, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Contains breaking change that must be addressed notable Major improvement worth emphasizing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants