-
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 a global option to clear floated blocks. #10299
Comments
I can reproduce this issue with the alignment affecting other blocks. I think it's essentially the same issue as this one: #4127 |
@jaclyntan Just an FYI, I found a dedicated issue related to reordering the button block when alignment is applied. I think this is the trouble you are also having? |
@webtrainingwheels good catch I think that is the same issue. I think it's to do with clearing floats too. The main problem is that the floating inteferes with how the block is able to be removed/edited. The concept of aligning these blocks is quite confusing as well since I did not expect the button to be aligned in the previous block with a float. I expected the button to the floated right or left within it's own section if that makes sense. I think the Image blocks may use the same alignment functionality though, but since buttons are smaller in size it's block probably runs into more conflicting issues when floated within other blocks. I'm not against using floats to align these elements- just as long as the UI doesn't clash within other blocks ^^ |
The movers have been fixed, see #9401 (comment). Currently it's indented that the buttons float, so that they have other blocks around them. Perhaps there should also be an option to clear the float so that there is nothing around the button? Cc @jasmussen maybe? |
Not entirely sure I understand the context. There's also a separate PR or decision around how/where to show the button URL, i.e. in a popout bubble. This would fix some of the indentation you see here: But to answer your specific question, should there be an option for a block to clear floats or "self clear"? This issue has come up a number of times, enough to suggest that yes, there probably should be. And maybe this option should even be global to all blocks and we could put it down here in the advanced section, because it really is an advanced thing to do: |
The design team discussed this during a triage session in Slack today (Note: You may need a Slack account to log in.) The overall consensus was that, whilst floats are problematic from a user experience perspective, we need a way of being able to better and more predictably work with them. @joen's solution suggested here, of providing an option to clear a float on a per-block basis, seems like a good compromise solution that will take some of the sting out of the experience for some users, and as such we should do it. Given the complexity of understanding how floats behave, we'd definitely advise for making it an advanced option as suggested here as well. 👍 |
I think that Clear should be with the other alignment options, as an additive property. |
Another float issue. Just adding it in here: |
This ticket was mentioned during a #core-editor chat. This is ready for a dev to pick up, and implementing it would fix #13784. |
I just created #21608 which outputs CSS to clear floats when a block is centered. We might very well decide to not do that, based on discussion. But at least then we will have decided that this particular issue is the one to solve! |
Given @jasmussen 's work above, is there anything still required for this ticket? Or is it good to close? |
I'm not sure. In CSS you can apply Also — sorry for closing and reopening, an embarrassing mis-click! |
I tried using the button feature today and for the most part it works perfectly, however if I try to align it, the alignment seems to affect the entire block, making it align weirdly/nest with the other blocks. See screenshots to see what I mean
I assume this is intended because some people might want the buttons within a paragraph of text...? But once an alignment is set on the button it's really hard to reorder the button because the arrows are blocked by the plus button when hovered. Also when the block is within another block it conflicts the hover states between each block.
Also the button block would even more useful if we could also have the ability to add custom classes and title attributes, as well as set a target ie. target="_blank"
Thank you!
The text was updated successfully, but these errors were encountered: