compose-destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.

APACHE-2.0 License

Stars
3.1K

Bot releases are hidden (Show)

compose-destinations - 1.9.51

Published by raamcosta about 1 year ago

  • Dependencies updates
compose-destinations - 1.9.50 No longer beta! 🙌 No more accompanist-navigation! 🎉

Published by raamcosta over 1 year ago

Removed accompanist navigation since animations were imported to official compose navigation! 🎉

Because of this, some minor changes had to be made:

  • DestinationStyleAnimated -> DestinationStyle.Animated
  • rememberAnimatedNavHost -> rememberNavHost
  • rememberAnimatedNavHostEngine -> rememberNavHostEngine (unless you are using bottom sheet destinations, in which case you still need to use rememberAnimatedNavHostEngine)
  • ExperimentalAnimationApi removed on most APIs
  • If you were not using DestinationsNavHost:
    • AnimatedNavHost -> NavHost
    • animatedComposable -> composable
  • You no longer need animations-core unless you are using BottomSheet destinations (which still is using accompanist material under the hood)
  • If you do still use animations-core, even if you don't need BottomSheet, it's totally fine, using rememberAnimatedNavHostEngine will just internally call rememberNavHostEngine.

No beta suffix? 🤔

Yes, that's right, there were a lot of insecurities hiding behind that "-beta" suffixed on all the lib's versions.
The truth is that API changes might happen but each version is stable for production. This is especially annoying because some developers have company policies that state they cannot use this library because of this.
So from now on, if big changes happen I will create alpha, beta, rc releases (not necessarily all three, as it seems quite unnecessary most of the time) related to that specific version, basically following practices that you might be used to with other jetpack libraries and such.

Thanks for being with me through this time, Compose Destinations is just getting started! Look forward to v2 which I honestly think will be great!

compose-destinations - 1.9.42-beta

Published by raamcosta over 1 year ago

Fixes

  • Fixed #415 - issue that was happening if you were not using animations core.

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.9.41-beta...1.9.42-beta

compose-destinations - [🪲 found use 1.9.42-beta or newer] 1.9.41-beta

Published by raamcosta over 1 year ago

Changes

  • Added ability to use @Destination on other annotation classes which can then be used on the composable functions, transferring all their options this way.

Example:


@Destination(
    deepLinks = [
        DeepLink(
            uriPattern = ...,
        ),
        DeepLink(
            uriPattern = ...,
        )
    ],
)
@MyDestination

@MyDestination
@Composable
fun MyScreen()

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.9.40-beta...1.9.41-beta

compose-destinations - 1.8.41-beta

Published by raamcosta over 1 year ago

Changes

  • Added ability to use @Destination on other annotation classes which can then be used on the composable functions, transferring all their options this way.

Example:


@Destination(
    deepLinks = [
        DeepLink(
            uriPattern = ...,
        ),
        DeepLink(
            uriPattern = ...,
        )
    ],
)
@MyDestination

@MyDestination
@Composable
fun MyScreen()

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.39-beta...1.8.41-beta

compose-destinations - 1.7.41-beta

Published by raamcosta over 1 year ago

Changes

  • Added ability to use @Destination on other annotation classes which can then be used on the composable functions, transferring all their options this way.

Example:


@Destination(
    deepLinks = [
        DeepLink(
            uriPattern = ...,
        ),
        DeepLink(
            uriPattern = ...,
        )
    ],
)
@MyDestination

@MyDestination
@Composable
fun MyScreen()

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.38-beta...1.7.41-beta

compose-destinations - [🪲 found use 1.9.42-beta or newer] 1.9.40-beta

Published by raamcosta over 1 year ago

Changes

  • This release requires developers using the animation's core to do some small changes. This was required since accompanist navigation also had some breaking changes on their side.

Here are the steps:

  1. Replace all instances of AnimatedContentScope with AnimatedContentTransitionScope
  2. Replace all instances of DestinationStyle.BottomSheet with DestinationStyleBottomSheet
  3. Replace all instances of DestinationStyle.Animated with DestinationStyleAnimated

That should be it. If you find something else that you had to do, please do let us know opening an issue.

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.9.39-beta...1.9.40-beta

compose-destinations - 1.9.39-beta

Published by raamcosta over 1 year ago

  • Compose 1.5 support 🙌
compose-destinations - 1.8.39-beta

Published by raamcosta over 1 year ago

  • Last transitive dependency versions for stable 1.4 Compose

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.38-beta...1.8.39-beta

compose-destinations - 1.8.38-beta

Published by raamcosta over 1 year ago

compose-destinations - 1.8.37-beta Compose 1.4.0 Stable 🙌

Published by raamcosta over 1 year ago

Changes

  • Update dependencies to match 1.4.0 Compose Stable release
  • Change "destinations" multi-module mode to generate list of destinations for module even if there's only one destination

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.36-beta...1.8.37-beta

compose-destinations - 1.8.36-beta

Published by raamcosta over 1 year ago

compose-destinations - 1.8.35-beta

Published by raamcosta over 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.34-beta...1.8.35-beta

compose-destinations - 1.8.34-beta

Published by raamcosta over 1 year ago

Changes

- #352 : Adds support for navigation extras when navigating to an ActivityDestination

- Fixed issue with launchSingleTop destinations not receiving the result from a ResultBackNavigator in certain scenarios

- Dependencies update

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.33-beta...1.8.34-beta

compose-destinations - 1.7.34-beta

Published by raamcosta over 1 year ago

Changes

- #352 : Adds support for navigation extras when navigating to an ActivityDestination

- Fixed issue with launchSingleTop destinations not receiving the result from a ResultBackNavigator in certain scenarios

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.33-beta...1.7.34-beta

compose-destinations - 1.6.34-beta

Published by raamcosta over 1 year ago

Changes

- #352 : Adds support for navigation extras when navigating to an ActivityDestination

- Fixed issue with launchSingleTop destinations not receiving the result from a ResultBackNavigator in certain scenarios

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.6.33-beta...1.6.34-beta

compose-destinations - 1.5.34-beta

Published by raamcosta over 1 year ago

Changes

- #352 : Adds support for navigation extras when navigating to an ActivityDestination

- Fixed issue with launchSingleTop destinations not receiving the result from a ResultBackNavigator in certain scenarios

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.5.33-beta...1.5.34-beta

compose-destinations - 1.8.33-beta

Published by raamcosta over 1 year ago

- Feature - Destination Wrappers

With this feature, you can set a number of wrapper composables to your screens, extracting common logic or UI you need in multiple screens.
Imagine you have a number of screens that should be behind a PIN. How would you implement that so that you don't repeat yourself and you avoid adding complexity to each of these screens?

Well, after this update you can do this:

@Destination(
    wrappers = [PinEntryWrapper::class] // 👈 
)
@Composable
fun YourScreen() { //...

And define what your wrapper does like:

object PinEntryWrapper : DestinationWrapper {

    @Composable
    override fun <T> DestinationScope<T>.Wrap(
        screenContent: @Composable () -> Unit
    ) {
        val vm = viewModel<PinEntryWrapperViewModel>()
        val correctPinEntered by vm.correctPinEntered.collectAsState()

        if (pinEnteredCorrectly) {
            screenContent()
        } else {
            // SHOW YOUR PIN ENTRY HERE
        }
    }
}

And now you have a reusable piece of logic and UI which can be easily reused in how many screens you need and with very little intrusion to the screen itself! 🙌
The DestinationScope receiver of the Wrap function will give you anything you might need here including the destination
being wrapped at the moment (since you can Wrap multiple ones), its arguments, dependencies (provided via dependencyContainerBuilder etc.

- Fixed #339

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.33-beta...1.8.33-beta

compose-destinations - 1.7.33-beta

Published by raamcosta over 1 year ago

- Feature - Destination Wrappers

With this feature, you can set a number of wrapper composables to your screens, extracting common logic or UI you need in multiple screens.
Imagine you have a number of screens that should be behind a PIN. How would you implement that so that you don't repeat yourself and you avoid adding complexity to each of these screens?

Well, after this update you can do this:

@Destination(
    wrappers = [PinEntryWrapper::class] // 👈 
)
@Composable
fun YourScreen() { //...

And define what your wrapper does like:

object PinEntryWrapper : DestinationWrapper {

    @Composable
    override fun <T> DestinationScope<T>.Wrap(
        screenContent: @Composable () -> Unit
    ) {
        val vm = viewModel<PinEntryWrapperViewModel>()
        val correctPinEntered by vm.correctPinEntered.collectAsState()

        if (pinEnteredCorrectly) {
            screenContent()
        } else {
            // SHOW YOUR PIN ENTRY HERE
        }
    }
}

And now you have a reusable piece of logic and UI which can be easily reused in how many screens you need and with very little intrusion to the screen itself! 🙌
The DestinationScope receiver of the Wrap function will give you anything you might need here including the destination
being wrapped at the moment (since you can Wrap multiple ones), its arguments, dependencies (provided via dependencyContainerBuilder etc.

- Fixed #339

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.32-beta...1.7.33-beta

compose-destinations - 1.6.33-beta

Published by raamcosta over 1 year ago

- Feature - Destination Wrappers

With this feature, you can set a number of wrapper composables to your screens, extracting common logic or UI you need in multiple screens.
Imagine you have a number of screens that should be behind a PIN. How would you implement that so that you don't repeat yourself and you avoid adding complexity to each of these screens?

Well, after this update you can do this:

@Destination(
    wrappers = [PinEntryWrapper::class] // 👈 
)
@Composable
fun YourScreen() { //...

And define what your wrapper does like:

object PinEntryWrapper : DestinationWrapper {

    @Composable
    override fun <T> DestinationScope<T>.Wrap(
        screenContent: @Composable () -> Unit
    ) {
        val vm = viewModel<PinEntryWrapperViewModel>()
        val correctPinEntered by vm.correctPinEntered.collectAsState()

        if (pinEnteredCorrectly) {
            screenContent()
        } else {
            // SHOW YOUR PIN ENTRY HERE
        }
    }
}

And now you have a reusable piece of logic and UI which can be easily reused in how many screens you need and with very little intrusion to the screen itself! 🙌
The DestinationScope receiver of the Wrap function will give you anything you might need here including the destination
being wrapped at the moment (since you can Wrap multiple ones), its arguments, dependencies (provided via dependencyContainerBuilder etc.

- Fixed #339

Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.6.32-beta...1.6.33-beta

Package Rankings
Top 12.66% on Repo1.maven.org
Badges
Extracted from project README
Maven metadata URL License Apache 2.0 Android API kotlin
Related Projects