Skip to content

Lift Framework 3.0-M6

Pre-release
Pre-release
Compare
Choose a tag to compare
@Shadowfiend Shadowfiend released this 26 Jul 16:12
· 861 commits to main since this release

This release features a good bit of cleanup from the previous one. It's been a busy
few months for the committers so the work is mostly in targeted improvements and
bug fixes:

Improvements

  • (#1706) Thanks to @chriswebster, an up to 90% performance increase in JSON
    serialization for lift-json!
  • (#1693) ParamFailure now behaves more correctly with ~>. That operator, when
    used on a Failure, returns a ParamFailure with the passed parameter, while
    preserving the rest of the original Failure's information. Before, invoking ~> with
    a parameter on a ParamFailure would replace the existing parameter with the new
    one, thus losing the previous parameter altogether. Now, we produce a copy of the
    ParamFailure with the new parameter, but we chain the previous ParamFailure
    to it so that it the original parameter is still accessible.
  • (#1698) Lift 3 sessions allow an actor proxy for client code to be created via
    serverActorForClient. This release includes some new setup configuration
    when creating those actors, like providing setup and teardown functions as well
    as ways to convert from application messages into client JS content.
  • (#1701) There is now a LiftRules.attributeForRemovedEventAttributes. When
    Lift strips event-related attributes (e.g. onclick, onsubmit, etc), if this rule is
    set to a String, it will tag the element whose event attributes were removed
    with the attributes that were removed. For example, setting it to Some("data-lift-removed-attributes")
    might result in a data-lift-removed-attributes="onclick onmouseover" attribute
    in your HTML if that element had its click and mouseover event handlers moved
    into page-specific JS. This allows you to make styling decisions based on these
    attributes, if you want to. See the rule documentation for more.
  • (#1705) Until now, jsonCall would fail silently on both client and server if the
    submitted data from the client wasn't valid JSON. Now, it will log (at an ERROR
    log level) on the server if invalid JSON is sent. Whether this log info will be printed
    or not is configurable using usual logger configuration.
  • (#1709) You can now register to find out when a function owner no longer has
    available functions bound in a session. Function owners typically (though not always)
    correspond to server-side functions bound or a page rendering (e.g., form fields).
    These usually expire ~2 minutes after the user is no longer on the page, but until
    now there was no way to find out that a given page was no longer “in scope”. In
    certain cases, that could be interesting to clean up page-related temporary assets
    or resource allocations. We now provide LiftSession.onFunctionOwnersRemoved,
    which can be set during application startup so that any new sessions can register
    those listeners. @andreak posted an excellent example of how they are using this
    on the mailing list.

Bug Fixes

  • (#1694) When generating post-page JavaScript (mostly used by Wiring), there
    were some cases where null pointer exceptions could be thrown. These should
    be gone.
  • (#1692) When binding onclick to an element that had an href, the new code
    that extracts event handlers into page-specific JS was failing to bind the click
    handler. This is now fixed, as is a related bug where elements that didn't need
    handlers still had a random id assigned to them.
  • (#1677) When sending messages to comet actors before they are created (via
    LiftSession.sendCometActorMessage), they would arrive in reverse order.
    This is now fixed, and the first message sent using sendCometActorMessage
    arrives first.
  • (#1703) When we moved away from bind, the CSS bindings in ProtoUser
    that checked password changes were incorrect, in that they never saw the
    user having submitted two versions of the same password. This is now fixed,
    and the change password stuff provided by ProtoUser is now correct.