github varabyte/kobweb v0.13.4

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

This version includes many quality-of-life improvements making it easier to work with Compose HTML as well as a new Tabs component.

Frontend

  • Add Kotlin implementations for ResizeObserver and IntersectionObserver classes.
    • ResizeObserver is useful for when you want to detect size changes to an element. Traditionally, it was very hard to do this and required registering events at the page level.
    • IntersectionObserver is useful for detecting when an element is rendered on screen. This can be useful for some scrolling tricks, like animating something when it first enters the user's view.
  • Added more useful version of window.fetch because the one that comes with the Kotlin/JS standard library is hard to use.
    • Also, added a new window.http helper class to help with the common http verbs, e.g. window.fetch(HttpMethod.GET, ...) vs. window.http.get(...)
  • Added useful Document.saveToDisk and Document.loadFromDisk utility methods, which help you save / load binary data.
    • There are additional load methods for text and data URL variations. The former because it's common and the latter because it's very useful for image loading.
  • Fixed an issue with PageContext losing route params / fragment information when you returned back to a previous page.
  • Cleaned up the CSSPosition API and fixed some cases where it was busted.

Silk

  • New Tabs component!
    tab-demo
  • Added a new strategy for opening a popup based on a timer:
    val timedStrat = remember { OpenClosePopupStrategy.timed(1000) } // Shows popup for 1 second
    Button(onClick = { tooltipStrat.showAndStartTimer(); copyDocumentToClipboard() }) { 
       Text("Copy") 
    }
    AdvancedTooltip(ElementTarget.PreviousSibling, "Copied!", openCloseStrategy = tooltipStrat)
  • Fixed a bug with tooltips not showing up if one was requested by an element when the mouse was already over it (like the "Copied!" example in the previous bullet point)
  • Fixed a bug with tooltips not getting repositioned if their size changed after being shown.

Don't miss a new kobweb release

NewReleases is sending notifications on new releases.