Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
APACHE-2.0 License
Bot releases are hidden (Show)
Published by raamcosta about 1 year ago
Published by raamcosta over 1 year ago
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 APIsDestinationsNavHost
:
AnimatedNavHost
-> NavHost
animatedComposable
-> composable
BottomSheet
destinations (which still is using accompanist material under the hood)animations-core,
even if you don't need BottomSheet
, it's totally fine, using rememberAnimatedNavHostEngine
will just internally call rememberNavHostEngine
.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!
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.9.41-beta...1.9.42-beta
Published by raamcosta over 1 year ago
@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
Published by raamcosta over 1 year ago
@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
Published by raamcosta over 1 year ago
@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
Published by raamcosta over 1 year ago
Here are the steps:
AnimatedContentScope
with AnimatedContentTransitionScope
DestinationStyle.BottomSheet
with DestinationStyleBottomSheet
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
Published by raamcosta over 1 year ago
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.38-beta...1.8.39-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.37-beta...1.8.38-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.36-beta...1.8.37-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.35-beta...1.8.36-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.34-beta...1.8.35-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.8.33-beta...1.8.34-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.33-beta...1.7.34-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.6.33-beta...1.6.34-beta
Published by raamcosta over 1 year ago
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.5.33-beta...1.5.34-beta
Published by raamcosta over 1 year ago
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.
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.33-beta...1.8.33-beta
Published by raamcosta over 1 year ago
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.
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.7.32-beta...1.7.33-beta
Published by raamcosta over 1 year ago
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.
Full Changelog: https://github.com/raamcosta/compose-destinations/compare/1.6.32-beta...1.6.33-beta