Skip to content
Pre-release
Pre-release

@Tarmil Tarmil released this Mar 21, 2020

  • #119: Correctly apply model changes to inputs using bind.*
  • Upgrade to Blazor 3.2-preview2
Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Jan 19, 2020 · 18 commits to master since this release

This release upgrades the minimal required version of .NET Core to 3.1.

Features

  • #95 Add on.async.* and on.task.* event handlers that use callbacks returning Async<unit> and Task, respectively.

  • #86 Add attr.aria to create ARIA accessibility attributes.

  • #97 Add on.preventDefault and on.stopPropagation to prevent the default behavior of an event and to stop its propagation to parent elements, respectively.

  • #102 BREAKING CHANGE: The API for binders have been changed. The bind module now contains submodules bind.input and bind.change which in turn contain functions for the type of value being bound: string, int, int64, float, float32, decimal, dateTime and dateTimeOffset. Additionally, a module bind.withCulture contains the same submodules with functions taking an additional CultureInfo as argument to specify the culture to use to parse the value.

  • #103: Optimization: use Async.StartImmediateAsTask rather than Async.StartAsTask internally.

  • #105: New functions lazyComp, lazyCompWith, lazyComp2, lazyComp2With, lazyComp3 and lazyComp3With allow creating components whose view is only updated when the model is actually changed. For users familiar with Fable, they are close equivalents to its lazyView family of functions.

  • #106: ProgramComponent.Dispatch is now public, and can be used for scenarios where Program.withSubscription is insufficient.

Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Nov 5, 2019 · 40 commits to master since this release

Features

  • #82 Calls to attr.classes and attr.``class`` are now combined into a single class attribute.

    div [attr.classes ["a"; "b"]; attr.``class`` "c"; attr.classes ["d"]] []

    becomes:

    <div class="a b c d"></div>
  • #87 ecomp now takes an additional list of attributes as first argument.

  • #89 ProgramComponent now has the same method ShouldRender : 'model * 'model -> bool that ElmishComponent has. The full program is not re-rendered if this returns false after an update. Thanks @laenas!

  • A new type alias Program<'model, 'msg> represents the exact type of Elmish programs used by Bolero. It corresponds to Program<ProgramComponent<'model, 'msg>, 'model, 'msg, Node>.

Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Sep 24, 2019 · 59 commits to master since this release

.NET Core version requirement

  • Updated .NET Core dependency to version 3.0 RTM and Blazor to 3.0-preview9.

New features

  • #78, #79: Add PageModels. PageModels allow adding a model specific to a page. The new APIs are:

    namespace Bolero
    
    type PageModel<'T> = { Model : 'T }
    
    module Router =
    
        val inferWithModel
            : makeMessage: ('page -> 'msg)
           -> getEndPoint: ('model -> 'page)
           -> defaultPageModel: ('page -> unit)
           -> Router<'page, 'model, 'msg>
    
        val noModel : PageModel<'T>
    
        val definePageModel : PageModel<'T> -> 'T -> unit
Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Sep 5, 2019 · 76 commits to master since this release

.NET Core version requirement

  • Updated Blazor and .NET Core dependencies to version 3.0-preview8, with associated API changes.

Breaking changes

  • #73 Removed the server-side module Bolero.Remoting.Server.Remote with its functions withHttpContext, authorize and authorizeWith.

    Instead, a new type IRemoteContext is provided via dependency injection:

    type IRemoteContext =
        inherit IHttpContextAccessor // member HttpContext : HttpContext with get, set
        member Authorize : ('req -> Async<'resp>) -> ('req -> Async<'resp>)
        member AuthorizeWith : seq<IAuthorizeData> -> ('req -> Async<'resp>) -> ('req -> Async<'resp>)

    There are also new overloads on IServiceCollection.AddRemoting that take IRemoteContext -> 'Handler as argument, so that remote handlers that use authorization don't need to switch to using DI.

New features

  • #61 Add attr.key to uniquely identify elements in a list to help the renderer. See the corresponding @key attribute in the Blazor documentation.

  • #70 Correctly provide the HttpContext to remote functions when running in server mode.

  • #71 Add new exception RemoteException of HttpResponseMessage, which is thrown on the client side when the response code is neither 200 OK (which succeeds) nor 401 Unauthorized (which throws RemoteUnauthorizedException).

Assets 2
Aug 3, 2019
Merge branch 'preview7'
Jul 6, 2019
Fix #59: Update to .NET Core and Blazor 3.0 preview6
Pre-release
Pre-release

@Tarmil Tarmil released this Jun 1, 2019 · 111 commits to master since this release

  • Updated Blazor and .NET Core dependencies to version 3.0-preview5, with associated API changes
  • Remove the use of a ThreadLocal in Remote.withContext
Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Apr 9, 2019 · 143 commits to master since this release

Breaking changes

  • NuGet package reorganization:

    • The package Bolero.HotReload.Server is obsolete.
    • The new package Bolero.Server contains the assemblies Bolero.HotReload.Server.dll, moved from package Bolero.HotReload.Server, and Bolero.Server.dll, moved from package Bolero.
  • #22 Move the server-side and client-side AddRemoting extension methods to namespaces Bolero.Remoting.Server and Bolero.Remoting.Client, respectively.

Features

  • #24 Add remoting authentication.

    • Add F#-friendly extension methods on HttpContext for authentication:

      member AsyncSignIn : name: string
                         * ?persistsFor: TimeSpan * ?claims: seq<Claim>
                         * ?properties: AuthenticationProperties * ?authenticationType: string
                        -> Async<unit>
      
      member AsyncSignOut : ?properties: AuthenticationProperties -> Async<unit>
      
      member TryUsername : unit -> option<string>
      
      member TryIdentity : unit -> option<Identity>
    • Add module Bolero.Remoting.Server.Remote with remote function wrappers to get access to the HttpContext and mark a function as requiring authorization:

      module Remote =
          val withContext : (HttpContext -> 'req -> Async<'resp>)
                         -> ('req -> Async<'resp>)
      
          val authorize : (HttpContext -> 'req -> Async<'resp>)
                       -> ('req -> Async<'resp>)
      
          val authorizeWith : seq<IAuthorizeData>
                           -> (HttpContext -> 'req -> Async<'resp>)
                           -> ('req -> Async<'resp>)
  • #28 Templating: Holes that fill an HTML attribute's value (eg: some-attr="${SomeHole}") now have type obj rather than string.

Bug fixes

  • #29 Templating: fix exception when using the bound value of a number input as a text hole.
Assets 2
Pre-release
Pre-release

@Tarmil Tarmil released this Feb 13, 2019 · 158 commits to master since this release

Features

  • #26 Template hot reloading.
    HTML templates can now be reloaded live while the application is running. See the documentation.
Assets 2
You can’t perform that action at this time.