Skip to content

Commit

Permalink
Remove anchor support from dynamic blocks (WordPress#51288)
Browse files Browse the repository at this point in the history
* Remove anchor support from dynamic blocks

* Remove unnecessary codes
  • Loading branch information
t-hamano authored and sethrubenstein committed Jul 13, 2023
1 parent fd1ebfc commit 833bd4c
Show file tree
Hide file tree
Showing 57 changed files with 55 additions and 176 deletions.
4 changes: 2 additions & 2 deletions docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function render_block() {
- Type: `boolean`
- Default value: `false`

Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link.
Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link. _Important: It doesn't work with dynamic blocks yet._

```js
// Declare support for anchor links.
Expand Down Expand Up @@ -232,7 +232,7 @@ When the block declares support for `color.background`, the attributes definitio

_**Note:** Deprecated since WordPress 6.3._

This property has been replaced by [`filter.duotone`](#filter-duotone).
This property has been replaced by [`filter.duotone`](#filter-duotone).

### color.gradients

Expand Down
106 changes: 53 additions & 53 deletions docs/reference-guides/core-blocks.md

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions lib/block-supports/anchor.php

This file was deleted.

1 change: 0 additions & 1 deletion lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,5 @@ function gutenberg_is_experiment_enabled( $name ) {
require __DIR__ . '/block-supports/spacing.php';
require __DIR__ . '/block-supports/dimensions.php';
require __DIR__ . '/block-supports/duotone.php';
require __DIR__ . '/block-supports/anchor.php';
require __DIR__ . '/block-supports/shadow.php';
require __DIR__ . '/block-supports/behaviors.php';
1 change: 0 additions & 1 deletion packages/block-library/src/archives/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"usesContext": [ "postType", "postId", "commentId" ],
"supports": {
"anchor": true,
"html": false,
"align": true,
"alignWide": false,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/calendar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"supports": {
"align": true,
"anchor": true,
"color": {
"link": true,
"__experimentalSkipSerialization": [ "text", "background" ],
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/categories/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"usesContext": [ "commentId" ],
"supports": {
"anchor": true,
"html": false,
"inserter": false,
"__experimentalBorder": {
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-author-name/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"usesContext": [ "commentId" ],
"supports": {
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-content/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}
},
"supports": {
"anchor": true,
"color": {
"gradients": true,
"link": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"usesContext": [ "commentId" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-edit-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
}
},
"supports": {
"anchor": true,
"html": false,
"color": {
"link": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-reply-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}
},
"supports": {
"anchor": true,
"color": {
"gradients": true,
"link": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comment-template/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"usesContext": [ "postId" ],
"supports": {
"align": true,
"anchor": true,
"html": false,
"reusable": false,
"spacing": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"usesContext": [ "postId", "comments/paginationArrow" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"textdomain": "default",
"usesContext": [ "postId" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"usesContext": [ "postId", "comments/paginationArrow" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comments-pagination/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"comments/paginationArrow": "paginationArrow"
},
"supports": {
"anchor": true,
"align": true,
"reusable": false,
"html": false,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"supports": {
"align": [ "wide", "full" ],
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/home-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"style"
],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"typography": {
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/latest-comments/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/latest-posts/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
},
"supports": {
"align": true,
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/loginout/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
}
},
"supports": {
"anchor": true,
"className": true,
"typography": {
"fontSize": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
},
"supports": {
"align": [ "wide", "full" ],
"anchor": true,
"html": false,
"inserter": true,
"typography": {
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/page-list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"openSubmenusOnClick"
],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"typography": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"usesContext": [ "postType", "postId" ],
"supports": {
"anchor": true,
"spacing": {
"margin": true,
"padding": true
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-author-name/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
},
"usesContext": [ "postType", "postId" ],
"supports": {
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-author/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
},
"usesContext": [ "postType", "postId", "queryId" ],
"supports": {
"anchor": true,
"html": false,
"spacing": {
"margin": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-comments-count/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"usesContext": [ "postId" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-comments-form/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"usesContext": [ "postId", "postType" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-comments-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
}
},
"supports": {
"anchor": true,
"html": false,
"color": {
"link": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-content/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"textdomain": "default",
"usesContext": [ "postId", "postType", "queryId" ],
"supports": {
"anchor": true,
"align": [ "wide", "full" ],
"html": false,
"__experimentalLayout": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"usesContext": [ "postId", "postType", "queryId" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-excerpt/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
},
"usesContext": [ "postId", "postType", "queryId" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-featured-image/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"usesContext": [ "postId", "postType", "queryId" ],
"supports": {
"align": [ "left", "right", "center", "wide", "full" ],
"anchor": true,
"color": {
"__experimentalDuotone": "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
"text": false,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-navigation-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
}
},
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-template/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"reusable": false,
"html": false,
"align": [ "wide", "full" ],
"anchor": true,
"__experimentalLayout": true,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-terms/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
},
"usesContext": [ "postId", "postType" ],
"supports": {
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
},
"supports": {
"align": [ "wide", "full" ],
"anchor": true,
"html": false,
"color": {
"gradients": true,
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/query-no-results/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"textdomain": "default",
"usesContext": [ "queryId", "query" ],
"supports": {
"anchor": true,
"align": true,
"reusable": false,
"html": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"usesContext": [ "queryId", "query", "paginationArrow", "showLabel" ],
"supports": {
"anchor": true,
"reusable": false,
"html": false,
"color": {
Expand Down
Loading

0 comments on commit 833bd4c

Please sign in to comment.