From 044c47f4f596a96ea3813162f656c87e77a1ef2b Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Mon, 20 Feb 2017 14:05:04 +0100 Subject: [PATCH 1/3] Add lots of blocks This PR intends to add all blocks on https://github.com/WordPress/gutenberg/issues/16 to the inserter, so we can get a feel for how the UI works when it has lots of blocks. It isn't yet functional. @youknowriad do you have any idea why? Thanks --- blocks.js | 223 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 173 insertions(+), 50 deletions(-) diff --git a/blocks.js b/blocks.js index c67a8804d1ea5c..414a910471c8bd 100644 --- a/blocks.js +++ b/blocks.js @@ -40,58 +40,181 @@ var config = { 'default': [] }, blockCategories: [ - { id: 'frequent', label: 'Frequently Used' }, - { id: 'media', label: 'Media' } + { id: 'common', label: 'Common' }, + { id: 'media', label: 'Media' }, + { id: 'embeds', label: 'Embeds' }, + { id: 'other', label: 'Other' }, + { id: 'layout', label: 'Layout' } ], blocks: [ - { - id: 'paragraph', - label: 'Paragraph', - icon: '', - category: 'frequent' - }, - { - id: 'heading', - label: 'Heading', - icon: 'Heading', - category: 'frequent' - }, - { - id: 'image', - label: 'Image', - icon: 'Image', - category: 'frequent' - }, - { - id: 'quote', - label: 'Quote', - icon: '', - category: 'frequent' - }, - { - id: 'gallery', - label: 'Gallery', - icon: '', - category: 'media' - }, - { - id: 'unordered-list', - label: 'Unordered List', - icon: '', - category: 'frequent' - }, - { - id: 'ordered-list', - label: 'Ordered List', - icon: '', - category: 'frequent' - }, - { - id: 'embed', - label: 'Embed', - icon: '', - category: 'media' - } + { + id: 'paragraph', + label: 'Paragraph', + icon: '', + category: 'common' + }, + { + id: 'heading', + label: 'Heading', + icon: 'Heading', + category: 'common' + }, + { + id: 'image', + label: 'Image', + icon: 'Image', + category: 'common' + }, + { + id: 'quote', + label: 'Quote', + icon: '', + category: 'common' + }, + { + id: 'gallery', + label: 'Gallery', + icon: '', + category: 'media' + }, + { + id: 'unordered-list', + label: 'Unordered List', + icon: '', + category: 'common' + }, + { + id: 'ordered-list', + label: 'Ordered List', + icon: '', + category: 'common' + }, + { + id: 'embed', + label: 'Embed', + icon: '', + category: 'embeds' + }, + { + id: 'separator', + label: 'Separator', + icon: 'Minus Small', + categories: 'common' + }, + { + id: 'map', + label: 'Map', + icon: 'Custom Post Type', + categories: 'embeds' + }, + { + id: 'google-map', + label: 'Google Map', + icon: 'Custom Post Type', + categories: 'other' + }, + { + id: 'openstreet-map', + label: 'OpenStreet Map', + icon: 'Custom Post Type', + categories: 'other' + }, + { + id: 'tweet', + label: 'Tweet', + icon: '', + categories: 'other' + }, + { + id: 'video', + label: 'Video', + icon: 'Video', + categories: 'media' + }, + { + id: 'youtube', + label: 'YouTube', + icon: '', + categories: 'media' + }, + { + id: 'vimeo', + label: 'Vimeo', + icon: '', + categories: 'media' + }, + { + id: 'audio', + label: 'Audio', + icon: 'Audio', + categories: 'media' + }, + { + id: 'form', + label: 'Form', + icon: 'Custom Post Type', + categories: 'other' + }, + { + id: 'survey', + label: 'Survey', + icon: 'Custom Post Type', + categories: 'other' + }, + { + id: 'toc', + label: 'Table of Contents', + icon: 'Pages', + categories: 'layout' + }, + { + id: 'wordpress-post', + label: 'WordPress Post', + icon: 'My Sites', + categories: 'other' + }, + { + id: 'facebook-post', + label: 'Facebook Post', + icon: '', + categories: 'other' + }, + { + id: 'opengraph-link', + label: 'OpenGraph Link', + icon: 'Link', + categories: 'other' + }, + { + id: 'playlist', + label: 'Playlist', + icon: 'Audio', + categories: 'media' + }, + { + id: 'spotify-playlist', + label: 'Spotify Playlist', + icon: '', + categories: 'media' + }, + { + id: 'poet', + label: 'Poet', + icon: 'Pencil', + categories: 'layout' + }, + { + id: 'custom-field', + label: 'Custom Field', + icon: 'Layout Blocks', + categories: 'layout' + }, + { + id: 'gist', + label: 'Gist', + icon: 'Code', + categories: 'other' + } ] }; From d41f6339462d6b5fb0cec16f1ed5c4243b0fca76 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Feb 2017 14:12:27 +0100 Subject: [PATCH 2/3] Update the category attribute --- blocks.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/blocks.js b/blocks.js index 414a910471c8bd..5365021ed5e88d 100644 --- a/blocks.js +++ b/blocks.js @@ -99,121 +99,121 @@ var config = { id: 'separator', label: 'Separator', icon: 'Minus Small', - categories: 'common' + category: 'common' }, { id: 'map', label: 'Map', icon: 'Custom Post Type', - categories: 'embeds' + category: 'embeds' }, { id: 'google-map', label: 'Google Map', icon: 'Custom Post Type', - categories: 'other' + category: 'other' }, { id: 'openstreet-map', label: 'OpenStreet Map', icon: 'Custom Post Type', - categories: 'other' + category: 'other' }, { id: 'tweet', label: 'Tweet', icon: '', - categories: 'other' + category: 'other' }, { id: 'video', label: 'Video', icon: 'Video', - categories: 'media' + category: 'media' }, { id: 'youtube', label: 'YouTube', icon: '', - categories: 'media' + category: 'media' }, { id: 'vimeo', label: 'Vimeo', icon: '', - categories: 'media' + category: 'media' }, { id: 'audio', label: 'Audio', icon: 'Audio', - categories: 'media' + category: 'media' }, { id: 'form', label: 'Form', icon: 'Custom Post Type', - categories: 'other' + category: 'other' }, { id: 'survey', label: 'Survey', icon: 'Custom Post Type', - categories: 'other' + category: 'other' }, { id: 'toc', label: 'Table of Contents', icon: 'Pages', - categories: 'layout' + category: 'layout' }, { id: 'wordpress-post', label: 'WordPress Post', icon: 'My Sites', - categories: 'other' + category: 'other' }, { id: 'facebook-post', label: 'Facebook Post', icon: '', - categories: 'other' + category: 'other' }, { id: 'opengraph-link', label: 'OpenGraph Link', icon: 'Link', - categories: 'other' + category: 'other' }, { id: 'playlist', label: 'Playlist', icon: 'Audio', - categories: 'media' + category: 'media' }, { id: 'spotify-playlist', label: 'Spotify Playlist', icon: '', - categories: 'media' + category: 'media' }, { id: 'poet', label: 'Poet', icon: 'Pencil', - categories: 'layout' + category: 'layout' }, { id: 'custom-field', label: 'Custom Field', icon: 'Layout Blocks', - categories: 'layout' + category: 'layout' }, { id: 'gist', label: 'Gist', icon: 'Code', - categories: 'other' + category: 'other' } ] }; From e7464b7b30d3bb8c06dd5dd33c76707af4df3913 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 20 Feb 2017 14:16:59 +0100 Subject: [PATCH 3/3] Default SVG width and height --- style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/style.css b/style.css index ba214c76182099..5dcd07a6377722 100644 --- a/style.css +++ b/style.css @@ -461,6 +461,11 @@ img.is-selected { fill: #191e23; } +.insert-block__block svg { + widows: 24px; + height: 24px; +} + /* * Text actions */