Skip to content

Releases: fsbolero/Bolero

Version 0.21

12 Feb 13:08
Compare
Choose a tag to compare
  • #261 Fix prerendering of components inside server-side Bolero.Html.

  • To instantiate a client-side component inside server-side Bolero.Html, the standard comp<T> can now be used instead of the dedicated rootComp<T>.

  • #275 Add new module Bolero.Server.Components.Rendering with functions:

    • renderPlain : Node -> string renders a node to raw HTML. Blazor components are ignored.

    • renderPage : Node -> HttpContext -> IHtmlHelper -> IBoleroHostConfig -> string also renders a node to raw HTML. Blazor components are rendered according to the given host config.

  • #279 Bolero.Build: Disable the production of a reference assembly.

  • #285 Fix typed component builders so that nested components aren't forced to have the same type.

Version 0.20.18 (patch)

02 Jul 10:07
Compare
Choose a tag to compare

Version 0.20.17 (patch)

15 May 13:11
Compare
Choose a tag to compare
  • #256 by @JeremiahSanders: Templating: keep the casing of attribute names.
    This fixes issues with case-sensitive SVG attributes.

Version 0.20.12 (patch)

20 Apr 16:02
Compare
Choose a tag to compare
  • #255 Remove the Key type; attr.key now returns a simple Attr.

Version 0.20

18 Apr 19:56
Compare
Choose a tag to compare
  • Upgrade dependency to .NET 6.

  • #249 Replace the list-based functions for HTML and components with computation expressions:

    div {
        "Welcome to "
        navLink NavLinkMatch.All {
            attr.href "https://fsbolero.io"
            on.click (fun _ -> printfn "Clicked!")
            b { "Bolero" }
        }
        "!"
    }
    • Union types Attr and Node replaced with delegate types, alongside modules for raw constructors.

    • Bolero.Html element functions, Bolero.Html.concat, Bolero.Html.attrs replaced with computation expression builders.

    • Bolero.Html.comp, ecomp, lazyComp*, navLink functions no longer take attribute and child lists and return a computation expression builder instead.

    • Bolero.Html.virtualize.comp replaced with a computation expression builder where let! retrieves the current item:

      virtualize.comp {
          virtualize.placeholder (fun _ -> text "<placeholder>")
          let! item = virtualize.items [1..100]
          text $"Actual item {item}"
      }
    • Bolero.Html.empty value replaced with a function: empty().

    • Bolero.Html.attr.empty value replaced with a function: attr.empty().

  • Bolero.Html.attr.classes is obsolete. BREAKING CHANGE: classes are no longer combined across multiple calls to it or Bolero.Html.attr.class.

  • #250 Configure Bolero and Bolero.Html for trimming.

Version 0.18

28 Dec 18:11
Compare
Choose a tag to compare
  • Loosen Microsoft.* dependencies from ~> 5.0 to >= 5.0 to allow using 6.0+.

  • Update FSharp.Core to 6.0.

  • Remove references to Ply, use F# 6's own task instead.

  • Run tests on .NET 6.

  • Move CI from AppVeyor to GitHub actions.

Bolero 0.15

14 Sep 20:46
Compare
Choose a tag to compare

Features

  • #56: Update to Elmish 3.0. Also update the Cmd module to match Elmish 3's API, adding submodules Cmd.OfAuthorized and Cmd.OfJS.

  • #163 Rework the HTML element reference API and add Blazor component reference:

    • ElementRefBinder renamed to HtmlRef (old name still available but obsolete)
    • attr.bindRef renamed to attr.ref (old name still available but obsolete)
    • attr.ref taking a function removed
    • ref.Ref renamed to ref.Value
    let theDiv = HtmlRef()    // Used to be: let theDiv = ElementRefBinder()
    
    div [
        attr.ref theDiv    // Used to be: attr.bindRef theDiv
        on.click (fun _ -> doSomethingWith theDiv.Value)    // Used to be: doSomethingWith theDiv.Ref
    ] []
    • Added Ref<'Component> which provides the same capability for Blazor components, using the same attr.ref:
    let theComp = Ref<MyComponent>()
    
    comp<MyComponent> [
        attr.ref theComp
        on.click (fun _ -> doSomethingWith theComp.Value)
    ] []
  • #168: Move the module Bolero.Html to a separate assembly and make all of its functions inline, in order to reduce the downloaded binary size.

Fixes

  • #144: When a router is enabled and the user clicks a link that points to a URI not handled by the router, do navigate to this URI.

  • #166: Ensure that Elmish subscriptions and init commands are not run during server-side prerender.

  • #174: Change ShouldRender to invoke override instead of base implementation (thanks @dougquidd!)

  • #175: Do not render Ref until after Child Content (thanks @dougquidd!)

Bolero 0.14

08 Jul 18:49
Compare
Choose a tag to compare
  • #135 Inferred router performs URL encoding/decoding on string-typed parameters.

  • #151 Accept either a relative or absolute path in custom router's getRoute.

  • #155 Add function fragment to create a Bolero Node from a Blazor RenderFragment.

  • #159 Breaking change: Remove the module Bolero.Json, and use System.Text.Json together with FSharp.SystemTextJson instead for remoting.

    Remoting serialization can be customized by passing an additional argument configureSerialization: JsonSerializerOptions -> unit to services.AddRemoting() in both the server-side and client-side startup functions.

Bolero 0.13

23 May 00:15
Compare
Choose a tag to compare

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

  • Update dependencies to Blazor 3.2.0.

  • Add Elmish commands for JavaScript interop:

    Cmd.ofJS : IJSRuntime -> string -> obj[] -> ('res -> 'msg) -> (exn -> 'msg) -> Cmd<'msg>
    Cmd.performJS : IJSRuntime -> string -> obj[] -> ('res -> 'msg) -> Cmd<'msg>
  • #127 Add lazyComp*By family functions based on a key function (as opposed to lazyComp*With's equality function):

    lazyCompBy
         : ('model -> 'key)
        -> ('model -> Node)
        -> 'model -> Node
        when 'key : equality
    lazyComp2By
         : ('model -> 'key)
        -> ('model -> Dispatch<'msg> -> Node)
        -> 'model -> Dispatch<'msg> -> Node
        when 'key : equality
    lazyComp3By
         : ('model1 * 'model2 -> 'key)
        -> ('model1 -> 'model2 -> Dispatch<'msg> -> Node)
        -> 'model1 -> 'model2 -> Dispatch<'msg> -> Node
        when 'key : equality
  • #142 Add functions to create Blazor component attributes of certain types for which => is not sufficient:

    • For parameters of type EventCallback<'T>:
      attr.callback : string -> ('T -> unit) -> Attr
      attr.async.callback : string -> ('T -> Async<unit>) -> Attr
      attr.task.callback : string -> ('T -> Task) -> Attr
    • For parameters of type RenderFragment:
      attr.fragment : string -> Node -> Attr
    • For parameters of type RenderFragment<'T>:
      attr.fragmentWith : string -> ('T -> Node) -> Attr
  • #141 Add injectable Bolero.Server.RazorHost.IBoleroHostConfig to provide configuration for the server-side Razor host. This is used within the Razor page by calling the extension methods on IHtmlHelper:

    member RenderComponentAsync<'T when 'T :> IComponent> : IBoleroHostConfig -> Task<IHtmlContent>
    member RenderBoleroScript : IBoleroHostConfig -> IHtmlContent

    and injected using the extension method on IServiceCollection:

    member AddBoleroHost : ?server: bool * ?prerendered: bool * ?devToggle: bool -> IServiceCollection

Bolero 0.12

21 Mar 17:03
Compare
Choose a tag to compare
Bolero 0.12 Pre-release
Pre-release
  • #119: Correctly apply model changes to inputs using bind.*
  • Upgrade to Blazor 3.2-preview2