Skip to content
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

Floated blocks cause visual overlay issues #7500

Closed
karmatosed opened this issue Jun 22, 2018 · 19 comments
Closed

Floated blocks cause visual overlay issues #7500

karmatosed opened this issue Jun 22, 2018 · 19 comments
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.

Comments

@karmatosed
Copy link
Member

If you float a block the adding and suggested blocks doesn't always clear:

2018-06-22 at 20 56

If you align to the right you get the suggested blocks vanishing:

2018-06-22 at 20 59

This can even cause z-index issues like this:

2018-06-22 at 21 00

I think if it's aligning we maybe need to not have suggested blocks, but open other ideas.

@karmatosed karmatosed added the [Type] Bug An existing feature does not function as intended label Jun 22, 2018
@karmatosed karmatosed added this to the 3.2 milestone Jun 22, 2018
@karmatosed karmatosed added the Needs Design Feedback Needs general design feedback. label Jun 22, 2018
@karmatosed karmatosed removed the Needs Design Feedback Needs general design feedback. label Jun 25, 2018
@gziolo gziolo modified the milestones: 3.2, 3.3 Jul 5, 2018
@talldan
Copy link
Contributor

talldan commented Jul 9, 2018

I've had a quick look into this issue and the related issues. It's best illustrated by an image floated either left or right with paragraph text flowing around it. In this case both the image and the next paragraph blocks have overlapping controls:
screen shot 2018-07-09 at 11 47 33 am

My first thought was that the UI for the blocks could appear in columns, a bit like this:
screen shot 2018-07-09 at 12 09 45 pm

Unfortunately, the paragraph blocks have no way of knowing that they're flowing alongside a floated element, so it's hard to do anything clever with the way they're displayed. The only solutions I can come up with to determine whether a paragraph is flowing around a floated element are not particularly nice solutions.

Because of that, I think any design solution might have to focus on changing the way the UI for the floated element appears - i.e. moving it so that it doesn't overlap.

@karmatosed
Copy link
Member Author

Because of that, I think any design solution might have to focus on changing the way the UI for the floated element appears - i.e. moving it so that it doesn't overlap.

Do you have an idea of what that could look like? Just as a rough concept?

@designsimply designsimply added [Feature] UI Components Impacts or related to the UI component system [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... and removed [Feature] UI Components Impacts or related to the UI component system labels Jul 10, 2018
@talldan
Copy link
Contributor

talldan commented Jul 10, 2018

The main issue is with the controls at the sides of blocks (block settings ellipsis icon and block mover icons), since they overlap when you have two blocks side by side and they're quite important.

The easiest thing I can come up with (without being too drastic) is to make sure they don't overlap for floated elements by making them inset. Here's a really crude example:
floated-block-controls

I don't completely like that solution - for a start the image block doesn't seem like the first block on the page because the mover icons are visually to the right of the paragraph's mover icons. But it probably is an improvement at least.

As a side note - there are a couple of technical things that could be improved around floated blocks:

  • left and right floated blocks are a div with a floated div inside it. At the moment the height of the outer div collapses to zero, which causes a bunch of issues. I think the outer div should be the one with the float applied.
  • There are z-index issues. Floated blocks aren't always on top of neighbouring full-width blocks in terms of z-index, making them hard to select.

@designsimply designsimply added [Feature] Media Anything that impacts the experience of managing media and removed [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 10, 2018
@designsimply
Copy link
Member

Closed #7848 as a duplicate.

@karmatosed
Copy link
Member Author

Noting this isn't just the image block: #6288

@karmatosed
Copy link
Member Author

Another one to consider in this is what happens on the bottom with overlaps and lack of clearing: #6490

@ZebulanStanphill
Copy link
Member

@talldan Would #6224 help with the controls-overlaying issue?

@talldan
Copy link
Contributor

talldan commented Jul 16, 2018

@SuperGeniusZeb - I quite like the redesign in #6224, but not sure it solves the issue, unless the controls were only visible when the block is selected and they were made to sit over the top of the floated element. Here's a quick sketch showing how things would overlap:
screen shot 2018-07-16 at 12 56 22 pm

One other side effect of the block controls being at the bottom is that you end up with bigger gaps between paragraphs.

@ZebulanStanphill
Copy link
Member

@talldan The block controls would not take up space on hover (just like they and the block toolbar do not take up space now), and as far as I can tell it is not even decided yet if they would take up space on a selected block. And of course, the controls would only be shown for blocks that are either selected or being hovered over. The standard distance between blocks should be unaffected by the change; only the selected block may be affected.

@talldan
Copy link
Contributor

talldan commented Jul 16, 2018

@SuperGeniusZeb that makes sense. I don't think it solves this issue, which is a shame :(

@karmatosed
Copy link
Member Author

I think we should get a fix here without #6224 or at least not being dependent on that issue. We would need to extensively usability testing any block control change that major before bringing in. As a result we need a fix here over thinking that would be it.

@aduth aduth modified the milestones: 3.3, 3.4 Jul 19, 2018
@designsimply designsimply added [Feature] UI Components Impacts or related to the UI component system and removed [Feature] Media Anything that impacts the experience of managing media labels Jul 20, 2018
@pento pento modified the milestones: 3.4, 3.5 Jul 30, 2018
@designsimply
Copy link
Member

Closed #8355 to consolidate here because it's a concern about how to move floated blocks and the z-index issues mentioned here are closely related. Note that the concern in #8355 is more specifically about how to grab a floated block with the mouse and drag it to another location within the document.

@mtias
Copy link
Member

mtias commented Oct 27, 2018

@karmatosed @jasmussen what is the status of this one?

@jasmussen
Copy link
Contributor

Closing this one as fixed:

screenshot 2018-10-29 at 09 30 08

It's not yet a perfect experience, but it's better to close this one and either reopen or revisit if/when the issue surfaces again.

@omrllm
Copy link

omrllm commented Dec 19, 2018

In some articles the plugins floats on top of the editor block itself, like with the image problem here.
The image is taken on mobile.

image

@jasmussen
Copy link
Contributor

@omrllm The issue you appear to be seeing looks a lot like the browser is running in "Quirks Mode", which means it is rendering in compatibility mode. That suggests a plugin is at fault. More info in #12575.

Can you try and deactivate plugins one by one to see if it starts working? I believe Yoast SEO should work, so maybe deactivate that one last to see if it's one of the others causing the issue.

Let us know if a plugin is at fault, and which one it is, then I can reach out to the developer and suggest fixes.

@omrllm
Copy link

omrllm commented Dec 19, 2018

Alright, it's WD YouTube by WebDorado.
Once deactivated that problem doesn't appear anymore.

@jasmussen
Copy link
Contributor

Thanks so much @omrllm, I can confirm that I can reproduce it with that plugin also. It's because it outputs a JavaScript tag before the doctype, causing the editor to render in quirks mode:

screenshot 2018-12-19 at 13 37 05

I'll reach out to them and suggest a fix. Thanks!

@omrllm
Copy link

omrllm commented Dec 19, 2018

Happy to help 👍

I'll reach out to them and suggest a fix.

Sweet 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests