Releases: hfhbd/routing-compose
Fix DesktopRouter when navigating back
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
- Gradle update by @hfhbd in #212
- Bump npm dependencies by @hfhbd in #213
- Fix DesktopRouter when navigating back by @hfhbd in #217
- Make HashRouter and BrowserRouter internal classes by @hfhbd in #218
- Add licensee by @hfhbd in #219
- Test if GradlePluginPortal mirrors mavenCentral by @hfhbd in #220
- Remove useless binaries setting by @hfhbd in #222
- Use new GitHub Pages action by @hfhbd in #223
- Use new dependency review action by @hfhbd in #224
- Test dependency review by @hfhbd in #225
- Bump actions/configure-pages from 1 to 2 by @dependabot in #227
- Bump org.jetbrains.compose from 1.2.0-alpha01-dev745 to 1.2.0-alpha01-dev770 by @dependabot in #228
- Bump kotlinx-uuid-core from 0.0.15 to 0.0.16 by @dependabot in #229
Full Changelog: v0.2.7...v0.2.8
v0.2.7 Remove wrong leading ? when using Parameters.fromMap
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
- @xtexChooser made their first contribution in #209
Full Changelog: v0.2.6...v0.2.7
Add Boolean parameter to attrs scope of NavLink
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
- Fix docs cleanup by @hfhbd in #198
- Fix broken webpackCli... by @hfhbd in #200
- Add Boolean parameter to attrs scope of NavLink by @hfhbd in #201
Full Changelog: v0.2.5...v0.2.6
Bump Compose to dev741 and Kotlin to 1.7.0
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
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
Improved NavLink
- It uses the
hrefattribute results into a "real" link, thanks @SalomonBrys - Better
activesupport for/and at the start of routing - Aligned
attrsandcontentparameter 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
- @SalomonBrys made their first contribution in #177
Full Changelog: v0.2.2...v0.2.3
Add redirect in noMatch handler
NavLink: Fix wrong prefix handling for active
Relative Routing and Redirecting support
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
NavBuildertoRouteBuilder. HashRouterandBrowserRouterare classes, you must useval router = Router.currentto get the current router.
What's Changed
- Bump NPM Dependencies by @hfhbd in #136
- Bump actions/checkout from 2 to 3 by @dependabot in #137
- Bump org.jetbrains.compose from 1.1.0 to 1.1.1 by @dependabot in #138
- Bump npm packages by @hfhbd in #139
- Flow clock by @hfhbd in #140
- Bump kotlinx-coroutines-swing from 1.6.0 to 1.6.1 by @dependabot in #142
- Bump actions/download-artifact from 2 to 3 by @dependabot in #146
- Bump actions/setup-java from 2 to 3 by @dependabot in #144
- Bump actions/upload-artifact from 2 to 3 by @dependabot in #145
- Bump Kotlin to 1.6.21 by @hfhbd in #149
- Bump org.jetbrains.compose from 0.0.0-on-rebase-12-apr-2022-dev670 to 1.2.0-alpha01-dev675 by @dependabot in #151
- Add href to NavLink by @hfhbd in #154
- Root attribute by @hfhbd in #155
- Bump org.jetbrains.compose from 1.2.0-alpha01-dev675 to 1.2.0-alpha01-dev679 by @dependabot in #156
- Implement relative routing by @hfhbd in #157
- Bump org.jetbrains.compose from 1.2.0-alpha01-dev679 to 1.2.0-alpha01-dev683 by @dependabot in #159
- Implement redirecting by @hfhbd in #160
- Bump org.jetbrains.compose from 1.2.0-alpha01-dev683 to 1.2.0-alpha01-dev686 by @dependabot in #161
- Fix grammar by @hfhbd in #162
- Fix HashRouter new url by @hfhbd in #163
- Bump kotlinx-coroutines-swing from 1.6.1 to 1.6.2 by @dependabot in #164
- Add active class to NavLink by @hfhbd in #165
- Add relative routing path support by @hfhbd in #166
Full Changelog: v0.1.8...v0.2.0
Use Compose Dev 670 and Kotlin 1.6.21
This release uses a dev build of Compose: 0.0.0-on-rebase-12-apr-2022-dev670!
What's Changed
- Bump NPM Dependencies by @hfhbd in #136
- Bump actions/checkout from 2 to 3 by @dependabot in #137
- Bump org.jetbrains.compose from 1.1.0 to 1.1.1 by @dependabot in #138
- Bump npm packages by @hfhbd in #139
- Flow clock by @hfhbd in #140
- Bump kotlinx-coroutines-swing from 1.6.0 to 1.6.1 by @dependabot in #142
- Bump actions/download-artifact from 2 to 3 by @dependabot in #146
- Bump actions/setup-java from 2 to 3 by @dependabot in #144
- Bump actions/upload-artifact from 2 to 3 by @dependabot in #145
- Bump Kotlin to 1.6.21 by @hfhbd in #149
Full Changelog: v0.1.8...v0.1.9-dev670