-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add Interactivity API support #451
base: main
Are you sure you want to change the base?
Conversation
@parthnvaswani Can you look into why the PHP Unit test is failing? Also, add title of adding support for Interactivity API. |
@rtCamp/team-sys We are facing an issue with the PHP Unit test, it is failing because of this issue https://github.com/rtCamp/theme-elementary/actions/runs/9960495534/job/27712384396#step:6:58
I am adding an error log here as well. |
eb25c11
to
f2334bf
Compare
The |
@parthnvaswani Please take a looks at the suggestions. |
To add support for interactive blocks I think only following things are needed,
Changes in webpack.config, other php classes etc are only to support custom modules, either for block independent functionality or for demonstration on core blocks. |
@divyarajmasani Yup it's correct the webpack was modified for implementation on core blocks. |
Please look at the suggested changes on the review. And make following changes.
Cc: @parthnvaswani |
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.
There are still some inconsistencies in the build process but those will be handled in a separate issue.
For now, this PR looks good to go.
…e/add-support-for-js-modules
Merging this keeping the PR limited to adding support for the interactivity API, more changes or improvements to other parts of the skeleton will be handle separately. Thanks for your reviews @thelovekesh , and do suggests any other change that would benefit overall development. If you would run through the changes once and approve. 🙇 |
Description
This PR addresses the task of updating node packages and integrating support for JavaScript modules into the project. The focus is on enhancing theme scripts for the Interactivity API while ensuring compatibility with the latest dependencies, without breaking existing functionality.
Technical Details
package.json
to include the latest dependencies without affecting existing functionality.wp-script
dependency to version 27.6.0.@wordpress/interactivity
as a dependency.--experimental-modules
flag for compatibility with JavaScript modules.wp_enqueue_script_module
.modules
inassets/src/js
.modules
folder to demonstrate the implementation of JavaScript modules in the project.Checklist
package.json
to include the latest dependencies without breaking existing functionality.wp-script
dependency to version 27.6.0.@wordpress/interactivity
as a dependency.--experimental-modules
flag.wp_enqueue_script_module
.modules
inassets/src/js
.modules
folder.Screenshots/Recordings
Screen.Recording.2024-04-09.at.5.57.50.PM.mov
Fixes/Covers issue
Fixes #450