Skip to content

Releases: huanshankeji/compose-multiplatform-html-unified

v0.6.0

Choose a tag to compare

@ShreckYe ShreckYe released this 31 Mar 15:02

What's Changed

Added

Common

  • Add ExperimentalApi and LikelyInconsistentApi opt-in annotations.
  • Add VerticalScrollColumn, HorizontalScrollRow, VerticalScrollBox, and HorizontalScrollBox scrolling layout composables in the layout.ext package as replacements for the scroll modifiers (#95).
  • Initially add common text styling types (SpanStyle, FontStyle, FontWeight, TextDecoration, TextAlign, TextOverflow, TextUnit) and styled text composable overloads with AnnotatedString support (buildAnnotatedString, withStyle) (#124).
  • Use ResizeObserver to react to size changes on JS DOM in BoxWithConstraints (#51).

Material 3

  • Add unified wrapper components for remaining Material 3 components based on Compose HTML Material PR #21 and PR #32 (which depends on maicol07/material-web-additions) (#70, #72):
    • badge: Badge (deprecated) in ext
    • chip: AssistChip, FilterChip, InputChip, SuggestionChip (and elevated variants) in ext
    • dialog: AlertDialog and SimpleDialog
    • divider: HorizontalDivider
    • navigation drawer: ModalNavigationDrawer (deprecated, may be replaced with navigation rails in the future)
    • radio button: RadioButton, and RadioButtonRow and radioGroup in ext, like the existing ones for Material 2
    • segmented button: SingleChoiceSegmentedButtonRow, MultiChoiceSegmentedButtonRow, and scoped SegmentedButton in ext
    • select: FilledSelect, OutlinedSelect, and SelectOption in ext
    • slider: Slider and RangeSlider
    • tab: PrimaryTabRow, SecondaryTabRow, and PrimaryTab, SecondaryTab in ext
  • Add the snackbar composables SnackbarHost, SnackbarHostState, and related types (SnackbarVisuals, SnackbarData, SnackbarResult, SnackbarDuration), similar to those for Material 2 (#91, #98).
  • Add the top app bar composables TopAppBar, CenterAlignedTopAppBar, MediumTopAppBar, LargeTopAppBar in ext (#91, #94).
  • Add the Scaffold composable with FabPosition enum (#103, #105).

Material Icons

  • Support all common material icons with core and extended icon modules (#123).

Navigation

  • Save the ViewModel states on JS DOM, especially during navigation (#55).

ViewModel

  • Copy and adapt more ViewModel code from Compose Multiplatform, supporting LocalViewModelStoreOwner on JS DOM (#55).

Changed

  • Bump dependencies to the latest.
    • Kotlin 2.3.20
    • Compose Multiplatform 1.10.3
    • Kobweb 0.24.0
    • Compose HTML Material 0.5.0
    • AGP 8.12.3
    • Gradle 9.4.1
    • JVM toolchain 17
    • Android SDK 36
  • No longer publish the Material 2 module for release due to its decreasing popularity and the underlying KMDC library's incompatible Kotlin and Compose versions (kept for reference purposes).
  • Remove the Maven repository for Kobweb since it's published to Maven Central now.
  • Remove the iosX64 targets.
  • Support ES2015 compilation target for JS DOM by replacing require() with ES module imports.
  • Use Arrangement.spacedBy from Kobweb (commit 53ff09f).
  • Add reference links to component files and move existing ones to commonMain (#117).

Deprecated

  • Deprecate the Modifier.verticalScroll and Modifier.horizontalScroll modifiers for external use. Use VerticalScrollBox/VerticalScrollColumn and HorizontalScrollBox/HorizontalScrollRow instead (#95).
  • Deprecate ModalNavigationDrawer upon review (may be replaced with navigation rails in the future).

Fixed

  • Fix BoxWithConstraints to react to size changes on JS DOM using ResizeObserver and fix its display issues (#51).
  • Fix Column component hiding content on JS DOM by moving max constraints from imitateComposeUiLayout to scroll modifiers (#95).
  • Fix typos in deprecation messages, comments, and CHANGELOG dates (#122).

Internal

Added

Documentation and Tooling
  • Add API documentation generated by Dokka hosted on GitHub Pages (#43).
  • Split GitHub Pages site into landing page, API docs, and side-by-side demo (#116).
  • Add .github/copilot-instructions.md for repository onboarding (#62, #65).
  • Add AGENTS.md and copilot-setup-steps.yml.
  • Add manual api-dump workflow on macOS (#128).

Changed

  • Enable Gradle Configuration Cache (commit f0017ee).
  • Bump Dokka to 2.1.0 (#43).
  • Enable kotlin.native.enableKlibsCrossCompilation (commit 624955d).
  • Refactor CI to use extracted actions (#57).
  • Port Maven publishing migration (#113).
  • Code clean-up: nullable composable patterns, null equality, trailing commas (#93).
  • Onboard with GitHub Copilot (#62, #65).

Fixed

  • Fix the issue that withAndroidTarget was put in the wrong group in applyDefaultHierarchyTemplate (f13a85a).

New Contributors

Full Changelog: v0.5.0...v0.6.0

v0.5.0

Choose a tag to compare

@ShreckYe ShreckYe released this 05 Dec 13:04

What's Changed

Important changes:

  • This library is renamed from Compose Multiplatform Material to Compose Multiplatform HTML Unified which better describes its purpose since this release. The Maven coordinates have changed accordingly. Please adapt to these changes following the updated README.md.

  • replace the terms "Androidx"/"androidx"/"AndroidxCommon"/"androidxCommon" with Compose UI / "ComposeUi" / "composeUi" at appropriate places, both in docs and in code

    This introduces some breaking changes. Please adapt accordingly. We are sorry for the inconvenience.

Functional change:

  • delegate Spacer just to DivBox on JS DOM because the Kobweb Spacer has a different semantic from the Compose UI one

Miscellaneous changes:

  • bump Kotlin to 2.1.0, Compose Multiplatform to 1.7.1, and Kobweb to 0.20.0
  • add a "side by side" demo hosted at https://huanshankeji.github.io/compose-multiplatform-html-unified/
  • add CODE_OF_CONDUCT.md and CONTRIBUTING.md
  • use the Kotlin binary compatibility validator
  • run IntelliJ IDEA Code Cleanup and Reformat Code for the whole project

v0.4.0

Choose a tag to compare

@ShreckYe ShreckYe released this 24 Oct 12:46
  • fix a bug that a dependent project might crash on Android and add the Android target explicitly for all modules
  • no longer publish the legacy module
  • bump Kotlin to 2.0.10, Compose Multiplatform to 1.7.0, Kobweb to 0.19.2, and our Compose HTML Material to 0.4.0

Common

  • add Arrangement.spacedBy
  • Move LoadingState here from Compose HTML Material
  • add color parameters to the text composables
  • rename InlineText to TaglessText
  • add the alpha modifiers
  • add a hidden modifier
  • add the clickable modifier and replace onClick with it
  • add the PaddingValues type
  • add a BoxWithConstraints layout composable that's still buggy on JS DOM
  • add flex-basis: 0 to the weight modifiers on JS DOM to make them consistent with the androidx.compose behavior
  • split the padding modifiers into outerPadding and innerPadding
  • add the VerticalScrollBox and HorizontalScrollBox composables as (better) alternatives to the *Scroll modifiers

Material 2

  • revamp TopAppBarScaffold to take a bottom bar, a floating action bottom, and a snackbar host, and fix some of its display issues on JS DOM
    • fix bugs that the action buttons don't show and their onClick callbacks are not passed on JS DOM
  • add the SnackbarHost (the Material 3 snackbar is not available in Material Web yet)
  • add RadioGroupColumn and improve RadioRow on JS DOM
  • add a platform-specific implementation for com.huanshankeji.compose.material2.ext.IconButton on JS DOM that's more idiomatic, and fix a bug that in some scenarios icons are not shown, by always importing "material-icons/iconfont/material-icons.css"

Material 3

  • add the menu composables DropdownMenu, DropdownMenuItem, ExposedDropdownMenuBox, and ExposedDropdownMenuWithTextField
  • add the progress indicator composables LinearProgressIndicator and CircularProgressIndicator
  • fix a bug in the text fields on JS DOM that causes the caret to be reset to the start whenever the value changes if the type attribute is set
  • make multiline text fields work on JS DOM
  • add an isInteractiveJsDom parameter to ListItemComponents

Navigation

  • initially support navigation

ViewModel

  • initially support ViewModel which delegates to raw UI state on Compose HTML / JS DOM

Demo

  • make the demo UI friendly on mobile

v0.3.0

Choose a tag to compare

@ShreckYe ShreckYe released this 10 May 05:04

Support Material 3. See the Updated README.md for more details.

v0.2.0

Choose a tag to compare

@ShreckYe ShreckYe released this 17 Apr 10:11

The project now depends on Kobweb Silk on Kotlin/JS (Compose HTML) and there is a universal multiplatform interface for Modifier, scopes, etc. akin to those in androidx.compose. Obsolete code including ModifierOrAttrsScope is moved to a legacy module.

v0.1.2

Choose a tag to compare

@ShreckYe ShreckYe released this 15 Mar 15:48
Merge branch 'main' into release

v0.1.2 release

v0.1.1

Choose a tag to compare

@ShreckYe ShreckYe released this 04 Jul 21:05
v0.1.1 release

There are no functional changes. Compose Multiplatform is bumped to 1.3.1 and KMDC is bumped to 0.1.0.

v0.1.0

Choose a tag to compare

@ShreckYe ShreckYe released this 10 Jan 13:00
Merge branch 'main' into release

v0.1.0 release (replacing the previous one)

The missing POM issue is fixed.