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): add a paragraph block when clicking on empty space on the note block #6870

Merged
merged 11 commits into from
Apr 25, 2024

Conversation

golok727
Copy link
Contributor

close #6631

Copy link

vercel bot commented Apr 24, 2024

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 Apr 25, 2024 4:09am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2024 4:09am

Copy link
Member

@donteatfriedrice donteatfriedrice left a comment

Choose a reason for hiding this comment

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

Thanks for the work. In this case, when the last block is a non-text block, a paragraph block will always be added at the bottom. The logic here should be to focus on the nearest text block first when clicking. If the nearest block is not text block, and the last block is not a text block, then add an empty block

@golok727
Copy link
Contributor Author

when the last block is a non-text block, a paragraph block will always be added at the bottom.

When I tested this, I found that a paragraph block wasn't added at the bottom as described when adding a non-text. We need to click on the empty area in the doc to add a new text block.

Thing.mp4

@donteatfriedrice
Copy link
Member

when the last block is a non-text block, a paragraph block will always be added at the bottom.

When I tested this, I found that a paragraph block wasn't added at the bottom as described when adding a non-text. We need to click on the empty area in the doc to add a new text block.

Thing.mp4

You can add some paragraph blocks before the table, and click at the top or left or right near the paragraph blocks, in this case, should focus on the paragraph first like in doc mode. In the video you uploaded, there are no text blocks before table,

@golok727
Copy link
Contributor Author

golok727 commented Apr 24, 2024

@donteatfriedrice How is this behavior?
I think we should consider adding a + button like in notion beside the drag handle

Thing2.mp4

@golok727 golok727 marked this pull request as draft April 24, 2024 12:24
@donteatfriedrice
Copy link
Member

@donteatfriedrice How is this behavior? I think we should consider adding a + button like in notion beside the drag handle

Thing2.mp4

Looks great! Thanks! Could you add tests for it ?

@donteatfriedrice donteatfriedrice added the test needed Should provide test cases altogether label Apr 25, 2024
@EYHN EYHN enabled auto-merge (squash) April 25, 2024 03:59
@EYHN EYHN merged commit 9257cf4 into toeverything:master Apr 25, 2024
18 of 19 checks passed
@golok727
Copy link
Contributor Author

@donteatfriedrice How is this behavior? I think we should consider adding a + button like in notion beside the drag handle
Thing2.mp4

Looks great! Thanks! Could you add tests for it ?

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test needed Should provide test cases altogether
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Unable to use note block after inserting a table in Edgeless editor.
3 participants