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

Fix/issue 11669 block icon #12554

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
39bc785
merge from upstream
Oct 30, 2018
e15b05f
Merge branch 'master' of github.com:WordPress/gutenberg
Oct 31, 2018
f9856ed
Merge branch 'master' of github.com:WordPress/gutenberg
Oct 31, 2018
0395ac4
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 5, 2018
9eca9bf
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 7, 2018
2297665
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 8, 2018
246370f
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 12, 2018
dfd129a
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 12, 2018
e730af9
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 13, 2018
277ff12
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 13, 2018
b0ec06c
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 13, 2018
8792af3
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 16, 2018
de9d101
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 19, 2018
cc87beb
local save
Nov 28, 2018
d7d5a8d
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 28, 2018
cc4e6ca
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 30, 2018
b9e444f
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 30, 2018
2cf001e
darked focus state outline for block lists
Nov 30, 2018
3dc2f01
Merge branch 'master' of github.com:WordPress/gutenberg
Nov 30, 2018
94b2f52
Merge branch 'fix/issue-12254-make-selected-block-outline-darker'
Nov 30, 2018
09400da
Merge branch 'master' of github.com:WordPress/gutenberg
Dec 3, 2018
9446bc2
Merge branch 'master' of github.com:WordPress/gutenberg
Dec 3, 2018
cfcaaad
updated block icon
Dec 3, 2018
6c19004
reverted unneeded file
Dec 3, 2018
701ace7
clases updated
Dec 5, 2018
f746ce3
Merge branch 'master' into fix/issue-11669-block-icon
timwright12 Feb 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions packages/editor/src/components/block-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,11 @@ export class BlockSwitcher extends Component {

if ( ! hasBlockStyles && ! possibleBlockTransformations.length ) {
return (
<Toolbar>
<IconButton
disabled
className="editor-block-switcher__no-switcher-icon"
label={ __( 'Block icon' ) }
>
<BlockIcon icon={ icon } showColors />
</IconButton>
</Toolbar>
<div className="components-block-switcher" aria-hidden="true">
Copy link
Member

Choose a reason for hiding this comment

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

I don't think, we should be re-creating Toolbar here as this is still the same div.

<span className="components-block-switcher__icon">
<BlockIcon icon={ blockType.icon } showColors />
</span>
</div>
);
}

Expand Down
16 changes: 13 additions & 3 deletions packages/editor/src/components/block-switcher/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,25 @@
height: $icon-button-size;
}

.components-block-switcher {
background-color: $white;
border: 1px solid $light-gray-500;
border-left: 0;
}

.components-icon-button.editor-block-switcher__toggle,
.components-icon-button.editor-block-switcher__no-switcher-icon {
margin: 0;
.components-icon-button.editor-block-switcher__no-switcher-icon,
Copy link
Member

Choose a reason for hiding this comment

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

.editor-block-switcher__no-switcher-icon class is getting removed so should be removed from this file, too.

.components-block-switcher__icon {
display: block;
height: $icon-button-size;
padding: 3px;
margin: 0;
}

.components-icon-button.editor-block-switcher__no-switcher-icon {
.components-icon-button.editor-block-switcher__no-switcher-icon,
.components-block-switcher__icon {
align-items: center;
display: flex;
width: $icon-button-size + 6px + 6px;

.editor-block-icon {
Expand Down