Releases: fsbolero/Bolero
Version 0.21
-
#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 dedicatedrootComp<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)
- #263: Update FSharp.SystemTextJson to fix a binary incompatibility. (see Tarmil/FSharp.SystemTextJson#117)
Version 0.20.17 (patch)
- #256 by @JeremiahSanders: Templating: keep the casing of attribute names.
This fixes issues with case-sensitive SVG attributes.
Version 0.20.12 (patch)
- #255 Remove the
Key
type;attr.key
now returns a simpleAttr
.
Version 0.20
-
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
andNode
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 wherelet!
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 orBolero.Html.attr.class
. -
#250 Configure Bolero and Bolero.Html for trimming.
Version 0.18
-
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
Features
-
#56: Update to Elmish 3.0. Also update the
Cmd
module to match Elmish 3's API, adding submodulesCmd.OfAuthorized
andCmd.OfJS
. -
#163 Rework the HTML element reference API and add Blazor component reference:
ElementRefBinder
renamed toHtmlRef
(old name still available but obsolete)attr.bindRef
renamed toattr.ref
(old name still available but obsolete)attr.ref
taking a function removedref.Ref
renamed toref.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 sameattr.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
-
#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 BoleroNode
from a BlazorRenderFragment
. -
#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
toservices.AddRemoting()
in both the server-side and client-side startup functions.
Bolero 0.13
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 tolazyComp*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
- For parameters of type
-
#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 onIHtmlHelper
: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
- #119: Correctly apply model changes to inputs using
bind.*
- Upgrade to Blazor 3.2-preview2