-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Consider showing the "insert new paragraph" buttons regardless of widget location #6825
Comments
Maybe let's narrow this a little bit and show them always for floated objects? |
That would be one option. But I reported this issue as the current behavior made me think that, in general:
|
I don't say no. I think it's worth checking. What I'm worried about, though, it that there will be too many UI elements visible at a time (some of them not absolutely necessary) and that will decrease the content/noise ratio and degrade the UX. |
I think the magic block buttons should just always be shown when a table/code block/etc is selected, period. Regardless if it's floating or not. E.g. in this example technically I don't need a magic block to type after this image: But I just tried it out and I found myself reaching for the magic block button instinctively, after using the magic block button just one time before, and felt a tinge of disappointment it wasn't there. |
Good news then, @neongreen: we're planning on enabling these buttons for all block widgets in all situations in the next release. Stay tuned! |
Fix (engine): The model selection post-fixer should not set a new selection if the ranges before and after post-fixing are the same (see #6693). Tests (image): Aligned image tests to the latest `WidgetTypeAround` plugin API (see #6693). Other (paragraph): The `InsertParagraphCommand` should split ancestors of the `Position` to find a parent that allows `'paragraph'` (see #6693). Tests (table): Aligned `Table` plugin tests to the latest `WidgetTypeAround` API. Code refactoring (see #6693). Feature (theme-lark): Added styles for a "fake caret" brought by the `WidgetTypeAround` plugin (see #6693). Feature (typing): Created a public `isNonTypingKeystroke()` helper (see #6693). Feature (utils): Created `isArrowKeyCode()`, `getLocalizedArrowKeyCodeDirection()`, and `isForwardArrowKeyCode()` helpers (see #6693). Feature (widget): Implemented keyboard support for inserting paragraphs around block widgets using a "fake horizontal caret" (`WidgetTypeAround`). Both "Insert new paragraph" buttons are now always displayed for all block widgets regardless of their location in the document. Closes #6693. Closes #6825. Closes #6694. Also: * code refactoring in the `Widget` plugin, * aligned `Widget` tests to the new `WidgetTypeAround` keyboard behavior, * moved the `Enter` and `Shift+Enter` support from the `Widget` plugin to the `WidgetTypeAround` plugin. MINOR BREAKING CHANGE (widget): Removed the `getWidgetTypeAroundPositions()` helper since the "Insert new paragraph" buttons are now visible regardless of the widget location in the document
📝 Provide a description of the improvement
I find situations like the one above confusing:
So, there's no button in this case... why? Because this image is anchored before the block quote.
That made me think a bit and I realised that I actually use <kbd>Enter</kbd> to start typing after widgets on many occasions – not only when there's no space after/before that widget.
Assuming that the button will show up only when my mouse pointer is near it, I think that it makes sense to have 2 buttons per every widget in the document. This will actually remove some code and make the editor faster too 😁.
If you'd like to see this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: