Skip to content

Releases: hfhbd/routing-compose

Fix DesktopRouter when navigating back

26 Aug 07:36
6296486

Choose a tag to compare

Breaking Changes

DesktopRouter, HashRouter, and BrowserRouter are now internal classes. Use the Composable functions instead. The reason is to prevent creating a new Router instance, which results in wrong navigation. Please create an issue with your use case if you need to instantiate a Router without actually adding it to the Composable hierarchy.

What's Changed

Full Changelog: v0.2.7...v0.2.8

v0.2.7 Remove wrong leading ? when using Parameters.fromMap

19 Jul 09:16
0920ca7

Choose a tag to compare

What's Changed

  • Update Docs.yml by @hfhbd in #199
  • Bump multiplatform from 1.7.0 to 1.7.10 by @dependabot in #202
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev741 to 1.2.0-alpha01-dev745 by @dependabot in #203
  • Bump kotlinx-coroutines-swing from 1.6.3 to 1.6.4 by @dependabot in #205
  • Bump detekt-formatting from 1.20.0 to 1.21.0 by @dependabot in #208
  • Bump io.gitlab.arturbosch.detekt from 1.20.0 to 1.21.0 by @dependabot in #207
  • fix: path contains more than 1 '?' delimiter with using parameters by @xtexChooser in #209

New Contributors

Full Changelog: v0.2.6...v0.2.7

Add Boolean parameter to attrs scope of NavLink

07 Jul 12:32
35a7e57

Choose a tag to compare

Add Boolean parameter to attrs scope of NavLink

Instead hardcoding active, it now possible to use the boolean lambda parameter for customization when the current path starts with to.

NavLink(to = "/users", { isActive ->
  if (isActive) {
    classes("active")
  }
}) {
  Text("Users")
}

What's Changed

Full Changelog: v0.2.5...v0.2.6

Bump Compose to dev741 and Kotlin to 1.7.0

06 Jul 04:03
d74a71e

Choose a tag to compare

What's Changed

  • Bump kotlinx-coroutines-swing from 1.6.2 to 1.6.3 by @dependabot in #189
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev716 to 1.2.0-alpha01-dev724 by @dependabot in #190
  • Demo: Fix webpack config for browser router by @hfhbd in #192
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev724 to 1.2.0-alpha01-dev725 by @dependabot in #191
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev725 to 1.2.0-alpha01-dev729 by @dependabot in #193
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev729 to 1.2.0-alpha01-dev731 by @dependabot in #194
  • Bump Compose and Kotlin to 1.7.0 by @hfhbd in #196
  • Bump kotlinx-uuid-core from 0.0.14 to 0.0.15 by @dependabot in #175

Full Changelog: v0.2.4...v0.2.5

Allow empty route ("/") as route

20 Jun 12:53
4862724

Choose a tag to compare

Pre-release

What's Changed

  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev709 to 1.2.0-alpha01-dev713 by @dependabot in #183
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev713 to 1.2.0-alpha01-dev716 by @dependabot in #184
  • Bump Gradle to 7.4.2 by @hfhbd in #187
  • Allow / as route by @hfhbd in #188

Full Changelog: v0.2.3...v0.2.4

NavLink Improvements

11 Jun 08:09
b03db75

Choose a tag to compare

NavLink Improvements Pre-release
Pre-release

Improved NavLink

  • It uses the href attribute results into a "real" link, thanks @SalomonBrys
  • Better active support for / and at the start of routing
  • Aligned attrs and content parameter by @SalomonBrys

What's Changed

  • Demo: Hide redirect in answer by @hfhbd in #171
  • Dependabot: Support JetBrains Compose repo by @hfhbd in #172
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev686 to 1.2.0-alpha01-dev707 by @dependabot in #173
  • Bump org.jetbrains.compose from 1.2.0-alpha01-dev707 to 1.2.0-alpha01-dev709 by @dependabot in #176
  • NavLink for JS improvements by @SalomonBrys in #177
  • HashRouter: Fix routing to / after redirect by @hfhbd in #179
  • Fix initPath by @hfhbd in #181
  • Fix NavLink active with root path by @hfhbd in #182

New Contributors

Full Changelog: v0.2.2...v0.2.3

Add redirect in noMatch handler

06 Jun 15:15
ebe7bca

Choose a tag to compare

Pre-release

What's Changed

  • Add redirect in noMatch handler by @hfhbd in #170

Full Changelog: v0.2.1...v0.2.2

NavLink: Fix wrong prefix handling for active

06 Jun 14:33
c1fe888

Choose a tag to compare

What's Changed

Full Changelog: v0.2.0...v0.2.1

Relative Routing and Redirecting support

06 Jun 11:29
65e93fa

Choose a tag to compare

Relative Routing and Redirecting

You can now use relative routing and redirecting, and hide it from the history if you want.

redirect("redirect", target = "users", hide = true)
route("users) {
    NavLink(to = "./answer") {
        Text("Relative route to ./answer")
    }
    val router = Router.current
    Input(type = InputType.Button) {
        onClick {
            router.navigate("redirect", hide = true)
        }
        value("Navigate to /users. Check the url.")
    }
}

Breaking Changes

  • This release also renames NavBuilder to RouteBuilder.
  • HashRouter and BrowserRouter are classes, you must use val router = Router.current to get the current router.

What's Changed

Full Changelog: v0.1.8...v0.2.0

Use Compose Dev 670 and Kotlin 1.6.21

20 Apr 13:34
0e71f6e

Choose a tag to compare

Pre-release

This release uses a dev build of Compose: 0.0.0-on-rebase-12-apr-2022-dev670!

What's Changed

Full Changelog: v0.1.8...v0.1.9-dev670