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(page): handle delete or backspace align with embed block #6364

Conversation

donteatfriedrice
Copy link
Member

To close #6327

Forward delete before embed block will be ignored.

Pressing backspace when adjacent to an embed block will select the embed block.

Copy link

vercel bot commented Mar 4, 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 Mar 4, 2024 8:55am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Mar 4, 2024 8:55am

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.

I think this should a use case for #6329

@donteatfriedrice
Copy link
Member Author

I think this should a use case for #6329

It seems that we can not directly pass 'affine:embed-' to matchFlavours since the expected parameter Key should be a type extending (keyof BlockSuite.BlockModels)[]. But pattern like 'affine:embed-' is not a key of BlockSuite.BlockModels. Should we relax the type restrictions of functions, such as changing key to string type?

@doodlewind
Copy link
Member

Is it possible to use template literal type here? But based on current type check state, this PR should also be fine to land.

@doodlewind doodlewind merged commit 983eb4b into toeverything:master Mar 4, 2024
20 checks passed
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
Development

Successfully merging this pull request may close these issues.

An error occurs when deleting or backspacing adjacent to an embed block.
2 participants