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

Try: Refactor contextual toolbar to work better with floats #11357

Merged
merged 5 commits into from
Nov 9, 2018

Commits on Nov 9, 2018

  1. Try: Refactor contextual toolbar to work better with floats

    This is rather big surgery this late in the phase. There may be dragons, and it may be necessary to punt this to phase 2.
    
    This PR seeks to fix #4764 by doing a number of things:
    
    - Move the contextual toolbar into the block edit div, which is the one we float. This helps make it _connected_ to the content.
    - Add some complex clearing rules so we avoid many of the gnarly situations where a selected block after a floated block has a weirdly tall size.
    - Fixes so a paragraph block that follows a float does behave as it will on the frontend (i.e. won't clear), but also has a toolbar that is correctly positioned.
    
    This moving around of things caused subsequent issues, which means this PR also:
    
    - Fixes the toolbar appearance on mobile.
    - Improves upon the appearance of the toolbar on floated items on mobile.
    - Fixes hover label positioning, not only so they work with floats, but are positioned correctly as a result of this refactor.
    - Fixes issues with wide and fullwide toolbar positioning.
    Joen Asmussen committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    60d018a View commit details
    Browse the repository at this point in the history
  2. Use block navigator to select the blocks

    notnownikki authored and Joen Asmussen committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    120fe08 View commit details
    Browse the repository at this point in the history
  3. Remove block and inline level rules

    This removes the rules that were specific to inline blocks or block level blocks and levels the playing field.
    
    The benefit is no special rules. The downside is that a block following a float still might not perfectly match the user expectation.
    
    This PR also fixes issues with mobile toolbars.
    
    Finally, it makes the block toolbar not float. This rule used to be necessary, but for whatever reason it no longer appears to be.
    Joen Asmussen committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    1980bee View commit details
    Browse the repository at this point in the history
  4. Fix rebase issue.

    Joen Asmussen committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    5d4801c View commit details
    Browse the repository at this point in the history
  5. Fix classic block.

    Joen Asmussen committed Nov 9, 2018
    Configuration menu
    Copy the full SHA
    d5ff02a View commit details
    Browse the repository at this point in the history