Skip to content

Releases: varabyte/kobweb

v0.10.5

12 Nov 04:25
Compare
Choose a tag to compare
v0.10.5 Pre-release
Pre-release

Just a minor release, with some simple bugs I fixed while most of my attention is on a much larger Gradle plugin refactoring that will be landing soon (TM).

Frontend

  • Added Modifier.borderStyle modifier.
  • Modifier.content will now auto-surround your string with quotes if they are missing.
    • So if you forget to write Modifier.content("\" • \"") Kobweb has your back my friend.
  • The Kobweb Color class now inherits from the CSSColorValue interface.
    • This means it now plays nice with all existing CfW color APIs, no toCssColor necessary.
    • Removed all modifiers that took Color as an argument; instead, users should use the CSSColorValue ones.
  • Added Silk-aware main.kt code generation for apps using Silk that don't use the @App annotation.

v0.10.4

07 Nov 23:17
Compare
Choose a tag to compare
v0.10.4 Pre-release
Pre-release

No code changes, but Kobweb is now built against Compose 1.2.1 / Kotlin 1.7.20.

v0.10.3

07 Nov 19:28
Compare
Choose a tag to compare
v0.10.3 Pre-release
Pre-release

Misc. fixes, which I'm snapshotting into a release so that I can follow up shortly with another release that depends on Compose v1.2.1, which was just released recently.

Frontend

  • Refactor alignment modifiers
    • Introduce Kobweb's version of AlignItems, JustifyItems, etc. classes, since the Compose for Web versions don't handle baseline and overflow settings.
    • Add missing modifier for placeItems
  • Rename kobweb.core.navigation.Link to kobweb.core.navigation.Anchor, to avoid confusion caused with Silk's own kobweb.silk.navigation.Link widget.
    • Technically, an Anchor is a more robust A tag, while a Link is a specific anchor that renders the underlined link text we all know and love when using the web.
    • In most cases, users will want to use Link and not Anchor.
  • (Possible backwards incompatibility) Refactor the elementScope parameter in all Silk widgets, changing them into a version that takes a ref listener (with a callback that receives an ElementRefScope)
    • This makes it safer to get access to the underlying raw element for a widget without exposing an unnecessary composable block.
    • Before, to get a raw element that backs a widget:
      Widget(elementScope = { 
         DisposableSideEffect {
            // use scopeElement here
            onDispose {}
         })
      
      After:
      Widget(ref = ref { element -> ... })
      // or, if you need dispose handling:
      // Widget(ref = disposableRef { element -> ...; onDispose { ... }})
      

v0.10.2

30 Oct 05:11
Compare
Choose a tag to compare
v0.10.2 Pre-release
Pre-release

I'm planning to experiment with migrating the Kobweb Gradle plugin over to KSP shortly, so right before getting lost in that seems like a good time to slice off a release.

Frontend

  • Fixed a bug with the various transition modifiers not working when specifying multiple parameters
    • For example, Modifier.transitionProperty("color", "font-size").transitionDuration(100.ms, 300.ms) would silently break before.
  • Add a slew of transform modifiers
    • For example, Modifier.rotate, Modifier.scale, etc., with various input parameter configurations.
  • Add boxSizing and boxDecorationBreak box modifiers.
    • Potential backwards incompatible change The old Modifier.boxSizing(String) API has been removed.
      • Instead, use the one that takes in multiple arguments instead.
      • You can also use styleModifier { boxSizing(String) } in a pinch.

Markdown

  • There are no longer any unsupported markdown features. Everything should work now. Specifically...
    • <html> blocks now generate the correct Compose code for creating simple elements.
    • > can now be used to create block quotes (although sites must still define their own blockquote style using css rules; the default is very bland).
    • Link referencing (read more about what this is here) now works.

v0.10.1

22 Oct 00:11
Compare
Choose a tag to compare
v0.10.1 Pre-release
Pre-release

This release is essentially the same as v0.10.0, except that, when you run an export, it now produces final output that has dead code elimination applied to it. You may expect to see anywhere from a 50-75% reduction in your final site's javascript file.


Note that if you have an existing project, you must do the following steps to take advantage of this:

  1. Open your .kobweb/conf.yaml file
  2. Under the prod: section, add a script: field set to "build/distributions/(yourproject.js)"

For example, if your project was called example, then your final conf file might look like:

# example/.kobweb/conf.yaml

site:
  title: "Example Project"

server:
  files:
    dev:
      contentRoot: "build/processedResources/js/main/public"
      script: "build/js/packages/helloworld/kotlin/example.js"
    prod:
      script: "build/distributions/example.js" # <--- This line is new!
      siteRoot: ".kobweb/site"

  port: 8080

If you create a new project, e.g. kobweb create site, then this will already be done for you.

v0.10.0

15 Oct 19:54
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release

🎉 Update Kobweb to compile against Compose for Web 1.2.0 🎉

Feature-wise, this release is identical to 0.9.15. However, it now depends on the latest stable Compose version. This also means you must use Kotlin 1.7.10 to build projects using this version of Kobweb.

v0.9.15

15 Oct 18:44
Compare
Choose a tag to compare
v0.9.15 Pre-release
Pre-release

Frontend

  • Fixed ComponentVariant always causing methods to recompose when passed in as an argument to one
  • Added a handful of missing Modifier.background methods, e.g. Modifier.backgroundImage

Markdown

  • Fix issues with nested Markdown files not exporting correctly on Windows
  • Fix issue with dollar signs in Markdown generating Kotlin code that didn't compile

v0.9.14

29 Sep 00:02
Compare
Choose a tag to compare
v0.9.14 Pre-release
Pre-release

Frontend

  • Fixed unnecessary recompositions by adding equals and hashcode logic to Kobweb Modifier implementations
  • Added an additional, more idiomatic Kotlin API for Modifier.boxShadow

Silk

  • Re-added Text and TextStyle back in but with @Deprecation annotations, after previously deleting them in 0.9.13. This means if projects upgrade from v0.9.12 (or earlier) to v0.9.14 (or later), they'll get helpful warnings instead of hard errors.
    • All Kobweb Text references should be renamed to SpanText. This was done in v0.9.13 because Text kept running against the very common Text function in the Compose Web API.

Markdown

  • Fixed a bug with the Markdown plugin on Windows (caused by platform dependent slash logic), where before it didn't generate export paths correctly for nested markdown files.
    • e.g. src\jsMain\resources\markdown\a\b\c\test.md will now export to a\b\c\test.html, not test.html
    • Linux and Mac were fine.

v0.9.13

05 Sep 22:39
Compare
Choose a tag to compare
v0.9.13 Pre-release
Pre-release

Frontend

  • Backwards Incompatible Migrated Kobweb's Text to SpanText
    • Previously, Kobweb's Text tried to be smart and only wrapped its text in a span if a Modifier was passed in, but this was really subtle, and probably surprising, behavior. By renaming it, we now avoid a common import overlap between Kotlin's Text and Kobweb's version. Additionally, the name makes it clearer that this is text wrapped in a <span> block, and that that implementation will be consistent.
    • If you get a compile error around Text in your Kobweb project, you should be able to rename it to SpanText.
  • Updated Font Awesome support from v5 to v6
    • Potentially backwards incompatible Some font awesome icon names have changed as part of the migration. Please use their icon search to figure out the new names.
  • Added support for clamp, min, and max CSS functions whose output can be passed into relevant Modifier methods.
  • The site's title is now automatically added to your app globals
    • So you can access it using AppGlobals["title"] in your code, instead of hard-coding it, in case things change down the line.
  • Fixed Modifier.role(...), which is now correctly implemented as an HTML attribute and not a style.
  • Fixed various copy/paste issues with CSS class instances (see commit cec1f7b for the changes)

v0.9.12

18 Jun 23:48
Compare
Choose a tag to compare
v0.9.12 Pre-release
Pre-release

This patch isn't large, but it brings in a few fixes as I return back to Kobweb after a break, having been sidelined by a different project for a while.

There aren't any groundbreaking features introduced in this patch, but it does bring versions of Gradle, Compose, and Kotter dependencies up to date, as well as fixing a few issues reported by users.

Frontend

  • Add default values to padding and margin for the versions that take topBottom and leftRight parameters.
  • Fixed buggy implementation of Modifier.thenIf extension methods
  • Fixed copy/paste error in API around JustifySelf/JustifyItem methods.
  • Update Gradle, Compose, and Kotter dependencies to latest versions.
    • Compatibility FYI This version of Kobweb now targets Compose 1.1.1, which, for web, has deprecated / renamed a fair bit of code. There's a chance you won't even notice. For example, all Kobweb template projects migrated without issue. However, moving your own project to Compose 1.1.1 may not be as trivial.
    • See also: COMPATIBILITY.md

Gradle

  • Support custom names in source sets (thanks @DVDAndroid !)