v0.18.3 #587
bitspittle
announced in
Announcements
v0.18.3
#587
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This release is a collection of miscellaneous features and bug fixes. Enjoy!
Important
Planning to upgrade? Review instructions in the README.
Changes
Frontend
border-image
CSS property.margin
andpadding
-related CSS logical properties (like more overrides forscrollPadding
,marginInline
, etc.)Modifier.background(color)
without any other parameters would ignore the color value.PageContext
ctx.router.routes.forEach { r -> console.log(r.path) }
Example_Route.kt
used to generateexample_route
and now will generateexample-route
.Markdown
Backend
@Api("articles/{article}")
article
in the above case usingctx.params["article"]
Gradle
Notes
Legacy Route support removed
If you don't care that much about a bit of Kobweb history, then don't read the rest of this section. Just go into your
build.gradle.kts
and remove the line:Caution
If you have this set to
WARN
orALLOW
, please read here.However, if you'd like to learn more about this, read on!
Legacy route history
In the beginning, I wrote some logic to convert a Kotlin
@Page
filename (Example.kt
) into a URL route (/example
). My initial algorithm simply lowercased everything, and while I did not realize it at the time, this made the default behavior generate names that did not conform to Google's SEO recommendations, which is to use hyphens to separate words.In 0.16.0, we updated this! So
ExampleRoute.kt
would now generate/example-route
and not/exampleroute
.This long overdue change which, unfortunately, could break old sites if released directly.
Therefore, we did a bunch of work to intercept routes and handle legacy formats and new formats at the same time. In other words, a site with legacy route support would work if you visited either
/examperoute
OR/example-route
.However, it was always the plan to remove it sooner than later. It was a lot of ugly code we had to maintain, and the issue wasn't likely to affect that many users. Therefore, we gave users 6 months to migrate any offending cases over.
And that brings us to today! Legacy routes are finally out.
In order to not break compilation, we are leaving the
legacyRouteRedirectStrategy
property in Gradle for now, but it doesn't do anything anymore (except print out a warning if you've set it). You have 6 months to delete this one-liner from your project...Thanks!
We had a first time contribution from @FromWau who noticed some misformatted documentation and fixed it. These kinds of cleanups are truly appreciated! Thanks for helping keep Kobweb tidy.
And a serious shoutout to @DennisTsar who did all the hard work to fix my crappy Gradle code in order to make it configuration cache friendly.
Full Changelog: v0.18.2...v0.18.3
This discussion was created from the release v0.18.3.
Beta Was this translation helpful? Give feedback.
All reactions