toeverything / blocksuite

🧩 Content editing tech stack for the web - BlockSuite is a toolkit for building editors and collaborative applications.
https://blocksuite.io
Mozilla Public License 2.0
4.37k stars 398 forks source link

refactor(blocks): editor-toolbar component #7475

Closed fundon closed 2 months ago

fundon commented 3 months ago

Closes: BS-702

editor-toolbar

This is a generic toolbar component that can be used in different modes.

Scenarios:

Includes components:

These duplicate components will be removed in the following PRs: See packages/blocks/src/root-block/edgeless/components/buttons.

vercel[bot] commented 3 months ago

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 Jul 10, 2024 3:18am
1 Skipped Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **blocksuite-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/toeverything/blocksuite-docs/3ngCdUH5iY11GrSb5CwqVY9Jpheb)) | [Visit Preview](https://blocksuite-docs-git-0702-feat-affine-toolbar-toeverything.vercel.app) | | Jul 10, 2024 3:18am |
graphite-app[bot] commented 3 months ago

Your org has enabled the Graphite merge queue for merging into master

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

fundon commented 3 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @fundon and the rest of your teammates on Graphite Graphite

Saul-Mirone commented 3 months ago

You should remove the duplicate components in this graphite stack.

fundon commented 3 months ago

The next PR will include it in stack. But there are many files to change. Step by step.

fundon commented 2 months ago
  1. The base direction is to avoid more <affine-xxx> components since for common components, they should be moving towards reusable components that are not specific to Affine. So I'd suggest making the naming <editor-toolbar>, <editor-toolbar-separator>, <editor-menu-xxx>.

Good idea. Make sense.

  1. Are these components now ready to be reused in doc editor? If not, keeping the <edgeless-xxx> naming may make more sense.

Sure, they should all be common components.

graphite-app[bot] commented 2 months ago

Merge activity