Skip to content
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

WP_HTML_Tag_Processor: Rename attribute_updates to lexical_updates #47053

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Jan 11, 2023

What?

Rename:

  • The $attribute_updates member to $lexical_updates
  • apply_attribute_updates() to apply_lexical_updated()
  • class_name_updates_to_attributes_updates() to class_name_updates_to_lexical_updates

And update PHPDoc and comments accordingly.

All of these are private, so we're not breaking any APIs.

Why?

To enable other kinds of updates via the same mechanism, e.g. for a prospective set_content_inside_balanced_tags(). See #47036 and #46680 (comment) for more context.

How?

It's a simple rename 😬

Testing Instructions

See unit tests.

@ockham ockham added the [Type] Experimental Experimental feature or API. label Jan 11, 2023
@ockham ockham self-assigned this Jan 11, 2023
@ockham ockham marked this pull request as ready for review January 11, 2023 10:26
@github-actions
Copy link

github-actions bot commented Jan 11, 2023

Flaky tests detected in b24d6c7.
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/3930915630
📝 Reported issues:

@ockham ockham force-pushed the rename/attribute-updates-to-lexical-updates branch 2 times, most recently from c7eba79 to 7f84941 Compare January 16, 2023 13:34
@ockham ockham force-pushed the rename/attribute-updates-to-lexical-updates branch from 7f84941 to b24d6c7 Compare January 16, 2023 13:35
Copy link
Member

@dmsnell dmsnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it helps then I think we can merge this now as a rename and consider the deeper implications as we go. At least, this is an easy change to review. Thanks 👍

@ockham ockham merged commit e48f067 into trunk Jan 16, 2023
@ockham ockham deleted the rename/attribute-updates-to-lexical-updates branch January 16, 2023 18:54
@github-actions github-actions bot added this to the Gutenberg 15.1 milestone Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Experimental Experimental feature or API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants