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

Create block: Update interactive-template to the new store() API #56613

Merged

Conversation

DAreRodz
Copy link
Contributor

What?

Update the create-block-interactive-template package to adapt its templates to the recently implemented new store() API.

Tracking issue: #53740

Why?

The new store() implementation breaks the generated code from this template.

How?

Both the view.js.mustache and the render.php.mustache files have been updated.

@DAreRodz DAreRodz requested review from juanmaguitar, luisherranz and ryanwelcher and removed request for juanmaguitar and luisherranz November 28, 2023 19:39
@DAreRodz DAreRodz added [Type] Build Tooling Issues or PRs related to build tooling npm Packages Related to npm packages [Tool] Create Block /packages/create-block [Feature] Interactivity API API to add frontend interactivity to blocks. labels Nov 28, 2023
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.

Perfect 🎉

(I've also taken the opportunity to replace uniqid with wp_unique_id)

@luisherranz luisherranz enabled auto-merge (squash) November 29, 2023 10:49
@juanmaguitar
Copy link
Contributor

juanmaguitar commented Nov 29, 2023

I'll update https://github.com/WordPress/block-development-examples/tree/trunk/plugins/interactivity-api-block-833d15 once this PR is merged and new store() is available on latest Gutenberg version

@luisherranz luisherranz merged commit 00ccb8b into trunk Nov 29, 2023
51 checks passed
@luisherranz luisherranz deleted the update/create-block-interactive-template-new-store-api branch November 29, 2023 11:26
@github-actions github-actions bot added this to the Gutenberg 17.2 milestone Nov 29, 2023
derekblank pushed a commit that referenced this pull request Dec 7, 2023
…56613)

* Update templates to the new `store()` API

* Add changelog entry

* Use wp_unique_id

---------

Co-authored-by: Luis Herranz <[email protected]>
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. npm Packages Related to npm packages [Tool] Create Block /packages/create-block [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants