Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/WordPress/gutenberg into …
Browse files Browse the repository at this point in the history
…rnmobile/port-quote-block-step-1

* 'master' of https://github.com/WordPress/gutenberg: (21 commits)
  Fix property path on get() call (#10962)
  Fixed typos on block api documentation (#11298)
  Export `switchToBlockType` to be used mobile side when merging two blocks. (#11294)
  RichText: Remove unused `ref` assignment to RichText (#11222)
  Remove findDOMNode from Tooltip component (#11169)
  Components: Remove redundant onClickOutside handler from Dropdown (#11253)
  added myself to the contributors list (#11260)
  Add complete post type labels for Resuable Blocks (#11278)
  Increase specificity for active radio/checkbox input styling (#11290)
  Fixed "artifact" misspelling in docs. (#11291)
  Nux package: fix incorrect named deprecated import (#11283)
  Rename parentClientId to rootClientId for consistency (#11274)
  chore(release): update changelog files
  chore(release): publish
  Update plugin version to 4.2.0. (#11258)
  Data: Use turbo-combine-reducers in place of Redux (#11255)
  Revert using Icon in IconButton to avoid regression in plugin icons (pinned icons) (#11256)
  Block List: Use default Inserter for sibling insertion (#11018)
  Editor: Optimize Inserter props generation and reconciliation (#11243)
  RichText: fix format placeholder (#11102)
  ...

# Conflicts:
#	packages/block-library/src/quote/index.js
  • Loading branch information
daniloercoli committed Oct 31, 2018
2 parents c989bce + 3503c0d commit 4d25e41
Show file tree
Hide file tree
Showing 84 changed files with 619 additions and 382 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,4 @@ This list is manually curated to include valuable contributions by volunteers th
| @ajitbohra | |
| @ChrisVanPatten | |
| @tofumatt | @lonelyvegan |
| @LukePettway | @luke_pettway |
4 changes: 2 additions & 2 deletions docs/block-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ styles: [
],
```

Plugins and Themes can also register [custom block style](../docs/extensibility/extending-blocks/#block-style-variations) for exisiting blocks.
Plugins and Themes can also register [custom block style](../docs/extensibility/extending-blocks/#block-style-variations) for existing blocks.

#### Attributes (optional)

Expand Down Expand Up @@ -490,7 +490,7 @@ className: false,
html: false,
```

- `inserter` (default `true`): By default, all blocks will appear in the Gutenberg inserter. To hide a block so that it can only be inserted programatically, set `inserter` to `false`.
- `inserter` (default `true`): By default, all blocks will appear in the Gutenberg inserter. To hide a block so that it can only be inserted programmatically, set `inserter` to `false`.

```js
// Hide this block from the inserter.
Expand Down
22 changes: 12 additions & 10 deletions docs/data/data-core-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ otherwise.

*Returns*

Whether block is first in mult-selection.
Whether block is first in multi-selection.

### isBlockMultiSelected

Expand Down Expand Up @@ -1074,17 +1074,13 @@ Post content.

### canInsertBlockType

Determines if the given block type is allowed to be inserted, and, if
parentClientId is provided, whether it is allowed to be nested within the
given parent.
Determines if the given block type is allowed to be inserted into the block list.

*Parameters*

* state: Editor state.
* blockName: The name of the given block type, e.g.
'core/paragraph'.
* parentClientId: The parent that the given block is to be
nested within, or null.
* blockName: The name of the block type, e.g.' core/paragraph'.
* rootClientId: Optional root client ID of block list.

*Returns*

Expand Down Expand Up @@ -1114,7 +1110,7 @@ Items are returned ordered descendingly by their 'utility' and 'frecency'.
*Parameters*

* state: Editor state.
* parentClientId: The block we are inserting into, if any.
* rootClientId: Optional root client ID of block list.

*Returns*

Expand Down Expand Up @@ -1534,14 +1530,20 @@ be inserted, optionally at a specific index respective a root block list.

* blocks: Block objects to insert.
* index: Index at which block should be inserted.
* rootClientId: Optional root cliente ID of block list on
* rootClientId: Optional root client ID of block list on
which to insert.

### showInsertionPoint

Returns an action object used in signalling that the insertion point should
be shown.

*Parameters*

* rootClientId: Optional root client ID of block list on
which to insert.
* index: Index at which block should be inserted.

### hideInsertionPoint

Returns an action object hiding the insertion point.
Expand Down
2 changes: 1 addition & 1 deletion docs/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Additionally, how do we even know this came from our editor? Maybe someone snuck

A Gutenberg post is the proper block-aware representation of a post, a collection of semantically consistent descriptions of what each block is and what its essential data is. This representation only ever exists in memory. It is the [chase](https://en.wikipedia.org/wiki/Chase_(printing)) in the typesetter's workshop, ever-shifting as sorts are attached and repositioned.

A Gutenberg post is not the artefact it produces, namely the `post_content`. The latter is the printed page, optimized for the reader, but retaining its invisible markings for later editing.
A Gutenberg post is not the artifact it produces, namely the `post_content`. The latter is the printed page, optimized for the reader, but retaining its invisible markings for later editing.

Later sections of this document will refer to _Gutenberg post_ and to _blocks_. These are to be assumed to not be the `post_content` or the invisible markings.

Expand Down
2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Gutenberg
* Plugin URI: https://github.com/WordPress/gutenberg
* Description: Printing since 1440. This is the development plugin for the new block editor in core.
* Version: 4.1.1
* Version: 4.2.0-rc.1
* Author: Gutenberg Team
*
* @package gutenberg
Expand Down
53 changes: 50 additions & 3 deletions lib/register.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,27 @@ function gutenberg_register_post_types() {
'wp_block',
array(
'labels' => array(
'name' => __( 'Blocks', 'gutenberg' ),
'singular_name' => __( 'Block', 'gutenberg' ),
'search_items' => __( 'Search Blocks', 'gutenberg' ),
'name' => _x( 'Blocks', 'post type general name', 'gutenberg' ),
'singular_name' => _x( 'Block', 'post type singular name', 'gutenberg' ),
'menu_name' => _x( 'Blocks', 'admin menu', 'gutenberg' ),
'name_admin_bar' => _x( 'Block', 'add new on admin bar', 'gutenberg' ),
'add_new' => _x( 'Add New', 'Block', 'gutenberg' ),
'add_new_item' => __( 'Add New Block', 'gutenberg' ),
'new_item' => __( 'New Block', 'gutenberg' ),
'edit_item' => __( 'Edit Block', 'gutenberg' ),
'view_item' => __( 'View Block', 'gutenberg' ),
'all_items' => __( 'All Blocks', 'gutenberg' ),
'search_items' => __( 'Search Blocks', 'gutenberg' ),
'not_found' => __( 'No blocks found.', 'gutenberg' ),
'not_found_in_trash' => __( 'No blocks found in Trash.', 'gutenberg' ),
'filter_items_list' => __( 'Filter blocks list', 'gutenberg' ),
'items_list_navigation' => __( 'Blocks list navigation', 'gutenberg' ),
'items_list' => __( 'Blocks list', 'gutenberg' ),
'item_published' => __( 'Block published.', 'gutenberg' ),
'item_published_privately' => __( 'Block published privately.', 'gutenberg' ),
'item_reverted_to_draft' => __( 'Block reverted to draft.', 'gutenberg' ),
'item_scheduled' => __( 'Block scheduled.', 'gutenberg' ),
'item_updated' => __( 'Block updated.', 'gutenberg' ),
),
'public' => false,
'show_ui' => true,
Expand Down Expand Up @@ -516,6 +534,35 @@ function gutenberg_register_post_types() {
}
add_action( 'init', 'gutenberg_register_post_types' );

/**
* Apply the correct labels for Reusable Blocks in the bulk action updated messages.
*
* @since 4.3.0
*
* @param array $messages Arrays of messages, each keyed by the corresponding post type.
* @param array $bulk_counts Array of item counts for each message, used to build internationalized strings.
*
* @return array
*/
function gutenberg_bulk_post_updated_messages( $messages, $bulk_counts ) {
$messages['wp_block'] = array(
// translators: Number of blocks updated.
'updated' => _n( '%s block updated.', '%s blocks updated.', $bulk_counts['updated'], 'gutenberg' ),
// translators: Blocks not updated because they're locked.
'locked' => ( 1 == $bulk_counts['locked'] ) ? __( '1 block not updated, somebody is editing it.', 'gutenberg' ) : _n( '%s block not updated, somebody is editing it.', '%s blocks not updated, somebody is editing them.', $bulk_counts['locked'], 'gutenberg' ),
// translators: Number of blocks deleted.
'deleted' => _n( '%s block permanently deleted.', '%s blocks permanently deleted.', $bulk_counts['deleted'], 'gutenberg' ),
// translators: Number of blocks trashed.
'trashed' => _n( '%s block moved to the Trash.', '%s blocks moved to the Trash.', $bulk_counts['trashed'], 'gutenberg' ),
// translators: Number of blocks untrashed.
'untrashed' => _n( '%s block restored from the Trash.', '%s blocks restored from the Trash.', $bulk_counts['untrashed'], 'gutenberg' ),
);

return $messages;
}

add_filter( 'bulk_post_updated_messages', 'gutenberg_bulk_post_updated_messages', 10, 2 );

/**
* Injects a hidden input in the edit form to propagate the information that classic editor is selected.
*
Expand Down
10 changes: 8 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg",
"version": "4.1.1",
"version": "4.2.0-rc.1",
"private": true,
"description": "A new WordPress editor experience",
"repository": "git+https://github.com/WordPress/gutenberg.git",
Expand Down
4 changes: 3 additions & 1 deletion packages/api-fetch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 2.2.0 (2018-10-29)
## 2.2.1 (2018-10-30)

## 2.2.0 (2018-10-29)

### New Feature

Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/api-fetch",
"version": "2.2.0",
"version": "2.2.1",
"description": "Utility to make WordPress REST API requests.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 2.1.7 (2018-10-30)

## 2.1.6 (2018-10-30)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/block-library",
"version": "2.1.6",
"version": "2.1.7",
"description": "Block library for the WordPress editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ exports[`core/button block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</div>
<div
class="editor-rich-text__tinymce wp-block-button__link"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ exports[`core/heading block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</h2>
<h2
class="editor-rich-text__tinymce"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ exports[`core/list block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</ul>
<ul
class="editor-rich-text__tinymce"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ exports[`core/paragraph block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</p>
<p
class="editor-rich-text__tinymce wp-block-paragraph"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ exports[`core/preformatted block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</pre>
<pre
class="editor-rich-text__tinymce"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ exports[`core/pullquote block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</div>
<div
class="editor-rich-text__tinymce"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/quote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const settings = {
blocks: [ 'core/paragraph' ],
transform: ( { value, citation } ) => {
const paragraphs = [];
if ( value ) {
if ( value && value !== '<p></p>' ) {
paragraphs.push(
...split( create( { html: value, multilineTag: 'p' } ), '\u2028' )
.map( ( piece ) =>
Expand All @@ -121,7 +121,7 @@ export const settings = {
)
);
}
if ( citation ) {
if ( citation && citation !== '<p></p>' ) {
paragraphs.push(
createBlock( 'core/paragraph', {
content: citation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ exports[`core/quote block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</div>
<div
class="editor-rich-text__tinymce"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ exports[`core/text-columns block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</p>
<p
class="editor-rich-text__tinymce"
>
Expand Down Expand Up @@ -55,7 +59,11 @@ exports[`core/text-columns block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</p>
<p
class="editor-rich-text__tinymce"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ exports[`core/verse block edit matches snapshot 1`] = `
contenteditable="true"
data-is-placeholder-visible="true"
role="textbox"
/>
>
<br
data-mce-bogus="1"
/>
</pre>
<pre
class="editor-rich-text__tinymce"
>
Expand Down
2 changes: 2 additions & 0 deletions packages/blocks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 5.1.1 (2018-10-30)

## 5.1.0 (2018-10-30)

### New feature
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/blocks",
"version": "5.1.0",
"version": "5.1.1",
"description": "Block API for WordPress.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down
Loading

0 comments on commit 4d25e41

Please sign in to comment.