-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Replaces empty selected text blocks when inserting new blocks #5054
Comments
Adding a design feedback as this is an intended behavior described in #4951 |
This ticket seems to touch upon a larger issue, that seems to have been surfaced as other refinements take care of the obvious stuff, making the less obvious but still important stuff suddenly shine brighter. For the case in point, the empty paragraph block has become the commandline. It's a magical block that allows you to start typing to make it a text block, or use the slash command to insert, or use the recent blocks interface on the right to replace it entirely. This is cool, because it's a singular interface you get access to whenever you make a linebreak. But why doesn't this work in all text blocks, including the Heading?
The reason why the empty paragraph block is replaced when it's empty and you insert another block, is because we are trying to adhere to what would happen in a non-block editor. You'd put the caret on an empty line, insert an image, and then you'd now have an image instead of an empty paragraph. But I do agree, it would be nice if this behavior was the same across all basic text blocks. I don't know how hard that would be for us to accomplish, but it would definitely be worth looking into. Also related: #3785 (comment) |
This is why I stay away from design discussions, so I can help test from the point of view of someone who doesn't know that the commandline is even a thing 😄 |
For consistency, it would be nice if an empty Heading block behaved the same as an empty Paragraph block. That is, the slash command works, the inline inserter works, and inserting replaces the whole thing. It is something that would be nice to have, so marking the priority as such. |
Should this issue be closed as work is happening in relation to other issues? |
The behaviour seems to be consistent now: adding a new heading while on an empty block, will replace the empty block. This is what I am seeing: Kapture.2023-07-14.at.11.29.08.mp4I am going to close this but please feel free to re-open if needed, @notnownikki |
Issue Overview
If I have my cursor in an empty paragraph block, and I use the inserter to insert a new heading or paragraph block, it transforms the block into a heading, or does nothing. But, if I have my cursor in an empty heading block and use the inserter to insert a new paragraph or heading, a new one is inserted, every time. In both cases, the title of the inserter is "add block", but it does different things.
Apparently there is some philosophical discussion about "is an empty block a block"? But from a UI perspective, an empty block looks like a block and behaves like a block, but the inserter changes behaviour, and there's no hint about what behaviour it's going to do.
Steps to Reproduce (for bugs)
Expected Behavior
The inserter's behaviour should be consistent. Even if we're saying "empty blocks get transformed", it should consistently do this.
The text was updated successfully, but these errors were encountered: