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

Announcement: The Evolution of BlockSuite #9045

Open
Saul-Mirone opened this issue Dec 25, 2024 · 9 comments
Open

Announcement: The Evolution of BlockSuite #9045

Saul-Mirone opened this issue Dec 25, 2024 · 9 comments

Comments

@Saul-Mirone
Copy link
Collaborator

Dear Community,

We are excited to share some important updates about the future of BlockSuite and AFFiNE.

BlockSuite has been the core editor powering AFFiNE, designed initially as a universal editor framework. Over time, as both BlockSuite and AFFiNE evolved, BlockSuite gradually incorporated more and more of AFFiNE’s specific business logic. While this close integration brought significant enhancements to AFFiNE, it also led BlockSuite away from its original vision as a standalone, universal framework.

To realign with our goals and streamline development, we have made the decision to merge BlockSuite's codebase into AFFiNE. This change allows us to focus on refining the editor specifically for AFFiNE while maintaining its excellent performance and features for our users.

At the same time, we remain committed to the idea of a universal editor framework. Therefore, we will extract and rebuild the core elements of BlockSuite into a new, independent project. This will allow us to return to the original mission of BlockSuite—creating a flexible, universal editor framework that can be used beyond AFFiNE.

What This Means for You

For AFFiNE users: The transition will improve the editor experience within AFFiNE, as we can now tailor BlockSuite's capabilities > to meet the specific needs of AFFiNE users more effectively.

For developers and contributors: The new universal editor project derived from BlockSuite's core will provide an exciting opportunity to collaborate on an open-source editor framework designed for broader use cases.

What’s Next?

We are currently working on integrating BlockSuite into AFFiNE while simultaneously outlining the roadmap for the new universal editor framework. We will keep you updated on both efforts and invite you to contribute your feedback and ideas.

Thank you for being a part of this journey with us. We’re excited about the possibilities this change brings for AFFiNE, BlockSuite, and the community at large.

Stay tuned, and let’s build the future of editing together!

Best regards,
The AFFiNE Team

@medzhidov
Copy link

Will you continue support blocksuite as separate project?

@Saul-Mirone
Copy link
Collaborator Author

Will you continue support blocksuite as separate project?

Yes, we plan to move back the infra part once it's stable.

@alterhuman
Copy link

Sorry for an update comment, but it's been a month. Any rough ETA on when the new repo (of blocksuite/universal editor framework) will be available?

@Saul-Mirone
Copy link
Collaborator Author

@alterhuman no, it's a long term plan and will take several months.

@goldsam
Copy link
Contributor

goldsam commented Jan 25, 2025

So you have a vision of a "universal framework" but not universal enough to support AFFiNE? I have noticed the significant coupling between AFFiNE and BlockSuite since I took an interest in this project, and this announcement unfortunately validates my growing suspicions. Sorry to be a jerk, but you have effectively admitted that creating such a "universal framework" is either too hard or too much of a commitment for you. If it doesn't work for your project, then why would it work for mine?

Although it is expected that a projects' API and structure may evolve significantly prior to a 1.0 release, this is also a major shift in project goals and leadership values. I see this as a glaring red flag that any project with a reliance on BlockSuite is at risk. This is a risk I am unwilling to take.

I wish you the best of luck with AFFiNE.

@Saul-Mirone
Copy link
Collaborator Author

So you have a vision of a "universal framework" but not universal enough to support AFFiNE? I have noticed the significant coupling between AFFiNE and BlockSuite since I took an interest in this project, and this announcement unfortunately validates my growing suspicions. Sorry to be a jerk, but you have effectively admitted that creating such a "universal framework" is either too hard or too much of a commitment for you. If it doesn't work for your project, then why would it work for mine?

Although it is expected that a projects' API and structure may evolve significantly prior to a 1.0 release, this is also a major shift in project goals and leadership values. I see this as a glaring red flag that any project with a reliance on BlockSuite is at risk. This is a risk I am unwilling to take.

I wish you the best of luck with AFFiNE.

Most of your view make sense. I realized from the beginning that there was a significant coupling between this project and Affine, and I made a lot of efforts to decouple it from Affine as much as possible.

But the problem is that for blocksuite, Affine, as its most important user (not the only one for the time being, because we don't have any other income), needs more editor-based features. So the improvement of the architecture and the iteration of new features must be carried out at the same time, which means that putting blocksuite in Affine can achieve our goal at the fastest speed: supporting Affine while improving the architecture of blocksuite as much as possible to a state where it can be used independently.

No one likes breaking change, but it is inevitable for blocksuite, because the project lacked good design and a healthy iteration rhythm at the beginning, which led to the later blocksuite project basically becoming the editor for Affine. An example is that all blocks were only considered to work in Affine at the beginning, and over time, more and more APIs that must be obtained from Affine were added to them.

@catouse
Copy link

catouse commented Jan 25, 2025

Anyway, blocksuite is an amazing project, but change is inevitable. It's not late now. Good job!

@goldsam
Copy link
Contributor

goldsam commented Jan 27, 2025

@Saul-Mirone Is this friction against iteration speed caused by the two projects existing in separate repositories? I would be curious to better understand your conclusion that the cost to maintain all of Blocksuite as a dependency has become too great. I'm hoping I could convince you to find some middle ground.

From analysis on git log output, I was able to confirm that libs under package/framework touch far fewer commits compared to presets, blocks, affine/data-view, and affine/components. Its also worth noting that these framework libs all seem quite well designed (IMHO) with no coupling to any of the other aforementioned libs.

Given the stability of these framework packages, would you consider continuing to support and use them in AFFiNE without forking? Perhaps it would make more sense to migrate just the component libraries into AFFiNE until more universal editor and other components can be offered. This would still offer tremendous value.

I apologize for my harshness above as I was experiencing a crisis of confidence upon discovering this issue. My team has spent significant effort on a project Built upon BlockSuite, so this came as a big surprise to me.

@Saul-Mirone
Copy link
Collaborator Author

@goldsam Iteration speed is undoubtedly one of the most important reasons. Another important reason is that the coupling is too deep, which makes us not even know whether some codes written for affine can be removed, which greatly affects our reconstruction.

At the beginning, I agreed with you that we would keep the framework and migrate the rest. However, I soon realized that we would make great adjustments to the framework, including but not limited to:

  1. Store-level extension, which means that users can run some functions of the data layer of blocksuite without the browser, such as markdown export.
  2. Universal drag and drop capability, which means that users can drag the content in the editor between different browsers.
  3. More crdt-friendly block structure.
  4. Remove the workspace management, manage doc instead. Let a module in editor to manage the whole workspace doesn't make any sense.

So we discussed internally and decided to move all modules first, but once the framework-related codes have completed the iteration, we will synchronize them to this repository immediately. And making a set of community-friendly block sets that are not related to affine is my personal wish. I hope we can achieve it when the iteration pressure is not as great as it is now.

The entire team and I have put a lot of energy into this project and we don't want it to end here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

5 participants