Skip to content

Releases: varabyte/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 !)

cli-v0.9.9

10 Apr 06:07
Compare
Choose a tag to compare
cli-v0.9.9 Pre-release
Pre-release

Contains only one change since v0.9.8, but it's kind of a big one :) This fixes issues of Kobweb hanging on Mac.

  • In 0.9.8, Kobweb switched from bundling a git library to using git installed on the user's machine. However, there was a bug in detecting if git was present on their machine which caused it to hang. This has been fixed by 1) detecting the errant case and 2) making the git detection logic way more forgiving.

v0.9.11

26 Mar 16:37
Compare
Choose a tag to compare
v0.9.11 Pre-release
Pre-release

A very small update, but pushed out since the Gradle export bug fix is important to people who change the route prefix.

Frontend

  • Added versions of ComponentModifier / ComponentVariant methods thenIf and thenUnless that evaluate lazily
    • Before: Modifier.thenIf(condition, ConditionalModifier)
    • After: Modifier.thenIf(condition) { ConditionalModifier }
    • This additional version can be useful if you want to do something expensive when creating the modifier (or variant) that's supplied

Gradle

  • Remove hardcoded reference to .kobweb/site in the Gradle plugin
    • This value should have been changed earlier to ready from the .kobweb/conf.yaml file after the route prefix feature was added
    • This should resolve issues some users would see when trying to re-export their site using a non-standard route prefix setting, e.g. targeting github pages

cli-v0.9.8

26 Mar 16:44
Compare
Choose a tag to compare
cli-v0.9.8 Pre-release
Pre-release

While not an urgent change, a handful of simple QOL changes.

Potentially breaking change for some users: kobweb no longer bundles its own git support but requires users have it installed on their system and in their path. This shrinks the binary by several megabytes, allows us to use shallow cloning for a much faster startup experience, and we can now offer to initialize a git project for the user when they run kobweb create

  • kobweb create now offers to auto-initialize git for your new project
  • kobweb create and kobweb list now use shallow clone, providing a much snappier response
  • kobweb run and kobweb export will now prevent a user from progressing if a server is already running
    • This is useful as otherwise the commands can interfere subtly with each other producing undefined behavior

v0.9.10

05 Mar 17:19
Compare
Choose a tag to compare
v0.9.10 Pre-release
Pre-release

An overall small update, but the Gradle bugfix around input / output files makes it worth releasing.

Frontend

  • Fixed a bug with transparency not working when using Silk colors
    • That is, Color.rgba(255, 0, 0, 128) would just become red, not half-transparent red.
  • (Experimental) Added support for adding extra modifiers to a component style directly, as a way to accommodate attribute modifiers which are not otherwise allowed in that scope.
    • Before:
         val ButtonStyle = ComponentStyle("my-button") { ... }
         ...
      
         // Set tab index so this element can receive keyboard focus
         Button(ButtonStyle.toModifier().tabIndex(0)
      
    • After:
       val ButtonStyle = ComponentStyle("my-button") { ... }
          + Modifier.tabIndex(0) // Set tab index so this element can receive keyboard focus
          
       ...
       Button(ButtonStyle.toModifier())
      

Gradle

  • Updated the "generate site" tasks so that files they output no longer makes those tasks think that they need to run again
  • Updated task listener logic so that the code is less fragile allowing the "Building..." indicator to show up more consistently

v0.9.9

28 Feb 23:07
Compare
Choose a tag to compare
v0.9.9 Pre-release
Pre-release

I'm now starting to use Kobweb more and more in personal projects. This update is a mish-mash of fixes I ran into needing while doing so.

Note: (Breaking change) Some breakpoint code (such as rememberBreakpoint) has been refactored under a subpackage, which may cause compile errors in some projects (although it's not expected that this feature is heavily used at this time)

Frontend

  • Fixed an issue with Boxes with more than one child not stacking as expected
  • Modifier extensions
    • Outline support
    • Transform support
    • placeContent support
  • Allow chaining ComponentVariants (meaning you can define a base style and apply multiple variants to it, not just a single one)
  • (Breaking change) Rename addBaseVariant to addVariantBase.
    • The original format was probably due to me being tired at the time. My hope is that most people aren't using this feature yet and many won't notice, but you can simply rename this if you're seeing errors here.
  • Add optional elementScope parameter to all Kobweb / Silk widgets.
    • This can allow a user to get access to the underlying element reference, which also allows using Compose for Web side effects
  • rememberPageContext crashes with a more descriptive error message now if used outside of a @Page context
  • Fixed the implementation of the various DisplayIf modifers (DisplayIfSm, DisplayIfMd, etc.), which was previously and unintentionally breaking elements that themselves needed to set the display style (like, uh, Rows, Columns, and Boxes.... whoooops....)
  • Add support for AppGlobals, a way to register global strings from your build.gradle file that can be seen from your Kobweb app
    • This is good for letting your build process set a version, for example.
  • Add helper thenIf and thenUnless helper extensions for Modifier and ComponentVariant classes, which makes it way easier to chain them conditionally
  • Remove the ugly and unecessary outline from showing up when setting keyboard focus on a Button widget

Gradle

  • Refactored code allowing the Kobweb Applicaiton Plugin to no longer prevent configuration caching from working

cli-v0.9.7

28 Feb 23:07
Compare
Choose a tag to compare
cli-v0.9.7 Pre-release
Pre-release

The major feature for this update is a better experience around displaying compile errors and warnings (vs. before where you had to scroll up past a huge callstack to see them). Local testing has shown this experience to be so good, it's worth upgrading for it.

  • Compile errors / warnings are now collected from Gradle output and shown in a scrollable list in a convenient location -- no more need to scroll up needing to dig through history to see what went wrong.
  • The "Output may seem to pause for a while..." message goes away once it's clear the download phase is complete.
  • Added an interactive mode for kobweb stop, which before would always switch to dumb mode
  • kobweb list now supports highlighting projects, useful for bringing attention to a few choices in an otherwise large list
    • Despite being implemented, I will be waiting a while before updating projects to use this, as this introduces a backwards incompatible change due to an unfortunate default serialization configuration.