Skip to content

Releases: programadorthi/kotlin-routing

0.0.21

20 Aug 00:18
Compare
Choose a tag to compare
0.0.21 Pre-release
Pre-release

What's changed

  • This is a snapshot to 3.0.0-beta-1 and future fixes
  • Next versions will be based on Ktor 3.0.0-beta-2 that brings Kotlin 2.0.0 and WASM support

Full Changelog: 0.0.20...0.0.21

0.0.20

13 Aug 12:59
Compare
Choose a tag to compare
0.0.20 Pre-release
Pre-release

What's new

  • Fixed a limitation to type-safe routing from parent to child

Full Changelog: 0.0.19...0.0.20

0.0.19

11 Aug 16:56
Compare
Choose a tag to compare
0.0.19 Pre-release
Pre-release

What's new

  • Kodein integration to retrieve instances inside route handle
handle(path = "/path") {
    val name: Type by instance()
}
  • Koin integration to retrieve instances inside route handle
handle(path = "/path") {
    val name: Type by inject()
}

Full Changelog: 0.0.18...0.0.19

0.0.18

07 Aug 14:39
Compare
Choose a tag to compare
0.0.18 Pre-release
Pre-release

What's new

  • Added callWithBody function that helps to call a route passing a custom body value.
    • Based on Ktor Handling request objects, to send or receive a body do:
      router.handle(path = "...") {
          val body = call.receiveNullable<AnyKindValueType>()
          // or
          val body = call.receive<AnyKindValueType>() // throw an exception whether there is no value sent
      }
      
      // to sent a body
      router.callWithBody(uri = "...", body = AnyKindValue)
  • Added canHandle* functions that receive a RouteMethod to check based on name or path combined with the provided method.
  • Added RouteMethod optional parameter to redirectTo* functions to redirect to another name or path that haven't the same method.

Full Changelog: 0.0.17...0.0.18

0.0.17

13 Jun 12:31
Compare
Choose a tag to compare
0.0.17 Pre-release
Pre-release

Fixes

  • State restoration recomposing twice animated routing

Full Changelog: 0.0.16...0.0.17

0.0.16

10 Jun 13:43
Compare
Choose a tag to compare
0.0.16 Pre-release
Pre-release

Upgrades

  • Compose Multiplatform 1.6.0
  • Voyager 1.1.0-alpha03

Fixes

Full Changelog: 0.0.15...0.0.16

0.0.15

09 Jun 17:22
Compare
Choose a tag to compare
0.0.15 Pre-release
Pre-release

What's new

  • State restoration and web history support to Compose and Voyager integrations

Bug known

  • Voyager 1.0.0 has an IrLinkageError issue when running JS application.
  • It requires an upgrade to 1.1.0-alpha03 but it creates other issue that need androidx.annotation:annotation to publish.
  • Upgrades to compose and voyager will come in another version.

Full Changelog: 0.0.14...0.0.15

0.0.14

28 Apr 15:36
Compare
Choose a tag to compare
0.0.14 Pre-release
Pre-release

What is new

Routing Core

To check if a route is registered before invoking it, you can use Routing.canHandleByName or Routing.canHandleByPath methods, depending on how your routing is set up. These methods help determine if a given route name or path matches any registered routes, allowing you to handle navigation appropriately. lookUpOnParent parameter helps with nested routing look up.

Routing Resources

Type-safe routing also received a support to check if a route is registered

JavaScript integration

Web applications has different history modes, specifically hash-based (/#/) and HTML5 history API. These modes facilitate handling navigation history in single-page applications (SPAs).

  1. Hash-based Routing: In hash-based routing, the URL contains a hash fragment (/#/) followed by the route. This method doesn't trigger a full page reload when navigating between routes, making it suitable for SPAs. It's compatible with older browsers and doesn't require server-side configuration.
  2. HTML5 History API: This API allows manipulating the browser history using JavaScript, enabling more natural-looking URLs without hash fragments. It's more modern and provides cleaner URLs but requires server-side configuration to handle URL requests properly.
  3. In-memory: Memory routing typically doesn't involve changing the URL and is often used in testing or scenarios where navigation doesn't need to be reflected in the browser's address bar.

Full Changelog: 0.0.13...0.0.14

0.0.13

09 Feb 16:54
Compare
Choose a tag to compare
0.0.13 Pre-release
Pre-release

What is new

  • Android Activity integration. Check android-activity sample for more details
  • Apple UIKit integration. Check ios-sample for more details

Changes

  • Core module now export better functions name and parameters to Objective-C

Full Changelog: 0.0.12...0.0.13

0.0.12

26 Jan 13:27
Compare
Choose a tag to compare
0.0.12 Pre-release
Pre-release

What is new

  • Compose Animation module to support animated routing

Changes

  • Pop result now can be caught by the Routing instead of Local Composition
  • Improvements and fixes

Full Changelog: 0.0.11...0.0.12