Releases: varabyte/kobweb
v0.9.15
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
Frontend
- Fixed unnecessary recompositions by adding
equals
andhashcode
logic to KobwebModifier
implementations - Added an additional, more idiomatic Kotlin API for
Modifier.boxShadow
Silk
- Re-added
Text
andTextStyle
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 toSpanText
. This was done in v0.9.13 becauseText
kept running against the very commonText
function in the Compose Web API.
- All Kobweb
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 toa\b\c\test.html
, nottest.html
- Linux and Mac were fine.
- e.g.
v0.9.13
Frontend
- Backwards Incompatible Migrated Kobweb's
Text
toSpanText
- Previously, Kobweb's
Text
tried to be smart and only wrapped its text in a span if aModifier
was passed in, but this was really subtle, and probably surprising, behavior. By renaming it, we now avoid a common import overlap between Kotlin'sText
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 toSpanText
.
- Previously, Kobweb's
- 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.- Thanks to @Ayfri and @conradboehnke for their support on this feature!
- 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.
- So you can access it using
- 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
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
andmargin
for the versions that taketopBottom
andleftRight
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
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
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
methodsthenIf
andthenUnless
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
- Before:
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
- This value should have been changed earlier to ready from the
cli-v0.9.8
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 projectkobweb create
andkobweb list
now use shallow clone, providing a much snappier responsekobweb run
andkobweb 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
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.
- That is,
- (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())
- Before:
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
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
Box
es 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
toaddVariantBase
.- 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 thedisplay
style (like, uh,Rows
,Columns
, andBoxes
.... 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
andthenUnless
helper extensions forModifier
andComponentVariant
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
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.