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
- Introduce Kobweb's version of
- Rename
kobweb.core.navigation.Linktokobweb.core.navigation.Anchor, to avoid confusion caused with Silk's ownkobweb.silk.navigation.Linkwidget.- Technically, an
Anchoris a more robustAtag, while aLinkis 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
Linkand notAnchor.
- Technically, an
- (Possible backwards incompatibility) Refactor the
elementScopeparameter in all Silk widgets, changing them into a version that takes areflistener (with a callback that receives anElementRefScope)- 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:
After:Widget(elementScope = { DisposableSideEffect { // use scopeElement here onDispose {} })Widget(ref = ref { element -> ... }) // or, if you need dispose handling: // Widget(ref = disposableRef { element -> ...; onDispose { ... }})