-
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
Add "Insert Before" and "Insert After" buttons in the block More menu #7297
Comments
Hi @jasmussen, I really like this idea nice work with the mockups. |
Yes I think that's the desired behavior. If you can't insert before or after, the option should still be there, but grayed out. |
These icons are necessary for a Gutenberg menu iteration, see WordPress/gutenberg#7297 The icons are essentially related to the basic Insert icon, the plus in a ring. These are smaller so as to accommodate an insertion indicator below or above the icon.
Pull request to add new icons in WordPress/dashicons#311. We need to copy over the sprite, but I can't recall if that changed lately. |
I've got a branch where this is working well. It requires #8279 to be merged first, so fingers crossed that can be done soon. I have two questions:
|
Note that the dummy shortcuts are just dummy shortcuts from my mockup days, obviously defer to the real shortcuts we're building. To answer your question though, I've been using Google Docs as the template for these. In Google Docs, if the shortcut is a simple Mac shortcut, like ⌘A, it's shown as such, ⌘A not ⌘+A. This is a Mac pattern, iirc, whereas on Windows that would be Ctrl+A. But that pattern only applies to the simple shortcuts. See: Also note how ⌘ is always the first modifier keey in the sequence. Though it seems Ctrl comes before ⌘: So looking at the screenshots, we should change to:
If the 1st shortcut used different modifiers, it might be Ctrl+⌘,. Because Ctrl comes before ⌘, and if the final key comes after that, then no need for the plus. Tricksy tricksy. 3 and 4 are tricky though, because it looks weird to see ++ or +- like that. Are those keyboard shortcuts finalized? Did we end up with those? |
I just added what was in the mockups. I haven't done any research yet into what we can use, but thought it worth noting that they look weird! Here's how are keys are defined at the moment: We don't have every combination, but you can see Shift generally comes after Ctrl and before Alt. Guess it depends on if you tend to use the left or right-side of the keyboard for modifiers regarding how you expect to see them laid out. |
FWIW, Apple's Human Interface Guidelines use the order |
I think we just need to account for template locking both at the post level and at the I'd say that the Insert Before/Insert After buttons should have identical functionality to the already existing sibling inserter. From memory, the sibling inserter correctly takes the above into account. |
Mockup:
The sibling inserter is receiving improvements. But in addition to this, it would be nice with a menu-discoverable way to insert blocks before and after the selected block, and even nicer if there were keyboard shortcuts to do so.
See also discussion in #7220 (comment) and #7168.
The text was updated successfully, but these errors were encountered: