-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify AppyxComponent composables #643
Unify AppyxComponent composables #643
Conversation
@@ -56,189 +19,27 @@ internal val defaultExtraTouch = 48.dp | |||
fun <InteractionTarget : Any, ModelState : Any> ParentNode<InteractionTarget>.AppyxComponent( | |||
appyxComponent: BaseAppyxComponent<InteractionTarget, ModelState>, | |||
modifier: Modifier = Modifier, | |||
draggables: ImmutableList<Draggable> = immutableListOf(appyxComponent), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove it or find a better implementation. If we accidentally pass an empty list it will stop working
@@ -73,7 +74,8 @@ class BackStackNode( | |||
override fun resolve(interactionTarget: InteractionTarget, buildContext: BuildContext): Node = | |||
when (interactionTarget) { | |||
is InteractionTarget.Child -> node(buildContext) { | |||
val backgroundColor = remember { colors.shuffled().random() } | |||
val backgroundColor = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking here that we save UI state for a Node correctly
@@ -5,6 +5,7 @@ | |||
### API breaking changes | |||
|
|||
- [#630](https://github.com/bumble-tech/appyx/pull/630) – Pass initial state into Spotlights visualisations | |||
- [#643](https://github.com/bumble-tech/appyx/pull/643) – Unify AppyxComponent composable between appyx-navigation and appyx-interactions modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any change needed on docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
|
||
return alignmentOffset | ||
com.bumble.appyx.interactions.core.AppyxComponent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be nicer to import it with an alias and don't use fully qualified name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but not necessarily. Since it's just one method call I think it's fine like this as well
Description
AppyxComponent in appyx-interactions and appyx-navigation are identical in their core and should reused as much code as possible to simplify support
Check list
CHANGELOG.md
if required.