Skip to content

Commit

Permalink
Merge branch 'master' into fix/range-control-disabled-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Q committed Mar 9, 2020
2 parents c97c754 + 6066186 commit 2274ca2
Show file tree
Hide file tree
Showing 44 changed files with 754 additions and 552 deletions.
3 changes: 1 addition & 2 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ build_files=$(ls build/*/*.{js,css,asset.php} build/block-library/blocks/*.php b
status "Creating archive... 🎁"
zip -r gutenberg.zip \
gutenberg.php \
lib/*.php \
lib/demo-block-templates/*.html \
lib \
packages/block-serialization-default-parser/*.php \
post-content.php \
$vendor_scripts \
Expand Down
115 changes: 115 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,120 @@
== Changelog ==

= 7.7.0-rc.1 =

### Features

- Add the initial version of the Patterns UI as a sidebar plugin (This is not the final interface and work is in progress to integrate with the main block inserter). [20354](https://github.com/WordPress/gutenberg/pull/20354), [20715](https://github.com/WordPress/gutenberg/pull/20715).
- Add an initial set of patterns [20724](https://github.com/WordPress/gutenberg/pull/20724).

### Enhancements

- Update the Block and editor UI. [19344](https://github.com/WordPress/gutenberg/pull/19344)
- New icons. [20464](https://github.com/WordPress/gutenberg/pull/20464)
- Avoid empty menu groups. [20495](https://github.com/WordPress/gutenberg/pull/20495)
- Block Placeholders. [20441](https://github.com/WordPress/gutenberg/pull/20441), [20676](https://github.com/WordPress/gutenberg/pull/20676).
- Various tweaks [20679](https://github.com/WordPress/gutenberg/pull/20679), [20578](https://github.com/WordPress/gutenberg/pull/20578).
- Improve the Back to WP Admin button in Fullscreen Mode. [20603](https://github.com/WordPress/gutenberg/pull/20603)
- Make the editor Fullscreen by default. [20611](https://github.com/WordPress/gutenberg/pull/20611)
- Remove template locking from the columns block [20465](https://github.com/WordPress/gutenberg/pull/20465)
- Make the inserter full height. [20526](https://github.com/WordPress/gutenberg/pull/20526)

### Bug Fixes

- A11y:
- Deselect first/last gallery images on blur. [14930](https://github.com/WordPress/gutenberg/pull/14930)
- Revert top toolbar tab order [20571](https://github.com/WordPress/gutenberg/pull/20571)
- Add an overlay to the html block preview to fix block selection in Firefox. [20425](https://github.com/WordPress/gutenberg/pull/20425)
- Add missing accessibility attributes in the SVG icons. [20538](https://github.com/WordPress/gutenberg/pull/20538)
- Fix invalid syntax error on Safari 12. [20507](https://github.com/WordPress/gutenberg/pull/20507)
- Use a consistent width for the link suggetions. [20448](https://github.com/WordPress/gutenberg/pull/20448)
- Use full labels for directional block movers. [20664](https://github.com/WordPress/gutenberg/pull/20664)
- Columns block: Force 50% column width at mid-range viewport. [20597](https://github.com/WordPress/gutenberg/pull/20597)
- Media & Text block: Fix frontend styles when "Crop image to fill" is selected [20539](https://github.com/WordPress/gutenberg/pull/20539)
- Latest Post block:
- Fix the excerpt length. [20313](https://github.com/WordPress/gutenberg/pull/20313)
- Don't trim manual exerptts [20432](https://github.com/WordPress/gutenberg/pull/20432)
- Fix sidebar scroll issue on small viewports. [20491](https://github.com/WordPress/gutenberg/pull/20491)
- Social Link block:
- Escape generated class name. [20479](https://github.com/WordPress/gutenberg/pull/20479)
- Fix label attribute type as string. [20468](https://github.com/WordPress/gutenberg/pull/20468)
- i18n: Use placeholder for the default label [20475](https://github.com/WordPress/gutenberg/pull/20475)
- Simulated Queries (Device previews):
- Check for match in stylesheet host and protocol to prevent Chrome breakage. [20673](https://github.com/WordPress/gutenberg/pull/20673)
- Fix IE11 editor breakage. [20226](https://github.com/WordPress/gutenberg/pull/20226)
- Fix incorrectly displayed preview option for private post types. [20604](https://github.com/WordPress/gutenberg/pull/20604)
- Focus preview button after opening preview. [20570](https://github.com/WordPress/gutenberg/pull/20570)
- Fix isURL regex to take account file urls. [20435](https://github.com/WordPress/gutenberg/pull/20435)
- Fix error when deleting empty paragraphs in IE11. [20594](https://github.com/WordPress/gutenberg/pull/20594)
- Fix hidden inserter toggle behind the popover. [20663](https://github.com/WordPress/gutenberg/pull/20663)
- Fix block registration shared defaults reuse across blocks. [20565](https://github.com/WordPress/gutenberg/pull/20565)
- Shim meta attributes for early block registrations. [20544](https://github.com/WordPress/gutenberg/pull/20544)
- Fix bouncing Custom color formatter. [20612](https://github.com/WordPress/gutenberg/pull/20612)
- Fix Gallery block styles in Edge causing editor breakage. [20690](https://github.com/WordPress/gutenberg/pull/20690)

### New APIs:

- @wordpress/env: Add support for ZIP URL sources. [20426](https://github.com/WordPress/gutenberg/pull/20426)

### Experiments

- Lighter Block DOM: allow block types to render their own wrapper [19701](https://github.com/WordPress/gutenberg/pull/19701)
- Lighter InnerBlocks. [19910](https://github.com/WordPress/gutenberg/pull/19910)
- Automatically add block class. [20658](https://github.com/WordPress/gutenberg/pull/20658)
- BlockPreview: Add __experimentalOnReady prop. [17242](https://github.com/WordPress/gutenberg/pull/17242)
- Edit Site:
- Update template navigation to use new link control. [20366](https://github.com/WordPress/gutenberg/pull/20366)
- Update the edit site save modal UI. [20608](https://github.com/WordPress/gutenberg/pull/20608)
- Fix the block toolbar in the Widgets and Site Edit screens. [20458](https://github.com/WordPress/gutenberg/pull/20458)
- Fix widgets screen inserter [20680](https://github.com/WordPress/gutenberg/pull/20680)

### Documentation

- Add tutorial for creating a custom block editor instance. [20410](https://github.com/WordPress/gutenberg/pull/20410)
- Create a new "Gutenberg as a Platform" page. [20666](https://github.com/WordPress/gutenberg/pull/20666)
- Typos and tweaks: [20382](https://github.com/WordPress/gutenberg/pull/20382), [20386](https://github.com/WordPress/gutenberg/pull/20386), [20517](https://github.com/WordPress/gutenberg/pull/20517), [20662](https://github.com/WordPress/gutenberg/pull/20662), [20454](https://github.com/WordPress/gutenberg/pull/20454), [20659](https://github.com/WordPress/gutenberg/pull/20659).

### Code Quality

- Refactoring to existing blocks to use a lighter DOM:
- List block. [20498](https://github.com/WordPress/gutenberg/pull/20498)
- Image block. [20576](https://github.com/WordPress/gutenberg/pull/20576)
- Heading. [20493](https://github.com/WordPress/gutenberg/pull/20493)
- Consistent block focus behaviour on mount. [20577](https://github.com/WordPress/gutenberg/pull/20577)
- Cleanup CSS variables. [20529](https://github.com/WordPress/gutenberg/pull/20529)
- Use the EditorSkeleton component in the widgets and Edit Site pages. [20440](https://github.com/WordPress/gutenberg/pull/20440), [20431](https://github.com/WordPress/gutenberg/pull/20431).
- Refactor SlotFill components. [19242](https://github.com/WordPress/gutenberg/pull/19242)
- Remove useless style override for floats. [20501](https://github.com/WordPress/gutenberg/pull/20501)
- Block popover: remove data-type. [20531](https://github.com/WordPress/gutenberg/pull/20531)
- Resizable editor improvements. [20259](https://github.com/WordPress/gutenberg/pull/20259)

### Various

- @wordpress/env:
- Save the database as a volume. [20648](https://github.com/WordPress/gutenberg/pull/20648)
- Fix accidental quotes in Site Title. [20520](https://github.com/WordPress/gutenberg/pull/20520)
- Set owner of wp-content to www-data. [20406](https://github.com/WordPress/gutenberg/pull/20406)
- @wordpress/create-block:
- Fix system requirements checks. [20461](https://github.com/WordPress/gutenberg/pull/20461) [20456](https://github.com/WordPress/gutenberg/pull/20456)
- Fix React warning triggered by the BlockToolbar component. [20546](https://github.com/WordPress/gutenberg/pull/20546)
- Skip the Type Writer effect component in IE 11. [20485](https://github.com/WordPress/gutenberg/pull/20485)
- Update browserslist to fix out-of-date caniuse-lite messages [20709](https://github.com/WordPress/gutenberg/pull/20709)
- Add storybook stories:
- TextControl [20467](https://github.com/WordPress/gutenberg/pull/20467)
- TextAreaControl [20472](https://github.com/WordPress/gutenberg/pull/20472)
- SelectControl [20482](https://github.com/WordPress/gutenberg/pull/20482)
- Tooltip [20322](https://github.com/WordPress/gutenberg/pull/20322)
- E2E Tests:
- Add test for the Image block. [20622](https://github.com/WordPress/gutenberg/pull/20622)
- More stable embed test. [20668](https://github.com/WordPress/gutenberg/pull/20668)
- Fix intermittent RichText e2e test failure. [20457](https://github.com/WordPress/gutenberg/pull/20457)
- Travis: Avoid skipping Puppeteer download. [20547](https://github.com/WordPress/gutenberg/pull/20547)
- Plugin: Bump minimum WordPress version to 5.3 [20628](https://github.com/WordPress/gutenberg/pull/20628)
- @wordrpess/priority-queue: Fix for environments that don't have `window` defined. [20486](https://github.com/WordPress/gutenberg/pull/20486)
- Update jest configuration to only ignore tests from /wordpress/ as a subdirectory [20420](https://github.com/WordPress/gutenberg/pull/20420)



= 7.6.0 =

## Features
Expand Down
64 changes: 30 additions & 34 deletions docs/designers-developers/developers/slotfills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ In order to access the SlotFills, we need to do four things:


Here is an example using the `PluginPostStatusInfo` slotFill:

```js
const { registerPlugin } = wp.plugins;
const { PluginPostStatusInfo } = wp.editPost;


const PluginPostStatusInfoTest = () => {
return(
<PluginPostStatusInfo>
<p>Post Status Info SlotFill</p>
</PluginPostStatusInfo>
)
}
const PluginPostStatusInfoTest = () => (
<PluginPostStatusInfo>
<p>Post Status Info SlotFill</p>
</PluginPostStatusInfo>
);

registerPlugin( 'post-status-info-test', { render: PluginPostStatusInfoTest } );
```
Expand Down Expand Up @@ -62,7 +60,6 @@ const PluginPostStatusInfo = ( { children, className } ) => (
PluginPostStatusInfo.Slot = Slot;

export default PluginPostStatusInfo;

```

This new Slot is then exposed in the editor. The example below is from core and represents the Status & visibility panel.
Expand All @@ -73,31 +70,34 @@ Any items that have been added via the SlotFill ( see the example above ), will
See [core code](https://github.com/WordPress/gutenberg/tree/master/packages/edit-post/src/components/sidebar/post-status/index.js#L26).

```js
function PostStatus( { isOpened, onTogglePanel } ) {
return (
<PanelBody className="edit-post-post-status" title={ __( 'Status & visibility' ) } opened={ isOpened } onToggle={ onTogglePanel }>
<PluginPostStatusInfo.Slot>
{ ( fills ) => (
<Fragment>
<PostVisibility />
<PostSchedule />
<PostFormat />
<PostSticky />
<PostPendingStatus />
<PostAuthor />
{ fills }
<PostTrash />
</Fragment>
) }
</PluginPostStatusInfo.Slot>
</PanelBody>
);
}
const PostStatus = ( { isOpened, onTogglePanel } ) => (
<PanelBody
className="edit-post-post-status"
title={ __( 'Status & visibility' ) }
opened={ isOpened }
onToggle={ onTogglePanel }
>
<PluginPostStatusInfo.Slot>
{ ( fills ) => (
<Fragment>
<PostVisibility />
<PostSchedule />
<PostFormat />
<PostSticky />
<PostPendingStatus />
<PostAuthor />
{ fills }
<PostTrash />
</Fragment>
) }
</PluginPostStatusInfo.Slot>
</PanelBody>
);
```

## Currently available SlotFills and examples

There are currently seven available SlotFills in the `edit-post` package. Please refer to the individual items below for usage and example details:
There are currently eight available SlotFills in the `edit-post` package. Please refer to the individual items below for usage and example details:

* [PluginBlockSettingsMenuItem](/docs/designers-developers/developers/slotfills/plugin-block-settings-menu-item.md)
* [PluginDocumentSettingPanel](/docs/designers-developers/developers/slotfills/plugin-document-setting-panel.md)
Expand All @@ -107,7 +107,3 @@ There are currently seven available SlotFills in the `edit-post` package. Please
* [PluginPrePublishPanel](/docs/designers-developers/developers/slotfills/plugin-pre-publish-panel.md)
* [PluginSidebar](/docs/designers-developers/developers/slotfills/plugin-sidebar.md)
* [PluginSidebarMoreMenuItem](/docs/designers-developers/developers/slotfills/plugin-sidebar-more-menu-item.md)




Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# PluginBlockSettingsMenuItem

This slot allows for adding a new item into the More Options area.
This slot allows for adding a new item into the More Options area.
This will either appear in the controls for each block or at the Top Toolbar depending on the users setting.


## Example

```js
Expand All @@ -12,13 +11,18 @@ const { PluginBlockSettingsMenuItem } = wp.editPost;

const PluginBlockSettingsMenuGroupTest = () => (
<PluginBlockSettingsMenuItem
allowedBlocks=['core/paragraph']
icon='smiley'
label='Menu item text'
onClick={ () => { alert( 'clicked' )} } />
)

registerPlugin( 'block-settings-menu-group-test', { render: PluginBlockSettingsMenuGroupTest } );
allowedBlocks={ [ 'core/paragraph' ] }
icon="smiley"
label="Menu item text"
onClick={ () => {
alert( 'clicked' );
} }
/>
);

registerPlugin( 'block-settings-menu-group-test', {
render: PluginBlockSettingsMenuGroupTest,
} );
```

## Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
This SlotFill allows registering a UI to edit Document settings.

## Available Props

* __name__ `string`: A string identifying the panel.
* __className__ `string`: An optional class name added to the sidebar body.
* __title__ `string`: Title displayed at the top of the sidebar.
* __icon__ `(string|Element)`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.

## Example

```js
const { registerPlugin } = wp.plugins;
const { PluginDocumentSettingPanel } = wp.editPost;
import { registerPlugin } from '@wordpress/plugins';
import { PluginDocumentSettingPanel } from '@wordpress/edit-post';

const PluginDocumentSettingPanelDemo = () => (
<PluginDocumentSettingPanel
Expand All @@ -22,5 +24,9 @@ const PluginDocumentSettingPanelDemo = () => (
Custom Panel Contents
</PluginDocumentSettingPanel>
);
registerPlugin( 'plugin-document-setting-panel-demo', { render: PluginDocumentSettingPanelDemo, icon: 'palmtree' } );
```

registerPlugin( 'plugin-document-setting-panel-demo', {
render: PluginDocumentSettingPanelDemo,
icon: 'palmtree',
} );
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ This slot allows for injecting items into the bottom of the post-publish panel t
## Example

```js
const { registerPlugin } = wp.plugins;
const { PluginPostPublishPanel } = wp.editPost;

const PluginPostPublishPanelTest = () => {
return (
<PluginPostPublishPanel>
<p> Post Publish Panel </p>
</PluginPostPublishPanel>
)
}

registerPlugin( 'post-publish-panel-test', { render: PluginPostPublishPanelTest } );

import { registerPlugin } from '@wordpress/plugins';
import { PluginPostPublishPanel } from '@wordpress/edit-post';

const PluginPostPublishPanelTest = () => (
<PluginPostPublishPanel>
<p>Post Publish Panel</p>
</PluginPostPublishPanel>
);

registerPlugin( 'post-publish-panel-test', {
render: PluginPostPublishPanelTest,
} );
```

## Location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ This slots allows for the insertion of items in the Status & visibility panel of
## Example

```js
const { registerPlugin } = wp.plugins;
const { PluginPostStatusInfo } = wp.editPost;


const PluginPostStatusInfoTest = () => {
return(
<PluginPostStatusInfo>
<p>Post Status Info SlotFill</p>
</PluginPostStatusInfo>
)
}
import { registerPlugin } from '@wordpress/plugins';
import { PluginPostStatusInfo } from '@wordpress/edit-post';

const PluginPostStatusInfoTest = () => (
<PluginPostStatusInfo>
<p>Post Status Info SlotFill</p>
</PluginPostStatusInfo>
);

registerPlugin( 'post-status-info-test', { render: PluginPostStatusInfoTest } );
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# PluginPrePublishPanel

This slot allows for injecting items into the bottom of the pre-publish panel that appears to confirm publishing after the user clicks "Publish'.
This slot allows for injecting items into the bottom of the pre-publish panel that appears to confirm publishing after the user clicks "Publish".

## Example

```js
const { registerPlugin } = wp.plugins;
const { PluginPrePublishPanel }= wp.editPost;

const PluginPrePublishPanelTest = () => {
return (
<PluginPrePublishPanel>
<p> Pre Publish Panel </p>
</PluginPrePublishPanel>
)
}

registerPlugin( 'pre-publish-panel-test', { render: PluginPrePublishPanelTest } );

import { registerPlugin } from '@wordpress/plugins';
import { PluginPrePublishPanel } from '@wordpress/edit-post';

const PluginPrePublishPanelTest = () => (
<PluginPrePublishPanel>
<p>Pre Publish Panel</p>
</PluginPrePublishPanel>
);

registerPlugin( 'pre-publish-panel-test', {
render: PluginPrePublishPanelTest,
} );
```

## Location
Expand Down
Loading

0 comments on commit 2274ca2

Please sign in to comment.