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

feat(edgeless): edgeless earser tool #3126

Merged
merged 4 commits into from
Jun 20, 2023
Merged

feat(edgeless): edgeless earser tool #3126

merged 4 commits into from
Jun 20, 2023

Conversation

regischen
Copy link
Member

closes #2943

@codesandbox
Copy link

codesandbox bot commented Jun 15, 2023

This branch is running in CodeSandbox. Use the links below to review this PR faster.


CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

@vercel
Copy link

vercel bot commented Jun 15, 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 Jun 20, 2023 0:49am
blocksuite-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2023 0:49am

@Flrande
Copy link
Member

Flrande commented Jun 15, 2023

If we incorporate transparency into CRDT, would there be any need for an additional view layer?

@regischen
Copy link
Member Author

regischen commented Jun 15, 2023

If we incorporate transparency into CRDT, would there be any need for an additional view layer?

It's definite that transparency would be into CRDT in the future.
But in this case, I think it still needs.
because when we use eraser tool to erase element. The element be erased will show opacity. It's a state indicator instead of changing of actual opacity. It's a middle state.
And I think in the future, we still need some "middle state" in view which actually doesn't change the crdt model.
Because some interactions need to be processed in a period of time, it's not like changing fill color which is instant. we perhaps shouldn't change the CRDT's model before these interactions are completed. However, during the process of these interactions, rendering may potentially change.

@Flrande
Copy link
Member

Flrande commented Jun 15, 2023

we still need some "middle state" in view which actually doesn't not change the crdt model.

I understand that there might be such an intermediate state, but I'm unsure if it requires adding a global code hierarchy. Would placing this intermediate state as a field within the element suffice for this purpose? My main concern is whether the view would overlap with the existing responsibilities of the surface since both essentially involve CRUD operations on whiteboard elements. Can you provide other examples where this intermediate state is necessary?

@regischen
Copy link
Member Author

we still need some "middle state" in view which actually doesn't not change the crdt model.

I understand that there might be such an intermediate state, but I'm unsure if it requires adding a global code hierarchy. Would placing this intermediate state as a field within the element suffice for this purpose? My main concern is whether the view would overlap with the existing responsibilities of the surface since both essentially involve CRUD operations on whiteboard elements. Can you provide other examples where this intermediate state is necessary?

the view is not involved with crdt operations. right?
another example is

Screen.Recording.2023-06-15.at.18.25.12.mov

if in the future, we have mindmap. When we drag one child element to change it's position. I think there is a middle state.

Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

Should wait for #3118

@doodlewind doodlewind enabled auto-merge (squash) June 20, 2023 12:49
@doodlewind doodlewind merged commit 9440146 into master Jun 20, 2023
18 checks passed
@doodlewind doodlewind deleted the feat-edgeless-erase branch June 20, 2023 12:56
fundon added a commit to fundon/blocksuite that referenced this pull request Jun 20, 2023
* master:
  feat(edgeless): support manage note index and hidden state (toeverything#3177)
  feat(edgeless): keep brush state in one session (toeverything#3161)
  feat(edgeless): edgeless earser tool (toeverything#3126)
  fix(store): waitForLoaded timeout if doc loaded (toeverything#3176)
  feat(block-std): add block spec (toeverything#3175)
  feat: the mouse pointer can become a gesture when dragging (toeverything#3174)
  fix: text cannot be selected in edit mode (toeverything#3173)
  refactor(database): decouple table render from model (toeverything#3151)
  fix: handling backspace key press for cursor transition from paragraph to page title (toeverything#3148)
  ci: add `lit-analyzer` (toeverything#3168)
  refactor: use transform instead of position on selected-blocks (toeverything#3166)
  feat(block-std): init package and move event dispatcher to std (toeverything#3164)
  feat(store): let user control subdoc load timing after page meta added (toeverything#3157)
  fix(virgo): handle the deletion of selected text (toeverything#3155)
  refactor(blocks): make elements as prop of surface block (toeverything#3156)
  chore: bump lock file version (toeverything#3154)
  refactor(phasor): prevent `SurfaceElement` export (toeverything#3150)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

Support eraser tool in the whiteboard
3 participants