2.0.0-alpha10 – Migration guide¶
Artifact id changes¶
// Material3 helpers
-implementation("com.bumble.appyx:material3-android:$version")
+implementation("com.bumble.appyx:utils-material3-android:$version")
// KSP (only used for custom Visualisations)
-ksp("com.bumble.appyx:mutable-ui-processor:{latest version}")
+ksp("com.bumble.appyx:appyx-processor:{latest version}")
Package changes¶
// Moved all classes:
-com.bumble.appyx.navigation.integrationpoint.*
+com.bumble.appyx.navigation.integration.*
// Moved class:
-com.bumble.appyx.navigation.navigation.UpNavigationHandler
+com.bumble.appyx.navigation.integration.UpNavigationHandler
// Removed duplicate typealias and moved to utils:
-import com.bumble.appyx.interactions.core.state.SavedStateMap
-import com.bumble.appyx.navigation.state.SavedStateMap
+import com.bumble.appyx.utils.multiplatform.SavedStateMap
Rename Node
& ParentNode
¶
class YourNode(
/*...*/
-) : Node(
+) : LeafNode(
/*...*/
) {
}
class YourNode(
/*...*/
-) : ParentNode<T>(
+) : Node<T>(
/*...*/
) {
}
Rename View
composable¶
class YourNode(
/*...*/
) : Node<T> {
@Composable
- override fun View(modifier: Modifier) {
+ override fun Content(modifier: Modifier) {
}
}
Rename ambiguous AppyxComponent
composables¶
When used in the scope of Appyx Navigation:
-import com.bumble.appyx.navigation.composable.AppyxComponent
+import com.bumble.appyx.navigation.composable.AppyxNavigationContainer
class YourNode(
/*...*/
) : Node<T> {
@Composable
override fun Content(modifier: Modifier) {
- AppyxComponent(
+ AppyxNavigationContainer(
appyxComponent = yourComponent,
modifier = modifier
)
}
}
When used in the scope of Appyx Interactions:
-import com.bumble.appyx.interactions.core.AppyxComponent
+import com.bumble.appyx.interactions.core.AppyxInteractionsContainer
@Composable
fun SomeComposable() {
- AppyxComponent(
+ AppyxInteractionsContainer(
appyxComponent = yourComponent,
screenWidthPx = TODO(),
screenHeightPx = TODO(),
clipToBounds = false,
modifier = Modifier,
element = { elementUiModel ->
YourElementComposable(
elementUiModel = elementUiModel,
modifier = elementUiModel.modifier
)
}
)
}
Rename BuildContext
& buildContext
¶
-import com.bumble.appyx.navigation.modality.BuildContext
+import com.bumble.appyx.navigation.modality.NodeContext
class YourNode(
- buildContext: BuildContext,
+ nodeContext: NodeContext,
/*...*/
) : Node<NavTarget> {
- buildContext = buildContext
+ nodeContext = nodeContext
/*...*/
) {
}
Rename resolve
¶
class YourNode(
/*...*/
) : Node<NavTarget> {
/*...*/
) {
sealed class NavTarget : Parcelable {
/*...*/
}
- override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node =
+ override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node =
when (navTarget) {
TODO()
}
Changes unlikely to affect you directly¶
Changes to NodeView
¶
You only need to care about these changes if you separated out your view to a class implementing the NodeView
interface.
If you implemented your @Composable override fun Content(modifier: Modifier)
directly in your Node
, you don't need to do anything.
-
We've dropped generics from
NodeView
interface-interface NodeView<NavTarget : Any> +interface NodeView
If you had an implementation of this interface, drop the generic from your class too.
-
We've unified
NodeView
andParentNodeView
If you used
ParentNodeView
, just replace the usage withNodeView
. -
We've unified
EmptyNodeView
andEmptyParentNodeView
If you used
EmptyParentNodeView
, just replace the usage withEmptyNodeView
.
Swap the order of TargetUiState
, MutableUiState
¶
You only need to do this if you implemented your own Visualisation
. If you only relied on the ones supplied by the library, you don't need to do anything.
class SomeVisualisation(
/*...*/
-) : BaseVisualisation<T, State<T>, MutableUiState, TargetUiState>(
+) : BaseVisualisation<T, State<T>, TargetUiState, MutableUiState>(
KSP generated method name change¶
You only need to do this if you implemented your own Visualisation
. If you only relied on the ones supplied by the library, you don't need to do anything.
override fun mutableUiStateFor(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
- targetUiState.toMutableState(uiContext)
+ targetUiState.toMutableUiState(uiContext)