Add anchor support to static blocks#23197
Merged
youknowriad merged 2 commits intomasterfrom Jun 23, 2020
Merged
Conversation
|
Size Change: +236 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
|
@youknowriad This is great! Tested it locally, and it works as expected! 👍 The only observation/suggestion I have is to maybe add (Note: I recognize that the https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/hooks/anchor.js#L75 It would avoid interactions like this: (Chrome) |
883460e to
4605974
Compare
Contributor
Author
|
Good suggestion @ItsJonQ Fixed. |
mtias
approved these changes
Jun 23, 2020
Member
|
Thanks for looking at this one. It makes sense to extend this support since people are already attempting to do it by hand and running into validation issues. |
Contributor
|
This is very helpful! Thank you. |
|
THANKS to all who helped get it this far! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related #21023
This PR adds anchor support to several blocks and updates the transforms to retain the attribute when transforming blocks.
the reasoning is:
Notes
I'd like to do the same for dynamic blocks too. Work around support flags for dynamic blocks is being done here #23007 We should circle back to the anchor support too once it lands.
Testing instructions