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

Reduce quick toolbar silhuette #2359

Merged
merged 2 commits into from
Aug 11, 2017
Merged

Reduce quick toolbar silhuette #2359

merged 2 commits into from
Aug 11, 2017

Conversation

jasmussen
Copy link
Contributor

This compacts the quick toolbar, and softens the shadow. It is a new version of #2151, but is essentially the same code.

The purpose of this is to visually simplify the quick toolbar so it doesn't feel so heavy. It also unifies the look from mobile to desktop, and frees up some space.

The feedback on the previous PR still stands — there's an extra div here. But even after sleeping on it, I can't think of a better way to do this. The thing is, we are moving the drop shadow from each of the three groups into a single group that wraps them all. This has to be an inline-block so it's no wider than the toolbars themselves, but the parent element has to be block so it can have position sticky.

Screenshot:

screen shot 2017-08-11 at 12 43 55

Props to @paaljoachim for actually suggesting this a long time ago. 💖

This compacts the quick toolbar, and softens the shadow. It is a new version of #2151, but is essentially the same code.

The purpose of this is to visually simplify the quick toolbar so it doesn't feel so heavy. It also unifies the look from mobile to desktop, and frees up some space.

The feedback on the previous PR still stands — there's an extra div here. But even after sleeping on it, I can't think of a better way to do this. The thing is, we are moving the drop shadow from each of the three groups into a single group that wraps them all. This has to be an inline-block so it's no wider than the toolbars themselves, but the parent element has to be block so it can have position sticky.

Props to @paaljoachim for actually suggesting this a long time ago. 💖
@jasmussen jasmussen self-assigned this Aug 11, 2017
@jasmussen jasmussen requested review from mtias and ellatrix August 11, 2017 10:48
@jasmussen jasmussen mentioned this pull request Aug 11, 2017
border-top: 1px solid $light-gray-500;
border-bottom: 1px solid $light-gray-500;

> * {
Copy link
Member

Choose a reason for hiding this comment

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

Can we make this more specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 👍

@jasmussen
Copy link
Contributor Author

Some more screenshots:

screen shot 2017-08-11 at 13 24 09

screen shot 2017-08-11 at 13 24 19

screen shot 2017-08-11 at 13 25 13

screen shot 2017-08-11 at 13 24 29

screen shot 2017-08-11 at 13 27 42

It looks like there's now a z-index issue when linking images, but from the DOM surgery I was able to perform I can't tell if this issue is as a result of this branch or not. @youknowriad any idea if it's a separate issue?

@codecov
Copy link

codecov bot commented Aug 11, 2017

Codecov Report

Merging #2359 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2359      +/-   ##
=========================================
+ Coverage   24.76%   24.8%   +0.03%     
=========================================
  Files         152     153       +1     
  Lines        4744    4750       +6     
  Branches      800     800              
=========================================
+ Hits         1175    1178       +3     
- Misses       3015    3018       +3     
  Partials      554     554
Impacted Files Coverage Δ
editor/modes/visual-editor/block.js 0% <ø> (ø) ⬆️
blocks/library/shortcode/index.js 50% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45efc66...1c3cbab. Read the comment docs.

icon="ellipsis"
/>
</Toolbar>
<div className="editor-visual-editor__group">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need two divs: editor-visual-editor__block-controls and editor-visual-editor__group?

Copy link
Member

Choose a reason for hiding this comment

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

But even after sleeping on it, I can't think of a better way to do this. The thing is, we are moving the drop shadow from each of the three groups into a single group that wraps them all. This has to be an inline-block so it's no wider than the toolbars themselves, but the parent element has to be block so it can have position sticky.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I missed that

Copy link
Member

Choose a reason for hiding this comment

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

I missed it too and asked him the same :D

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

I like the lighter UI here. 👍

I also think we should update the selected block border to 1px and maybe keep only the left-border when hovering a block, but this could be done separately.

@jasmussen jasmussen merged commit a86b79d into master Aug 11, 2017
@jasmussen jasmussen deleted the polish/quick-toolbar-v2 branch August 11, 2017 13:37
@hedgefield
Copy link

Very nice! I'm starting to like the toolbar more and more.

The 'itch' for me is mostly the place where we show it. Leaving aside how it half-covers two blocks vertically, I wonder if it wouldn't feel better if it was horizontally aligned to the block margin, which is a little further to the left? Then the text on the first button will also align with the text margin that way.

@jasmussen
Copy link
Contributor Author

I wonder if it wouldn't feel better if it was horizontally aligned to the block margin, which is a little further to the left? Then the text on the first button will also align with the text margin that way.

I did try this in mockups (though completely open to new mockups, nothing is off the table, and thank you for your comments). When left aligned in the mockups, it felt wrong that the toolbar did not align to the text. Because although it is not the case now, in the future the block boundary will represent the HTML element itself — i.e. the space between boundary and text represents the padding.

@hedgefield
Copy link

Ahh yes that makes sense, thanks for clarifying, I love hearing all the design decisions that have already been thought about :)

@jasmussen
Copy link
Contributor Author

Really appreciate your contributions. Please always feel free to reach out in DM also if there's some question I can answer, I think we're in the same timezone.

ceyhun pushed a commit that referenced this pull request Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants