github varabyte/kobweb v0.13.3

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

A lighter release that nonetheless brings in some nice fixes and sets the groundwork for a lot of additional support for future widgets.

This release also introduces an initial version of the "Table of Contents" widget (Toc), which can make a useful header widget. You can see it being used in my blog site source (and here it is in action). If this sounds like it can be useful to you, check it out and please give me some feedback!

Frontend

  • Added behavior (defaults to true) that strips ".htm/.html" suffixes from links
    • To disable, do the following in your build script kobweb { app { cleanUrls.set(false) } }
  • Set the root element's style to width and height = 100%.
    • Before, users might have set a size on their html and/or body elements, but before this change, the root element would effectively block those values.

Silk

  • Added a new Toc (Table of Contents) widget.
    • This widget, when added to the DOM, will search the page for all header elements that have IDs and create a linkable table of contents section from them.
  • Added Modifier.minSize and Modifier.maxSize methods to complement Modifier.size.
  • Added Kotlin-idiomatic Modifier support for the CSS list-style property.
  • The Surface widget now exposes a contentAlignment parameter. (A surface is basically now a Box with Silk theming.)
  • Changed how tooltips are positioned on screen that should result in much more consistent experiences when the user scrolls the screen.
  • Fixed the names of the borderWidth modifier parameters (before, the parameters didn't match the CSS names).

Backend

  • Added support for adding native library dependencies in code that gets run on a Kobweb server.
    • Before, such a dependency would result in a server crash like: java.lang.UnsatisfiedLinkError: Native Library blah.dll already loaded in another classloader. when it tried to live reload.

⚠️ ⚠️ ⚠️

StyleVariable

NOTE: If you use StyleVariables in your code, you will start getting a deprecation warning in 0.13.3.

The fix is trivial, please update your import:

Old: com.varabyte.kobweb.compose.ui.modifiers.StyleVariable
New: com.varabyte.kobweb.compose.css.StyleVariable

ComponentVariant parameter for tooltips / popovers

(Potentially backwards incompatible) Changed the location of the variant parameter in tooltips / popovers.

This was the result of locking down some consistency decisions for Silk widgets. See also the new CONTRIBUTING doc for more information about Silk widget API design.

Don't miss a new kobweb release

NewReleases is sending notifications on new releases.