Open designsimply opened 4 years ago
:wave: @iamthomasbishop ! Do you have any thoughts on the desired behavior here?
@mchowning I agree with @designsimply that ideally the user should be able to wrap a block around another, but I understand this might take some layout magic on the tech side.
I don't have much insight into the technical solution, but based on my admittedly rusty CSS knowledge, if we're using flex perhaps there is some way to apply a float
to the image block and then a trailing clearing element? I understand like anything layout-related, it's likely that there are more complexities lurking beneath (such as z-indexing, where to apply selection borders, etc.) 😀 However, if we can get this right, it'll make the following design considerations more feasible.
We have most of the things that we need — alignment controls and size controls are the most important. We might want to consider adding an image size button to the toolbar. If the technical constraint were solved, these controls alone would theoretically be enough to visualize the wrapping — albeit without any further layout customization (margins would be very nice to have, but I digress...). If you try this on the web (at least as of GB 7.7 trying on my self-hosted test site) you can float an image using the toolbar control, and it "works", but offers no layout customization and you can't easily select the image block because the paragraph block has a higher z-index than the image block (see video)
It'd also be great to be able to drag-to-resize images on the canvas. I believe our first venture into this will be an upcoming iteration of the Spacer block, but we haven't gotten there yet. I think this would be beneficial for the image block in general, but especially on this type of interaction.
A related note on a design constraint I would recommend we keep in mind — min-width for blocks so that they can be narrow but still have enough room to show the inline controls. We are considering a similar narrow-block situation on the Buttons block, where we are applying a min-width that is sufficient enough to house the movers and an •••
icon button (see diagram on this comment on the Buttons block PR) — not sure if that would apply globally (cc @lukewalczak).
Steps to reproduce:
Result: left-aligned images in the block editor take up the full width of the editor instead of allowing text to wrap around it—this makes it so the preview or front-end view of the post looks a lot different compared to how the post looks in the editor.
Tested with WPiOS 14.3.0.0 TestFlight beta on iPhone 6S iOS 13.3.1.