github varabyte/kobweb v0.10.3

latest releases: v0.24.0, v0.23.3, v0.23.2...
pre-release3 years ago

Misc. fixes, which I'm snapshotting into a release so that I can follow up shortly with another release that depends on Compose v1.2.1, which was just released recently.

Frontend

  • Refactor alignment modifiers
    • Introduce Kobweb's version of AlignItems, JustifyItems, etc. classes, since the Compose for Web versions don't handle baseline and overflow settings.
    • Add missing modifier for placeItems
  • Rename kobweb.core.navigation.Link to kobweb.core.navigation.Anchor, to avoid confusion caused with Silk's own kobweb.silk.navigation.Link widget.
    • Technically, an Anchor is a more robust A tag, while a Link is a specific anchor that renders the underlined link text we all know and love when using the web.
    • In most cases, users will want to use Link and not Anchor.
  • (Possible backwards incompatibility) Refactor the elementScope parameter in all Silk widgets, changing them into a version that takes a ref listener (with a callback that receives an ElementRefScope)
    • This makes it safer to get access to the underlying raw element for a widget without exposing an unnecessary composable block.
    • Before, to get a raw element that backs a widget:
      Widget(elementScope = { 
         DisposableSideEffect {
            // use scopeElement here
            onDispose {}
         })
      
      After:
      Widget(ref = ref { element -> ... })
      // or, if you need dispose handling:
      // Widget(ref = disposableRef { element -> ...; onDispose { ... }})
      

Don't miss a new kobweb release

NewReleases is sending notifications on new releases.