New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichText state structure for value manipulation #7890

Merged
merged 44 commits into from Oct 1, 2018
Commits
Jump to file or symbol
Failed to load files and symbols.
+15 −12
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Change deprecation removal version

  • Loading branch information...
iseulde committed Sep 26, 2018
commit 6855216c57f70244e56240d0ab8014d31cfaf31b
Copy path View file
@@ -1,9 +1,7 @@
Gutenberg's deprecation policy is intended to support backwards-compatibility for two minor releases, when possible. The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.
## 4.2.0
## 4.4.0
- Writing resolvers as async generators has been removed. Use the controls plugin instead.
- `wp.components.AccessibleSVG` component has been removed. Please use `wp.components.SVG` instead.
- The block attribute sources `children` and `node` have been removed. Please use the `rich-text-value` source instead. See the core blocks for examples.
- `wp.blocks.node.matcher` has been removed. Please use `wp.richTextValue.create` instead.
- `wp.blocks.node.toHTML` has been removed. Please use `wp.richTextValue.toHTMLString` instead.
@@ -13,6 +11,11 @@ Gutenberg's deprecation policy is intended to support backwards-compatibility fo
- `wp.blocks.children.concat` has been removed. Please use `wp.richTextValue.concat` instead.
- `wp.blocks.children.getChildrenArray` has been removed. Please use `wp.richTextValue.create` instead.
## 4.2.0
- Writing resolvers as async generators has been removed. Use the controls plugin instead.
- `wp.components.AccessibleSVG` component has been removed. Please use `wp.components.SVG` instead.
## 4.1.0
- `wp.data.dispatch( 'core/editor' ).checkTemplateValidity` has been removed. Validity is verified automatically upon block reset.
@@ -48,7 +48,7 @@ function getChildrenArray( children ) {
deprecated( 'children and node source', {
alternative: 'rich-text-value source',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
// The fact that block children are compatible with the element serializer
@@ -69,7 +69,7 @@ export function concat( ...blockNodes ) {
deprecated( 'wp.blocks.children.concat', {
alternative: 'wp.richTextValue.concat',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
const result = [];
@@ -105,7 +105,7 @@ export function fromDOM( domNodes ) {
deprecated( 'wp.blocks.children.fromDom', {
alternative: 'wp.richTextValue.create',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
const result = [];
@@ -131,7 +131,7 @@ export function toHTML( children ) {
deprecated( 'wp.blocks.children.toHTML', {
alternative: 'wp.richTextValue.toHTMLString',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
const element = getSerializeCapableElement( children );
@@ -151,7 +151,7 @@ export function matcher( selector ) {
deprecated( 'children source', {
alternative: 'rich-text-value source',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
return ( domNode ) => {
@@ -37,7 +37,7 @@ function isNodeOfType( node, type ) {
deprecated( 'wp.blocks.node.isNodeOfType', {
alternative: 'node.type',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
return node && node.type === type;
@@ -77,7 +77,7 @@ export function fromDOM( domNode ) {
deprecated( 'wp.blocks.node.fromDOM', {
alternative: 'wp.richTextValue.create',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
if ( domNode.nodeType === TEXT_NODE ) {
@@ -111,7 +111,7 @@ export function toHTML( node ) {
deprecated( 'wp.blocks.node.toHTML', {
alternative: 'wp.richTextValue.toHTMLString',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
return children.toHTML( [ node ] );
@@ -129,7 +129,7 @@ export function matcher( selector ) {
deprecated( 'node source', {
alternative: 'rich-text-value source',
plugin: 'Gutenberg',
version: '4.2',
version: '4.4',
} );
return ( domNode ) => {
ProTip! Use n and p to navigate between commits in a pull request.