-
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
Verse: Unable to exit via enter #52773
Comments
Linking the comments #52783 (comment) and #52783 (comment) The verse block should have the same exit behavior as the list block. |
Re-opening the issue. @annezazu, do you mind updating the description to reflect the suggested solution(s)? |
Done. |
I've been looking into this issue and tried adding a new RichText prop Verse is pretty close to how the Preformatted and Code blocks work. Enter creates a soft line break and you can add as many as you like. I also wouldn't expect two Enter pressed to exit a Code block. If exiting is difficult, it means there's a larger problem for all blocks. |
@WordPress/gutenberg-design keen to get designer thoughts here. In my mind, this makes it incredibly hard to get out of blocks currently (another example #52774 ) and perhaps a wider solution needs to be considered. |
I didn't get this. Splitting into two verse blocks? I'd expect to be in paragraph block then again.
You also cannot do this at the moment with paragraphs because empty paragraphs get ignored.
Good point. I also just looked into it and the root of the problem are the visuals. |
You got me by a minute :) There must be another way to indicate that the user is "locked" into a block and cannot exit via enter. How about letting a border bottom appear when pressing enter? |
My instinct here is to leverage a similar behavior as the List block. That is, double enter exits it, but the full behavior of backspace restoring the last list item seems important: That is, two enters does escape this verse: However, the precise flow would likely be this:
Make sense? |
It sounds to me like you only want Enter to create a paragraph when at a line break at the end of a verse, and not also in the middle of a verse, which is different from list, which also splits in the middle. In that case, I think we should slightly modify My only worry is that you can no longer insert two line breaks to have a blank line between texts, which is common is verses, and common in the Preformatted and Code blocks too. So maybe we should only split when there are TWO previous line breaks. In that case we'll need a separate |
In other words: it should be triple Enter that exits the block. |
Worth a try, especially if two or three can be tweaked in the PR somewhat easily? |
ready for testing |
Initially noted here #50129 (comment). When trying to exit the Verse block, the only way is to use the option to insert after/before or to use the Inserter to insert a new block. This is replicated using 6.3 RC1:
verse.mov
To address this, solutions have been offered #52783 (comment) and #52783 (comment). TLDR: a single return keeps you in the selected block, and a subsequent return exits it. This matches behavior with the List block.
The text was updated successfully, but these errors were encountered: