WebSharper UI.Next Version 0.1.31.32

Simon Fowler

Simon Fowler

Aug 19, 2014

Reading time:

2 mins

Share via:

WebSharper UI.Next Version 0.1.31.32 has been released on NuGet for your experimentation.

This version begins our push toward better handling of input. In particular, the latest version provides views of mouse and keyboard inputs, and combinators to allow snapshots of views and predicated view updates.

View Combinators

    static member SnapshotOn : 'B -> View<'A> -> View<'B> -> View<'B>
    static member UpdateWhile : 'A -> View<bool> -> View<'A> -> View<'A>

The new SnapshotOn combinator allows snapshots to be taken of a view whenever a 'trigger' view updates. This makes it useful for reacting to events, and has helped with our ongoing work to implement Piglets using UI.Next.

The UpdateWhile combinator provides a view which only updates whenever the value of a given predicate view is true.

While we don't provide first-class discrete event streams just yet, such combinators make it possible to emulate them.

You can find more information in the Documentation.

Input Views

The Input module provides views of the mouse and keyboard, such as keys and buttons pressed, and the mouse position. This will be expanded in the near future.

And the rest!

Additionally, there's now support for delayed animation, which is useful when developing visualisations with staggered transitions, and some bugfixes.

You can find samples of the Mouse and Keyboard views, as well as the snapshotting and predicated update functions on the UI.Next samples website. As ever, if you've been using UI.Next and have any comments, we'd love to hear them.

Bugfixes

  • Animation.Concat sometimes caused "undefined is not a function" errors within JavaScript
  • Computation Expression syntax for Views did not compile with WebSharper

Read more from

Can’t find what you were looking for? Drop us a line.

Simon Fowler
Found a typo?

This blog post is hosted on GitHub here. Feel free to file a ticket or send a PR.

Newsletter

We will not spam you or give your details to anyone.