Skip to content

8.0.2

Latest

Choose a tag to compare

@hugithordarson hugithordarson released this 18 Jun 12:07
· 3 commits to master since this release

The headline of this release is AjaxSlim β€” a new, modern, morph-native Ajax framework β€” alongside fixes and dev-experience polish in the existing frameworks.

Existing applications using the legacy Ajax framework in the default configuration can upgrade safely: a full audit of every changed shared-framework file confirmed no observable change in production beyond the two deliberate behavior changes noted below.

⚠️ Behavior changes to be aware of

  • Ajax page-restoration errors now return HTTP 500 (was HTTP 200). When a page has aged out of the cache ("backtracked too far"), the error response now carries a 500 status instead of 200. Prototype-based Ajax flows (AjaxUpdateContainer / AjaxObserveField / AjaxUpdateLink) consequently invoke their onFailure path instead of onSuccess β€” so a stale-link Ajax request now surfaces a failure to the user instead of silently morphing the error page into the DOM. This is an intentional correctness fix.
  • Development mode now injects a Parsley "controls strip" (plus console capture) into every HTML page.

AjaxSlim (new framework)

  • A morph-native, fetch-based, dependency-free rebuild of the core Ajax update spine β€” no Prototype, no Scriptaculous. Elements live in package er.ajax as a drop-in replacement for the legacy Ajax framework (the two cannot share a classpath; AjaxSlim replaces Ajax).
  • DOM updates reconcile via Idiomorph by default, preserving focus / scroll / selection / unchanged subtrees.
  • Core elements: AjaxUpdateContainer, AjaxSelfUpdatingContainer, AjaxUpdateLink, AjaxObserveField, AjaxSubmitButton, AjaxUpdateTrigger, plus AjaxModalContainer (native <dialog>), AjaxBusySpinner, AjaxPing, and AjaxSortable (drag-to-reorder).
  • Multi-container update in a single round-trip.
  • Errors during an Ajax request are now shown to the user in an overlay that renders the server's actual response (e.g. the exception page), instead of being silently swallowed or morphed into the page.
  • AjaxPlayground β€” a login-free, database-free demo app bundled in the repo that exercises every AjaxSlim element together, with component-gallery pages, an element reference, and "danger-matrix" scenario pages. Clone the repo and run it to try the new framework hands-on.

New elements: AjaxPopUpButton & AjaxBrowser

  • AjaxPopUpButton β€” a searchable, morph-native single-select (a WOPopUpButton drop-in) built on the wonder-select widget, with type-to-search, keyboard navigation, and viewport-aware dropdown sizing.
  • AjaxBrowser β€” the multi-select counterpart, for picking several values from a searchable list.

Legacy Ajax framework

  • AjaxUpdateContainer gains an opt-in morph="$true" binding (Idiomorph reconciliation). The default remains classic innerHTML replacement, so existing apps are unchanged.
  • Removed dead/unused subsystems: AjaxFlexibleFileUpload, AjaxSocialNetwork(Link), AjaxProxy, and the entire jabsorb / JSON-RPC stack (er.ajax.json.*).

ERExtensions / ajax session

  • Ajax page cache reworked: keyed by (page, container) with the container fallback scoped to the request's own page instance (fixes cross-instance content bleed); fragment-cache eviction is now least-recently-used.
  • Failed ajax page-cache lookups log a WARN instead of failing silently.
  • Page cache configuration is logged at launch.

Dependencies

  • Parsley pinned to released 1.5.0.

Full changelog: v8.0.1...v8.0.2