-
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
Insert content between two blocks #72
Comments
I like it. I am not sure how this will work in a front-end or customizer editor context, with the theme's styles applied to the layouts. How will this feel in narrow places, columns etc? But I definitely find this better than before. |
Some of those answers will likely present themselves if/when we test this out in a prototype. |
So I have been playing around with this a bit, specifically showing the blue line and plus on hover. I have taken a few different paths, one was to hard-code some The other route I have tried so far is to add an
Kind of feels like the markup again is creating some of our challenges here and was curious to hear other thoughts. One other idea is to apply a background color to the |
Sounds difficult. This particular feature is not super urgent as it's a desktop only & hover only enhancement. So long as linebreak lets you insert between two items, that's good for now, then we can keep noodling on how to best solve this. Not crucial for the UI prototype. |
I love this ^ :) |
That would be much easier to implement as well. |
For many blocks*, I imagine it would be difficult on mobile to position the cursor such that a new linebreak could be added, which might be further evidence in favor of showing an "insert after" button to the currently focused block. * Particularly rich content like a gallery or tweet, which can already be a bit awkward to position in the current editor. |
CC: @shaunandrews because I'm pretty sure I saw something Divi-esque from him yesterday in Slack, that kind of elegantly solved this. |
Really, really dig this stuff, Shaun. Thanks so much for doing this. The "Insert in between" thing feels solid. The behavior of the type switcher feels too, though it feels like that bit needs a little more polish. Same for the inserter, which should be able to contain a virtually endless amount of blocks, 50+, so will probably need a search box. It does feel solid, though, that the type switcher sits next to the block and inline level controls, though! This seems worth trying next, along with the "insert between" behavior. |
The animatic really sells it @shaunandrews. But does it become a fiddly UI if you have to modify inline text close to or around the area where the button sits? If yes, do you feel we can expand the block boundaries for a block, without changing the spacing of paragraphs? If we were to allow the block boundaries to overlap, we could get another 3px of space between the text and the block boundaries. |
I've added this to https://wordpress.github.io/gutenberg/tinymce-single/ to try it out. |
Works well, thanks for doing that. I think it's worth trying it on the border, though, as it seems to suggest where the new content will appear. In general probably best to adhere to the mockups for the prototypes. Then we can all try it and if we all agree it feels weird then we can mock up alternatives. The thing that primarily felt weird to me is that is that it's close to the edge, and if you want to select text down there you might invoke the plus. But it's worth testing, seeing if it's actually an issue and not just one that's perceived from the mockups. |
You can see it as a mock up too :) I'll move it on the border. |
Certainly, but the purpose of the prototypes is to compare the underlying tech across the prototypes, not competing UI. Competing UI is best mocked up as separate things and discussed in GitHub issues, like what Shaun did here. Such mockups can be gifs, pngs, html mockups, even one off prototypes or codepens for sure. |
Move inserter on the block outline. See #72.
Adjusted so we can try in single mce. Note that I still have to add the insert menu there. Will do so tomorrow. |
Having used the prototypes for a bit now, I can't help but feel like inserting between two blocks becomes less of an issue when you can insert a linebreak to get access to the inserter. What does everyone else think? Edit: Here are mockups for how it could work. No inserter visible when you are interacting with a block: Inserter shows up on a newline, where the up/down arrows would have been: If we combine it with an "insert" button that permanently sits somewhere else, and an editing system where making linebreaks is as easy as pie, this is arguably fine for inserting content between two. It's keyboard friendly, and it's the same UI for mobile. Try the LinkedIn editor, it works somewhat this way: https://www.linkedin.com/post/edit/ |
Isn't that what we had before? The issue was that it can be harder to discover. It also may not be evident to create a line break between non text blocks. |
In the single prototype the non text issues is partly solved because you can move the cursor to the side (select block, then arrow left/right). Can also make it so the cursor get the right position when clicking next to it. |
Should also consider:
|
I'm increasingly leaning towards us having, in addition to the plus or Though if we had that, we'd have parity on this experience compared to the current editor. |
Move inserter on the block outline. See #72.
Undo and redo buttons are also ones that might have to be permanent somewhere, so it wouldn't be the only one. |
Closing in favor of #323. |
…ing-babel-runtime Solves a problem with the resolution of @babel/runtime
Currently, the UI prototype shows the Plus to insert new blocks below the last paragraph (or the paragraph you're writing in). We should consider moving it to the side when you are on a new line. Here's a quick and dirty animatic:
Right after that, start typing and it converts into the type switcher, showing a paragraph block as selected.
This would also tie nicely into the #24, which would then invoke the plus dialog on the left.
This should inform how we can insert content between two blocks. Hover between two blocks to show a blue line and plus on the side:
Or, make a newline and insert, like you would at the end:
The text was updated successfully, but these errors were encountered: