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

fix(edgeless): note does not update when other peers modified note #4808

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

doouding
Copy link
Member

close #4697

The BlockSuiteRoot component has built a rerender mechanism inside. But, it does not work for edgeless mode cause edgeless wraps everything inside SurfaceBlock which stops the notes that are deep inside the components tree from updating.

I added an extra slot listener to track notes' updates individually.

@vercel
Copy link

vercel bot commented Sep 18, 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 Sep 18, 2023 10:32am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Sep 18, 2023 10:32am

@regischen
Copy link
Member

Is it the content or the position that can't be synchronized? In render, there is root's render method, so theoretically, there should be event listeners.

@doouding
Copy link
Member Author

Both, like when you drag the note or press enter to add a new paragraph. In the previous version (before SurfaceBlockComponent was introduced), everything was placed directly under the EdgelessPageBlockComponent, the rerender works well.

I wonder if there's a better approach to solving this issue.

@doouding doouding marked this pull request as ready for review September 18, 2023 09:17
@doouding doouding added the dont merge Experimental pull requests label Sep 18, 2023
@Saul-Mirone
Copy link
Collaborator

I think we should merge this pr. Although there may have better solutions, we can improve the implementation later. Anyway, it's a fatal bug. And I think we should add some e2e test for this case.

@doouding
Copy link
Member Author

Got it. I'll merge after pushing some related fixes.

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.

Note doesn't follow selection on collaboration in edgeless
3 participants