-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: exit on triple Enter #53332
Verse: exit on triple Enter #53332
Conversation
Size Change: +241 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would appreciate a sanity check by others before you merge, but this IMO feels valid.
I'll add the same setting to Code and Preformatted, since these blocks are nearly identical (or should be). I'll also add some e2e tests. |
@jasmussen Your video makes me think we need a caption option for Verse, maybe also even for Preformatted and Code. |
I don't know that we necessarily need that, is it wrapped in a But just to clarify, I added that byline mostly for illustrating why triple click to break out of the verse feels valid, the poem isn't actually complete, and if I had made real content I would have probably added some visual stylings. That isn't to say I would necessarily be opposed to the caption button, rather that I didn't immediately feel urgency for one, the Paragraph felt fine to me 👌 |
I don't think we need captions on these :) They are a bit clunky |
Not captions in the current form, they are clunky |
This seems fine to me. I appreciate the apparent discoverability of this and see that it was well considered via discussion in the linked issue. I'd almost rather we have a uniform way to exit any block, with say alt+enter. But that would lack discoverability unless we were to implement some sort of hint when it seems like someone might be trying to exit a block. |
@Mamaduka Does this look ok to you? |
@ellatrix, can you rebase on top of the latest trunk? |
46444e7
to
b392f48
Compare
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @ellatrix! The changes look good to me ✅
b392f48
to
b7eaeca
Compare
Is there a way to break out of a preformatted block, other than at the end? Consider a block of reformatted text:
And you want to break it up and add comments --
I was resorting to editing the HTML to break up large blocks like this. Is it possible to escape out of a PRE, splitting it up in to two PREs or something? |
Perhaps triple-enter in the middle of a verse should split it too? |
That seems to be how you can break up a numbered/ordered list. Or perhaps there is a way to add this to the block system, allowing the "..." menu to have a new option to "Split" -- maybe where "Add Before" and "Add After" are. |
@ellatrix what do you think about triple-enter to split a verse in two? |
For preformatted, maybe, but I'd avoid for verse where it can be a useful expressive tool. |
Is there a way to use the context menu to say "split block" or something? That way ENTER can continue to function as it always has, but someone could break up a paragraph, preformatted, code, etc.? |
Good point about the expressiveness; if you want multiple linebreaks in a poem that's laid out in a particular way (e.g. Alice in Wonderland), it won't work that three linebreaks breaks it apart. Perhaps we can make it so if you press the down arrow at the end of the verse, it moves the cursor down into the appender, e.g. creates a new paragraph? |
I think it's ok to break down at the end of it, I don't think we should force a split in the middle of it. Also, an explicit "split" action might be good to support. |
What?
Fixes #52773.
Why?
It's hard to exit verse.
How?
When the at the end of a verse block, and the two previous characters are line breaks, break out of the block. In other words, exit on triple Enter.
🍒 on the 🥧: when merging two verses, or paragraph with verse, add two line breaks.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast