Skip to content

v1.16.0 — Interactions (element animations) CRUD

Choose a tag to compare

@BenKalsky BenKalsky released this 07 Jul 02:33
· 56 commits to main since this release
fe305ce

Elementor v4 Interactions (element animations) CRUD — 4 tools

The third and final v4 design-system plank — after Global Classes (v1.14.0) and Variables (v1.15.0). Four MCP tools to author Elementor 4 Interactions: per-element scroll / hover / click animations.

Tool
list-interactions element's interactions as {interaction_id, trigger, effect, type, direction, duration_ms, delay_ms, easing}
add-interaction ergonomic fields → the nested atomic tree; returns the canonical id
edit-interaction id-addressable in-place patch — the differentiator
delete-interaction delete by id

Beat vs Novamira: the reference plugin has no interaction edit (only list / add / delete-by-index), because id assignment forces a save round-trip. This ships edit-interaction keyed on the canonical interaction_id, patching only the changed fields while preserving the rest — including Pro nodes it doesn't model.

Built against Elementor's actual source (modules/interactions/*)

  • Storage: each element's top-level interactions JSON field {version:1, items:[…]}; each item the nested atomic tree interaction-item → animation-preset-props → timing-config / config-v2 ($$type keys + free/pro enum split verified per prop-type + Presets).
  • IDs: add writes temp-<hex>; Elementor's save parser canonicalizes it; the tool re-reads to surface the id (and does so for edit too when a temp id gets rewritten).
  • Frontend cache: rebuilds the elementor-interactions-cache postmeta from the saved page after every write, so changes take effect even on the raw-meta (REST/CLI) save path that skips document/after_save.

Gating / safety

Registers only with the e_interactions + Atomic Widgets experiments; interactions attach only to atomic e- elements (non-atomic rejected). Enforces Elementor's 5-interaction-per-element cap. Pro triggers/easing gated on Utils::has_pro(); the scrollOn (needs a scroll range) and custom effect (needs a keyframe payload) options are rejected until their data is modeled. Per-post edit_post capability on read + write. Writes manage_options, reads edit_posts; enabled by default.

Tests

+35 (capability + functional; a stub emulates the save-time id canonicalization and the postmeta cache). Suite 633 green.

Converged over 8 Codex review rounds (10 verified fixes, 2 refuted false positives — scrollOut is a real trigger; duration/delay have no save-side max).