Skip to content

HTML API: Backport updates from Core - #50290

Merged
dmsnell merged 1 commit into
trunkfrom
html-api/updates-from-core-pointer-tracking
May 4, 2023
Merged

dmsnell merged 1 commit into
trunkfrom
html-api/updates-from-core-pointer-tracking

Conversation

@dmsnell

@dmsnell dmsnell commented May 3, 2023 •

Copy link
Copy Markdown
Member

What?

In this "blessed" patch we're backporting some udpates coming from Core in the Tag Processor, namely a major fix to a rare bug that occurs when making changes and then seeking to an earlier position in a document.

  • Preserve internal cursor across updates #4371
  • Update code example formatting to fix Developer Resources docs #4419
  • Update whitespace formatting to pass Gutenberg linter #4433

Why?

The update fixes a defect in the Tag Processor and we want to avoid triggering that defect.

How?

See the original work in Core (linked above).

Testing Instructions

As a "blessed" PR this should only require basic confirmation of the changes (via code audit) and passing of the existing test suite. The code changes have been reviewed and approved and merged into WordPress.

@dmsnell
dmsnell requested a review from spacedmonkey as a code owner May 3, 2023 14:31
@dmsnell

dmsnell commented May 3, 2023

Copy link
Copy Markdown
Member Author

@anton-vlasenko another example in this PR of code that was accepted in Core through the linting but is rejected in Gutenberg. mind taking a look?

@ockham

ockham commented May 4, 2023

Copy link
Copy Markdown
Contributor

another example in this PR of code that was accepted in Core through the linting but is rejected in Gutenberg.

Yeah, curious that this wasn't flagged by CI on WordPress/wordpress-develop#4371. I thought we were using the same WPCS rulesets on GB and wordpress-develop 🤔

@ockham

ockham commented May 4, 2023

Copy link
Copy Markdown
Contributor

BTW once we sort out the linter issue, there's already another formatting commit that we might consider backporting (as part of this PR, or separately).

@dmsnell
dmsnell force-pushed the html-api/updates-from-core-pointer-tracking branch from b789760 to 41a689e Compare May 4, 2023 08:47
@dmsnell
dmsnell force-pushed the html-api/updates-from-core-pointer-tracking branch 3 times, most recently from 1ecc29f to 849461f Compare May 4, 2023 10:45
@WordPress WordPress deleted a comment from github-actions Bot May 4, 2023
@dmsnell
dmsnell force-pushed the html-api/updates-from-core-pointer-tracking branch from 849461f to 36b83b0 Compare May 4, 2023 11:06
@github-actions

github-actions Bot commented May 4, 2023 •

Copy link
Copy Markdown

Flaky tests detected in 6e9a90d12ea7adfbff58de66f7e2c071941fa5c2.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4882192923
📝 Reported issues:

@dmsnell
dmsnell force-pushed the html-api/updates-from-core-pointer-tracking branch 4 times, most recently from bac8cca to ee31485 Compare May 4, 2023 14:24
In this "blessed" patch we're backporting some udpates coming from Core in the
Tag Processor, namely a major fix to a rare bug that occurs when making changes
and then seeking to an earlier position in a document.

 - Preserve internal cursor across updates [#4371](WordPress/wordpress-develop#4371)
 - Update code example formatting to fix Developer Resources docs [#4419](WordPress/wordpress-develop#4419)
 - Update whitespace formatting to pass Gutenberg linter [#4433](WordPress/wordpress-develop#4422)
@dmsnell
dmsnell force-pushed the html-api/updates-from-core-pointer-tracking branch from ee31485 to 23c6c1a Compare May 4, 2023 15:04
@dmsnell
dmsnell merged commit 23c6c1a into trunk May 4, 2023
@dmsnell
dmsnell deleted the html-api/updates-from-core-pointer-tracking branch May 4, 2023 15:38
@anton-vlasenko

Copy link
Copy Markdown
Contributor

@anton-vlasenko another example in this PR of code that was accepted in Core through the linting but is rejected in Gutenberg. mind taking a look?

Thanks for the ping, @dmsnell. Yes, this is expected.
It's because Gutenberg does use the WordPress-Docs ruleset, while Core does not.
This makes the backporting process less ideal than it could be.

@dmsnell

dmsnell commented May 5, 2023

Copy link
Copy Markdown
Member Author

@anton-vlasenko I support your linked suggestion to lift this demand in Gutenberg. also, the changes I've had to make are not particularly better after the lint rule, just different. The linter in this case forced a vertical misalignment (actually it did in the previous change I had to do as well) so from a robotic point of view it now meets all the rules, but from a human standpoint it's less comprehensible 🤷‍♂️

in any case it is frustrating to go through the linting process in Core and then bring back those changes into Gutenberg, which should need no further changes, and be rejected. I sense that you already understand this but wanted to share that's been my experience at least a couple times now.

thanks for looking into this and linking that conversation: I hope we can resolve this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants