Skip to content

Page transitions: reliability roadmap — re-init registry, upstream the replicas, View Transitions path #530

Description

@georgeolaru

Architecture review in plans/2026-06-12-page-transitions-architecture-review.md. Summary:

The Barba-based system is well engineered (head asset diffing, double-init guards, WC exclusions, lifecycle events) but structurally owns the integration burden for the whole ecosystem: every block/plugin needs a special trigger in Anima — cache-busted script re-execution, closure-state vendor hacks (bully), a ~250-line replica of Nova Blocks' header color detection guarded by a MutationObserver, per-plugin allowlists (FacetWP, WC fragments), and resize/scroll replay heuristics. Reliability is capped by the least idempotent script on any page; ecommerce pages are excluded outright.

Roadmap:

  • H1 (this codebase, small): invert control — anima.pageTransitions.register({ id, cleanup, reinit }) + anima:before-swap/anima:after-swap events carrying the container; migrate the hardcoded re-init list into registrations; freeze the lifecycle events as public API. Third parties get a documented extension point.
  • H2 (Nova Blocks releases): header exposes refresh(container) (delete the replica + observer war), bully gets destroy(), frontend scripts adopt idempotent init(container) — cache-bust reloads become calls.
  • H3 (platform): cross-document View Transitions + Speculation Rules as a third engine — real navigations make every plugin/form/analytics/WooCommerce flow work by construction, with the wipe choreography declared in CSS. Ecommerce pages stop being excluded. Prototype first: a CSS-only @view-transition spike answers the choreography-fidelity question in a day. Firefox falls back to plain instant navigation.

Constraint: keep the SM Site Editor Live Site preview working (anima/page_transitions_in_customize_preview, style-manager#139).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions