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/gb-mobile-872-JSApplicationIllegalArgumentException-in-RCTAztecView

* 'master' of https://github.com/WordPress/gutenberg: (56 commits)
  Update: Default gradients. (#18214)
  Fix: setting a preset color on pullquote default style makes the block invalid (#18194)
  Fix default featured image size (#15844)
  Fix postmeta radio regression. (#18183)
  Components: Switch screen-reader-text to VisuallyHidden (#18165)
  [rnmobile] Release 1.16.0 to master (#18261)
  Template Loader: Add theme block template resolution. (#18247)
  Add a README file for storybook directory (#18245)
  Add editor-gradient-presets to get_theme_support (#17841)
  Add "Image Title Attribute" as an editable attribute on the image block (#11070)
  enables horizontal movers in social blocks (#18234)
  [RNMobile] Add mobile Spacer component (#17896)
  Add experimental `ResponsiveBlockControl` component (#16790)
  Fix mover for floats. (#18230)
  Rename Component to WPComponent in docstring (#18226)
  Colors Selector: replace `Aa` text by SVG icon (#18222)
  Removed gif from README (#18200)
  makes the submenu items stacked vertically (#18221)
  Add block navigator to sidebar panel for nav block (#18202)
  Fix: consecutive updates may trigger a blocks reset (#18219)
  ...
  • Loading branch information
daniloercoli committed Nov 5, 2019
2 parents 91053d8 + e8e115d commit e21e76e
Show file tree
Hide file tree
Showing 158 changed files with 4,927 additions and 1,668 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ branches:
only:
- master
- rnmobile/master
- rnmobile/releases
- /wp\/.*/

env:
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Build Status](https://img.shields.io/travis/com/WordPress/gutenberg/master.svg)](https://travis-ci.com/WordPress/gutenberg)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org)

![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://cldup.com/H0oKBfpidk.png)
![Screenshot of the Gutenberg Editor, editing a post in WordPress](https://cldup.com/R84R5fNgrI.png)

This repo is the development hub for the <a href="https://make.wordpress.org/core/2017/01/04/focus-tech-and-design-leads/">editor focus in WordPress Core</a>. `Gutenberg` is the project name.

Expand Down Expand Up @@ -32,7 +32,6 @@ Here's why we're looking at the whole editing screen, as opposed to just the con
4. **A fresh look at content creation.** Considering the whole interface lays a solid foundation for the next focus: full site customization.
5. **Modern tooling.** Looking at the full editor screen also gives WordPress the opportunity to drastically modernize the foundation, and take steps towards a more fluid and JavaScript-powered future that fully leverages the WordPress REST API.

![Writing in Gutenberg 1.6](https://make.wordpress.org/core/files/2017/10/gutenberg-typing-1_6.gif)

## Blocks

Expand Down
3 changes: 2 additions & 1 deletion bin/commander.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const uuid = require( 'uuid/v4' );

// Config
const gitRepoOwner = 'WordPress';
const gitRepoURL = 'git@github.com:' + gitRepoOwner + '/gutenberg.git';
const gitRepoURL = 'https://github.com/' + gitRepoOwner + '/gutenberg.git';
const svnRepoURL = 'https://plugins.svn.wordpress.org/gutenberg';

// Working Directories
Expand Down Expand Up @@ -95,6 +95,7 @@ function runShellScript( script, cwd ) {
env: {
NO_CHECKS: true,
PATH: process.env.PATH,
HOME: process.env.HOME,
},
stdio: [ 'inherit', 'ignore', 'inherit' ],
} );
Expand Down
11 changes: 10 additions & 1 deletion bin/get-vendor-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ function wp_add_inline_script() {}

require_once dirname( dirname( __FILE__ ) ) . '/lib/client-assets.php';

gutenberg_register_vendor_scripts();
/**
* Hi, phpcs
*/
function run_gutenberg_register_vendor_scripts() {
global $wp_scripts;

gutenberg_register_vendor_scripts( $wp_scripts );
}

run_gutenberg_register_vendor_scripts();
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Block Registration

## `register_block_type`
## `registerBlockType`

* **Type:** `Function`

Expand Down
40 changes: 40 additions & 0 deletions docs/designers-developers/developers/themes/theme-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,46 @@ Themes are responsible for creating the classes that apply the colors in differe

The class name is built appending 'has-', followed by the class name _using_ kebab case and ending with the context name.

### Block Gradient Presents

Different blocks have the possibility of selecting from a list of predined of gradients. The block editor provides a default gradient presets, but a theme can overwrite them and provide its own:

```php
add_theme_support(
'__experimental-editor-gradient-presets',
array(
array(
'name' => __( 'Vivid cyan blue to vivid purple', 'themeLangDomain' ),
'gradient' => 'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',
'slug' => 'vivid-cyan-blue-to-vivid-purple'
),
array(
'name' => __( 'Vivid green cyan to vivid cyan blue', 'themeLangDomain' ),
'gradient' => 'linear-gradient(135deg,rgba(0,208,132,1) 0%,rgba(6,147,227,1) 100%)',
'slug' => 'vivid-green-cyan-to-vivid-cyan-blue',
),
array(
'name' => __( 'Light green cyan to vivid green cyan', 'themeLangDomain' ),
'gradient' => 'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',
'slug' => 'light-green-cyan-to-vivid-green-cyan',
),
array(
'name' => __( 'Luminous vivid amber to luminous vivid orange', 'themeLangDomain' ),
'gradient' => 'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',
'slug' => 'luminous-vivid-amber-to-luminous-vivid-orange',
),
array(
'name' => __( 'Luminous vivid orange to vivid red', 'themeLangDomain' ),
'gradient' => 'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',
'slug' => 'luminous-vivid-orange-to-vivid-red',
),
)
);
```

`name` is a human-readable label (demonstrated above) that appears in the tooltip and provides a meaningful description of the gradient to users. It is especially important for those who rely on screen readers or would otherwise have difficulty perceiving the color. `gradient` is a CSS value of a gradient applied to a background-image of the block. Details of valid gradient types can be found in the [mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Images/Using_CSS_gradients). `slug` is a unique identifier for the gradient and is used to generate the CSS classes used by the block editor.


### Block Font Sizes:

Blocks may allow the user to configure the font sizes they use, e.g., the paragraph block. The block provides a default set of font sizes, but a theme can overwrite it and provide its own:
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: 6.8.0-rc.1
* Version: 6.8.0
* Author: Gutenberg Team
* Text Domain: gutenberg
*
Expand Down
21 changes: 21 additions & 0 deletions lib/block-directory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Block directory functions.
*
* @package gutenberg
*/

if (
gutenberg_is_experiment_enabled( 'gutenberg-block-directory' ) &&
! has_action( 'admin_enqueue_scripts', 'enqueue_block_editor_assets_block_directory' )
) {
/**
* Function responsible for enqueuing the assets required
* for the block directory functionality in the editor.
*/
function gutenberg_enqueue_block_editor_assets_block_directory() {
wp_enqueue_script( 'wp-block-directory' );
wp_enqueue_style( 'wp-block-directory' );
}
add_action( 'enqueue_block_editor_assets', 'gutenberg_enqueue_block_editor_assets_block_directory' );
}
Loading

0 comments on commit e21e76e

Please sign in to comment.