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

Remove additional side padding from blocks. #9653

Merged
merged 4 commits into from
Sep 25, 2018
Merged

Conversation

jasmussen
Copy link
Contributor

You may have noticed that the padding left and right on a block is wider than above and below.

This was done in effort to make it simple to select the parent block by simply hovering it with the mouse. Arrow keys already traverse up to parent blocks and there's a clickthrough effect on mobile.

However in practice this additional padding has not felt sufficient, and was at the cost of some visual complexity. Instead, we'll be looking at improving parent child selection in #9628.

This PR thus reverts the style of this to how it used to be, with the same padding all around a block.

Reminder: this padding is purely visual — through negative margins, it doesn't actually affect the width of the block itself, or the margins above and below. See also #8350.

Before:

before

After:

after

Note that this PR touches a rather big CSS file that right now has a bunch of vestigial stuff related to the ellipsis menu on the right, as well as draggable areas left and right of the block. Notably as the incoming improvements to the drag handle are merged, this PR will probably need to be carefully rebased. CC: @nosolosw @youknowriad

@jasmussen jasmussen added [Type] Enhancement A suggestion for improvement. [Status] In Progress Tracking issues with work in progress labels Sep 6, 2018
@jasmussen jasmussen added this to the 3.9 milestone Sep 6, 2018
@jasmussen jasmussen self-assigned this Sep 6, 2018
@jasmussen jasmussen requested a review from mtias September 6, 2018 11:12
@jasmussen jasmussen removed the [Status] In Progress Tracking issues with work in progress label Sep 6, 2018
@jasmussen jasmussen requested a review from a team September 6, 2018 11:23
@jasmussen jasmussen added the Needs Testing Needs further testing to be confirmed. label Sep 6, 2018
@chrisvanpatten
Copy link
Member

This makes me so happy

@youknowriad youknowriad modified the milestones: 3.9, 4.0 Sep 14, 2018
@jasmussen jasmussen removed the Needs Testing Needs further testing to be confirmed. label Sep 20, 2018
@jasmussen
Copy link
Contributor Author

Rebased, tested. This seems solid.

You may have noticed that the padding left and right on a block is wider than above and below.

This was done in effort to make it simple to select the parent block by simply hovering it with the mouse. Arrow keys already traverse up to parent blocks and there's a clickthrough effect on mobile.

However in practice this additional padding has not felt sufficient, and was at the cost of some visual complexity. Instead, we'll be looking at improving parent child selection in #9628.

This PR thus reverts the style of this to how it used to be, with the same padding all around a block.

Reminder: this padding is purely visual — through negative margins, it doesn't actually affect the width of the block itself, or the margins above and below. See also #8350.
This has been removed separately, this is just a cleanup job.
@jasmussen
Copy link
Contributor Author

Tested yet again, rebased, and did a quick cleanup job to remove references to ellipsis on the side. Let's get this in.

On a sidenote, in testing this, I did a lot of testing on the columns block. This is sort of the notorious "it's hard to select the parent block" example. This remains the case. However, it is SO VERY VERY EASY to just use the arrow keys to select the parent. For example, select the column, then press up. This selects the parent. This is part of the cross-block arrow-key navigation, and it's been working for a while.

I'm not suggesting this arrow key navigation is sufficient, but I do think this speaks to the breadcrumbs and clickthrough as proposed in #9628 as being correct steps forward, as those features simply surface that feature more clearly.

@talldan
Copy link
Contributor

talldan commented Sep 25, 2018

Hey @jasmussen - I've been giving this a test this morning. It looks really good. I've found this one issue so far, the warning here is too high:

screen shot 2018-09-25 at 12 41 02 pm

@jasmussen
Copy link
Contributor Author

Excellent catch, thank you! That appears to have been the result of a bad rebase. In any case, it's fixed now.

In master:

screen shot 2018-09-25 at 14 03 19

This branch:

screen shot 2018-09-25 at 14 03 22

@talldan
Copy link
Contributor

talldan commented Sep 25, 2018

@jasmussen One more tiny one 😄

I noticed this with the reusable block icon in the top right of the block and some blocks that have a solid background (images, embeds, etc.):
screen shot 2018-09-25 at 1 20 12 pm

Feels like maybe the icon should sit over the top of the image?

@jasmussen
Copy link
Contributor Author

Great catch. Fixed it.

Note that I had to add a z index both to the indicator, and I had to elevate the z index of the hover breadcrumb as well. But I didn't see any negative side effects of doing this.

indicator

Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I've done a fair bit of testing in Chrome, IE11, and Edge. I could only spot the issues I mentioned.

It's nice that this includes quite a bit of removal of styles as well - yay! 🎉

Not sure if you also need a design approval as well, or maybe that's already happened in discussion elsewhere.

@mtias
Copy link
Member

mtias commented Sep 25, 2018

This crosses off one of my biggest tiny annoyances, thanks!

@mtias mtias merged commit 6321a99 into master Sep 25, 2018
@mtias mtias deleted the update/remove-parent-padding branch September 25, 2018 13:59
@jasmussen
Copy link
Contributor Author

😅🎉

@chrisvanpatten
Copy link
Member

Very excited to see all the red in this diff and happy to see this land!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants