-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Compat: Update HTML API with changes from 6.6 #63089
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
case '-NAV': | ||
case '-SEARCH': | ||
case '-SECTION': | ||
case '-SUMMARY': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apparently added code from the 6.5 branch when I initially added this file.
Flaky tests detected in 29797ed. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9779966065
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I diffed all files against their counterparts from the respective Core branches, and the diffs looked fine 👍
Updates the HTML API components in the compatability layer with updates from each of the 6.4, 6.5, and 6.6 branches from Core. Notably, because of the breaking change in 6.5 to the `WP_HTML_Span` and `WP_HTML_Text_Replacement` classes, which changed the range format from `(start, end)` to `(start, length)`, the 6.6 classes still reference the `Gutenberg_HTML_Span_6_5` and `Gutenberg_HTML_Text_Replacement_6_5` substitutions. While updating it was noticed that the 6.4 compatability code accidentally pulled in updates from the 6.5 branch for the HTML Processor. These additions have been removed for the sake of closer correspondance with the Core code. Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
29797ed
to
15bc8c0
Compare
Updates the HTML API components in the compatability layer with updates from each of the 6.4, 6.5, and 6.6 branches from Core. Notably, because of the breaking change in 6.5 to the `WP_HTML_Span` and `WP_HTML_Text_Replacement` classes, which changed the range format from `(start, end)` to `(start, length)`, the 6.6 classes still reference the `Gutenberg_HTML_Span_6_5` and `Gutenberg_HTML_Text_Replacement_6_5` substitutions. While updating it was noticed that the 6.4 compatability code accidentally pulled in updates from the 6.5 branch for the HTML Processor. These additions have been removed for the sake of closer correspondance with the Core code. Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
15bc8c0
to
d8d6efa
Compare
Updates the HTML API components in the compatability layer with updates from each of the 6.4, 6.5, and 6.6 branches from Core. Notably, because of the breaking change in 6.5 to the `WP_HTML_Span` and `WP_HTML_Text_Replacement` classes, which changed the range format from `(start, end)` to `(start, length)`, the 6.6 classes still reference the `Gutenberg_HTML_Span_6_5` and `Gutenberg_HTML_Text_Replacement_6_5` substitutions. While updating it was noticed that the 6.4 compatability code accidentally pulled in updates from the 6.5 branch for the HTML Processor. These additions have been removed for the sake of closer correspondance with the Core code. Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
d8d6efa
to
750f1db
Compare
Updates the HTML API components in the compatability layer with updates from each of the 6.4, 6.5, and 6.6 branches from Core. Notably, because of the breaking change in 6.5 to the `WP_HTML_Span` and `WP_HTML_Text_Replacement` classes, which changed the range format from `(start, end)` to `(start, length)`, the 6.6 classes still reference the `Gutenberg_HTML_Span_6_5` and `Gutenberg_HTML_Text_Replacement_6_5` substitutions. While updating it was noticed that the 6.4 compatability code accidentally pulled in updates from the 6.5 branch for the HTML Processor. These additions have been removed for the sake of closer correspondance with the Core code. Co-authored-by: ockham <bernhard-reiter@git.wordpress.org>
What?
Ports code from WordPress 6.6 into
lib/compat/wordpress-6.6
.Ports code from WordPress 6.5 into
lib/compat/wordpress-6.5
.Ports code from WordPress 6.4 into
lib/compat/wordpress-6.4
.Because of the breaking change in 6.5 of the Span and Text Replacement, the 6.6 functions still refer to
Gutenberg_HTML_Span_6_5
andGutenberg_HTML_Text_Replacement_6_5
.Why?
Ensures that code relying on functionality in the HTML API will work on Gutenberg sites running on older WordPress versions.
How?
Copies files from Core in the
6.6
branch and replacesWP_
classes that have updates in 6.6 with theirGutenberg_
counterparts.Testing Instructions
Let the tests run. Since nothing calls these classes yet the only thing that should matter is whether a site loads with the plugin installed.