From 1dff9e84948e7f19a249342e52877e7c6ec271ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Tue, 23 May 2017 12:56:16 +0200 Subject: [PATCH 1/2] Inserter: make it bigger depending on viewport. --- editor/inserter/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/inserter/style.scss b/editor/inserter/style.scss index 1ac63fa6a245ce..7f1acd35950047 100644 --- a/editor/inserter/style.scss +++ b/editor/inserter/style.scss @@ -110,7 +110,7 @@ } .editor-inserter__content { - max-height: 186px; + max-height: 20vw; overflow: auto; &:focus { From 27dd3ac27dbe237ecaba9be79072aad9d759eafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Tue, 23 May 2017 12:56:45 +0200 Subject: [PATCH 2/2] Block Categories: add formatting and embed, move blocks out of common. --- blocks/api/categories.js | 2 ++ blocks/library/code/index.js | 2 +- blocks/library/embed/index.js | 2 +- blocks/library/preformatted/index.js | 2 +- blocks/library/pullquote/index.js | 5 ++++- blocks/library/table/index.js | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/blocks/api/categories.js b/blocks/api/categories.js index 2c67614bd7c41b..05361f55ff39bc 100644 --- a/blocks/api/categories.js +++ b/blocks/api/categories.js @@ -13,6 +13,8 @@ import { __ } from 'i18n'; */ const categories = [ { slug: 'common', title: __( 'Common Blocks' ) }, + { slug: 'formatting', title: __( 'Formatting' ) }, + { slug: 'embed', title: __( 'Embed' ) }, { slug: 'layout', title: __( 'Layout Blocks' ) }, ]; diff --git a/blocks/library/code/index.js b/blocks/library/code/index.js index 12129673e163bd..1f7f60e049f72e 100644 --- a/blocks/library/code/index.js +++ b/blocks/library/code/index.js @@ -16,7 +16,7 @@ registerBlock( 'core/code', { icon: 'editor-code', - category: 'common', + category: 'formatting', attributes: { content: prop( 'code', 'textContent' ), diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index 8577fa0488b706..851757215d96c9 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -32,7 +32,7 @@ registerBlock( 'core/embed', { icon: 'video-alt3', - category: 'common', + category: 'embed', attributes: { url: attr( 'iframe', 'src' ), diff --git a/blocks/library/preformatted/index.js b/blocks/library/preformatted/index.js index 11ac3e5c46899d..2514d3c1604383 100644 --- a/blocks/library/preformatted/index.js +++ b/blocks/library/preformatted/index.js @@ -12,7 +12,7 @@ registerBlock( 'core/preformatted', { icon: 'text', - category: 'common', + category: 'formatting', attributes: { content: children( 'pre' ), diff --git a/blocks/library/pullquote/index.js b/blocks/library/pullquote/index.js index f9b89e6272321b..f958dedce9865e 100644 --- a/blocks/library/pullquote/index.js +++ b/blocks/library/pullquote/index.js @@ -8,9 +8,12 @@ import Editable from '../../editable'; const { children, query } = hpq; registerBlock( 'core/pullquote', { + title: wp.i18n.__( 'Pullquote' ), + icon: 'format-quote', - category: 'common', + + category: 'formatting', attributes: { value: query( 'blockquote > p', children() ), diff --git a/blocks/library/table/index.js b/blocks/library/table/index.js index 9737fb61993ed8..c24604676a91c3 100644 --- a/blocks/library/table/index.js +++ b/blocks/library/table/index.js @@ -24,7 +24,7 @@ function toggleAlignment( align ) { registerBlock( 'core/table', { title: wp.i18n.__( 'Table' ), icon: 'editor-table', - category: 'common', + category: 'formatting', attributes: { head: query( 'thead > tr', query( 'td,th', children() ) ),