v0.20.1 #640
bitspittle
announced in
Announcements
v0.20.1
#640
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a fairly meaty release with a handful of miscellaneous features addressing different requests made by various users, so it is hard to summarize easily! Please find details in the changes below.
Also, starting with this version, Kobweb will start releasing its artifacts on Maven Central and the Gradle Plugin Portal. More information about this in the Notes section below, but in general, this should open up Kobweb development to people working at companies that might restrict access to random maven repository URLs, which is nice.
Finally, this version of Kobweb updates Compose to 1.7.3 and Ktor to 3.0.3.
Important
Planning to upgrade? Review instructions in the README.
Changes
Frontend
@Page("/a/b/c/...slug")
would capture the value"d/e/f"
in the URL"/a/b/c/d/e/f"
transition-behavior
color-scheme
redirect
parameter into all the Kobweb HTTP APIs (e.g.window.http.get(redirect = MANUAL)
)Silk
CanvasGl2
which lets you create aCanvas
that wraps a WebGL2 contextColorMode.systemPreference
@InitSilk
block:ctx.theme.initialColorMode = ColorMode.systemPreference
ColorMode.saveToLocalStorage
/ColorMode.loadFromLocalStorage
convenience methods, which Kobweb sites commonly do to store a user's color mode preferences across multiple browser sessions.kobweb create app
for an example project that uses these methods.ColorScheme
class toColorPalette
due to naming conflict with the CSScolor-scheme
property, which could be confusing.Backend
enableFileLogging
andenableConsoleLogging
properties in the Kobweb server configsMarkdown
Gradle
importCss
method.unsafe { raw("@import url(\"somestyle.css\" layer(somestyle)") }
importCss("somestyle.css", layerName = "sometime")
Notes
Maven central and the Gradle Portal Plugin
Starting in 0.20.1, Kobweb artifacts are now published to maven central and the Gradle Plugin Portal.
This means, essentially, that you can delete all maven repos from your build scripts that point to
"https://us-central1-maven.pkg.dev/varabyte-repos/public"
if you'd like.Snapshots
Occasionally, when people report issues with Kobweb, we may ask them to try using a snapshot version, which will have our latest code. Snapshots, which so far have only lived on the varabyte repository, are now published to an official snapshot maven repository as well (
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
). If you remove the varabyte repo declarations as recommended earlier, you may wish to add the snapshot repository in their place:Compose Compiler warning
After upgrading to 0.20.1, you may get this warning:
This warning may look complex, but in general, it just means you should make sure to always apply the compose compiler plugin at the same time you apply the Kobweb plugin. Most projects probably do this already, but yours may not if you declare your kobweb dependency in the root build script but only declare the compose compiler dependency in the site build script.
Here's an example fix (taken from the
kobweb create examples/chat
template, which gave us this warning when we upgraded it to 0.20.1):// root build.gradle.kts plugins { alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.kobweb.application) apply false alias(libs.plugins.kobweb.library) apply false alias(libs.plugins.kobwebx.markdown) apply false }
ColorScheme to ColorPalette migration
You may get some compile warnings when upgrading to 0.20.1. Fixing them is trivial!
Here's an example of how to migrate such code:
Thanks!
We had lots of new interest in Kobweb over the Christmas break. We appreciate folks choosing to spend some of their vacation time to experiment with our software! If you ever create a live website using Kobweb, be sure to inform us via one of the channels mentioned in the README's Connecting With Us section, and we'd love to boost its signal.
Full Changelog: v0.20.0...v0.20.1
This discussion was created from the release v0.20.1.
Beta Was this translation helpful? Give feedback.
All reactions