This release includes several miscellaneous bug fixes and features.
This release also updates the Kotlin target to 2.1.10.
kotlin = "2.1.10"
Perhaps the feature most people will be interested in is official support for sibling static and dynamic routes.
There was also a bug fix for the backend for an NPE that should not have been thrown. This was caused by any codebase calling ClassLoader.findResource(...)
looking for an optional resource when it does not exist. Your own codebase might not do it, but a library you call might! For example, a user trying to use the SQL library jOOQ experienced this.
Important
Planning to upgrade? Review instructions in the README.
Changes
Frontend
- Support static routes and dynamic routes living side-by-side.
- v0.20.0 and before, this was supported unintentionally, and as such, was fragile (and depending on the order that routes got registered).
- In v0.20.1, I noticed this mistake and forced this setup to fail only to learn users were actually depending on it.
- So in this version, we now support it correctly, with many tests added to validate the feature is hardened.
- When navigating to a new page, the page will now snap instantly, instead of smooth scroll from whatever arbitrary position it happened to be on the previous page.
- Breakpoints can now be combined with pseudo selectors.
- e.g. in a
CssStyle
:((SM..MD) + hover) { ... }
.
- e.g. in a
- Fix bug with
tryRoutingTo
that could in a rare case open up infinite tabs in production mode. - Added a new utility method for rendering raw HTML, i.e.
RawHtml("<div>Example</div>")
- This method is marked unsafe and you must opt-in to use it.
Backend
- Fixed bug where calling
ClassLoader.findResource(...)
on a non-existant resource would crash.
Full Changelog: v0.20.2...v0.20.3