Interactivity API: Apply the same directive name restrictions as the client#8048
Interactivity API: Apply the same directive name restrictions as the client#8048sirreal wants to merge 3 commits intoWordPress:trunkfrom
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
a4da689 to
d567914
Compare
| if ( ! preg_match( | ||
| /* | ||
| * This must align with the client-side regex used by the interactivity API. | ||
| * @see https://github.com/WordPress/gutenberg/blob/ca616014255efbb61f34c10917d52a2d86c1c660/packages/interactivity/src/vdom.ts#L20-L32 |
There was a problem hiding this comment.
This is really helpful, but can probably be improved since this URL is pinned to a specific hash. Not a blocker for commit though.
|
Thanks for reviewing and landing this! |
Prevent the server from rendering directives that the client will ignore.
The server renders:
The client does not support that behavior. It was never intended to be supported.
See WordPress/gutenberg#65803.
Trac ticket: https://core.trac.wordpress.org/ticket/62426
Todo:
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.