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

Interactivity API: Remove unused state and rename props to attributes in getElement() #57974

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

cbravobernal
Copy link
Contributor

What?

Remove state from getElement() function.
Rename props to attributes in getElement() function.

I've put as a breaking change just in case, but state should have not been used by a third party developer yet.

Why?

  • State has not yet been used, let's gather more feedback and leave it for future releases.
  • Renaming props, which can be everything, to attributes, as the props received will always be HTML attributes.

As discussed on the update of the store(). See link.

Testing Instructions

Interactivity should not be broken. You can test navigation, search, query without forcing reload, etc.

@cbravobernal cbravobernal added [Type] Enhancement A suggestion for improvement. [Type] Breaking Change For PRs that introduce a change that will break existing functionality [Packages] Interactivity /packages/interactivity labels Jan 18, 2024
@cbravobernal cbravobernal self-assigned this Jan 18, 2024
@cbravobernal cbravobernal added [Type] Enhancement A suggestion for improvement. and removed [Type] Enhancement A suggestion for improvement. labels Jan 18, 2024
@cbravobernal cbravobernal marked this pull request as ready for review January 18, 2024 15:27
@cbravobernal cbravobernal removed the [Type] Enhancement A suggestion for improvement. label Jan 18, 2024
Copy link
Member

@luisherranz luisherranz left a comment

Choose a reason for hiding this comment

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

LGTM!

packages/interactivity/CHANGELOG.md Outdated Show resolved Hide resolved
@cbravobernal cbravobernal merged commit 3f010e6 into trunk Jan 18, 2024
55 checks passed
@cbravobernal cbravobernal deleted the enhancement/interactivity-clean-get-element branch January 18, 2024 16:56
@github-actions github-actions bot added this to the Gutenberg 17.6 milestone Jan 18, 2024
@luisherranz luisherranz added the [Feature] Interactivity API API to add frontend interactivity to blocks. label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity [Type] Breaking Change For PRs that introduce a change that will break existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants