Skip to content
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

Node mp #551

Merged
merged 103 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from 91 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
7486f64
created multiplatform-common utility library to hold sharable Parcela…
Ninjars May 12, 2023
7c7893b
removed Parcelize implementation from interactions module and replace…
Ninjars May 12, 2023
6ac3040
renamed multiplatform package
Ninjars May 15, 2023
4f7da38
renamed multiplatform module
Ninjars May 15, 2023
c880cb9
Merge pull request #431 from Ninjars/multiplatform-utils
Ninjars May 17, 2023
9c70cca
initial refactoring of appyx-navigation module into a multiplatform-s…
Ninjars May 16, 2023
37b5a10
moved code from android module to common multiplatform module - this …
Ninjars May 16, 2023
d0e4ae5
declared common platform interfaces
Ninjars May 16, 2023
ce2a498
made customizations a multiplatform module
Ninjars May 17, 2023
9f95ed2
refactored handling of IntegrationPoint, removing android specific co…
Ninjars May 17, 2023
372af07
updated imports
Ninjars May 17, 2023
c2b568d
addressed class references
Ninjars May 17, 2023
25fef49
added simple multiplatform logger for use in LifecycleLogger.kt
Ninjars May 17, 2023
53635ae
fixed UUID reference
Ninjars May 17, 2023
9eb7593
fixed interface signature
Ninjars May 17, 2023
dd93329
implemented multiplatform LifecycleRegistry
Ninjars May 18, 2023
fe60c79
updated functional interface signatures that aren't compatible with JS
Ninjars May 18, 2023
62218e0
reference android navigation module where appropriate
Ninjars May 18, 2023
eb3f204
updated IntegrationPointStub.kt
Ninjars May 19, 2023
a650fe5
renamed lifecycle classes with "platform" prefix to disambiguate with…
Ninjars May 22, 2023
82d0ce3
initial implementation of PlatformLifecycleRegistry and AndroidPlatfo…
Ninjars May 22, 2023
bacbf90
wip cleanup - removing some incompatible annotations and addressing a…
Ninjars May 22, 2023
64f7ef3
inject PlatformLifecycle into NodeHost, facilitating cross-platform u…
Ninjars May 22, 2023
147a8f8
fixed LifecycleLogger
Ninjars May 22, 2023
124c109
api change cleanup
Ninjars May 23, 2023
07f9b2c
addressed a range of compilation issues
Ninjars May 23, 2023
b36e845
implemented PlatformBackHandler to remove back handling dependency fr…
Ninjars May 23, 2023
0910e6d
repackaged and renamed things for consistency of "platform" and "comm…
Ninjars May 23, 2023
dd3f250
simple desktop and JS PlatformLifecycleRegistry impls
Ninjars May 23, 2023
c3fed19
added necessary OnBackPressedCallback interface for BackPressHandler …
Ninjars May 24, 2023
a9f85e2
moved AppyxLogger into multiplatform utils
Ninjars May 25, 2023
fd7264d
implemented simple common BuildFlags object to handle configuration d…
Ninjars May 25, 2023
a4e8b2c
fixed crash by maintaining strong reference to wrapping LifecycleOwne…
Ninjars Jun 6, 2023
82cf6fe
added lint baseline
Ninjars Jun 6, 2023
479b54d
fixed nav unit test
Ninjars Jun 7, 2023
979ca63
removed unused dependency from testing-ui-activity
Ninjars Jun 7, 2023
4bd5351
refactored customisations module to be multiplatform friendly
Ninjars Jun 7, 2023
41387ec
added artefactId to multiplatform utils module
Ninjars Jun 7, 2023
22daae9
moved test dependencies to match new unit test location
Ninjars Jun 7, 2023
6ab03ce
corrected customisation module namespace
Ninjars Jun 8, 2023
f498165
implemented local composition provider for screensize, based off a va…
Ninjars Jun 8, 2023
a7c63ce
corrected NodeCustomisationDirectory constructor
Ninjars Jun 9, 2023
94dddf3
moved JS incompatible RetainedInstanceStoreExt functions to jvm platf…
Ninjars Jun 9, 2023
6d9f0d5
fixed RetainedInstanceStoreTest.kt to work cross-platform
Ninjars Jun 9, 2023
5b40546
removed usage of class.qualifiedName, which is not available in js pl…
Ninjars Jun 9, 2023
bd61ca7
fixed desktop PlatformLifecycleRegistry.kt getter overloading
Ninjars Jun 9, 2023
d3dbc9b
fixed lifecycle usage in RxNodeConnectorTests
Ninjars Jun 9, 2023
5655507
fixed gradle health issues in appyx-navigation:android
Ninjars Jun 9, 2023
ea3dd5e
removed navigation common android and desktop test directory declarat…
Ninjars Jun 12, 2023
fd2be9a
corrected android navigation test manifest
Ninjars Jun 12, 2023
43642bc
removed unnecessary test dependencies from navigation module
Ninjars Jun 12, 2023
ff61124
Properly ignored test
Ninjars Jun 13, 2023
f193c03
end of file line returns
Ninjars Jun 13, 2023
11a0754
provide ScreenSize values as Dp not Int, corrected height values
Ninjars Jun 13, 2023
64b807c
removed Common prefix from Lifecycle
Ninjars Jun 13, 2023
7a7eb71
fixed test annotation
Ninjars Jun 13, 2023
ae5f189
added Android platform NodeHost constructor to avoid needing to refer…
Ninjars Jun 14, 2023
d467c0e
Merge pull request #442 from Ninjars/restructure-navigation-module
Ninjars Jun 14, 2023
56276e6
Merge branch '2.x' into node-mp
Ninjars Jun 20, 2023
fd23ef2
Merge branch '2.x' into node-mp
Ninjars Jun 22, 2023
943c941
moved demos/appyx-navigation into demos/appyx-navigation/android
Ninjars Jun 22, 2023
32634c6
refactored demos/appyx-navigation/common into a multiplatform library…
Ninjars Jun 27, 2023
426574b
fixed apparent api change in interactions/widgets/Widgets
Ninjars Jun 28, 2023
d428d6c
fixed gradle configuration that was preventing Parcelize from being s…
Ninjars Jun 28, 2023
923b3a6
initial implementation of working desktop app
Ninjars Jun 28, 2023
82efef4
implemented PlatformBackHandler for Desktop
Ninjars Jun 30, 2023
94a8163
implemented PlatformBackHandler for Web
Ninjars Jun 30, 2023
dcc4f05
desktop node host tweak
Ninjars Jun 30, 2023
ca26d95
incidental rebase fix to mkdocs samples's multiplatform AppyxLogger d…
Ninjars Jun 30, 2023
ed3c98a
incidental correction to puzzle15 script reference
Ninjars Jun 30, 2023
a7f0198
cosmetic rearrangement of dependencies in demos/appyx-navigation/comm…
Ninjars Jun 30, 2023
af4bf42
implemented web target
Ninjars Jun 30, 2023
f24e3d8
implemented web windows resizing handling
Ninjars Jul 13, 2023
4b49eff
fixed key event handling
Ninjars Jul 13, 2023
8c05fde
added lifecycle cleanup in js PlatformLifecycleRegistry as it is in jvm
Ninjars Jul 13, 2023
dbd5e7b
renamed BrowserViewportWindow
Ninjars Jul 14, 2023
90c7eb5
renamed DesktopNodeHost
Ninjars Jul 14, 2023
e024e3c
Fixed JVM compilation issue in Children
Ninjars Jul 14, 2023
8a3432c
fixed incorrect parcelable imports
Ninjars Jul 17, 2023
7f213f9
removed unused dependencies
Ninjars Jul 17, 2023
e6da7b2
whitespace tweak
Ninjars Jul 20, 2023
89e8fd2
updated module name for the navigation common library
Ninjars Jul 20, 2023
4be9bbe
implemented better solution for JS compatible Child function
Ninjars Jul 20, 2023
58ec5ab
Merge pull request #531 from bumble-tech/429-implement-platform-speci…
Ninjars Jul 25, 2023
d6e47ce
Merge branch '2.x' into node-mp
Ninjars Jul 25, 2023
59cd54b
Merge branch '2.x' into node-mp
Ninjars Jul 28, 2023
06eab9f
Added line to CHANGELOG for multiplatform
Ninjars Jul 30, 2023
95bdacf
Updated entry in migrationguide.md
Ninjars Jul 30, 2023
4c2f47e
fixed import path broken in merge
Ninjars Jul 31, 2023
b3c99b0
fixed mkdocs indentation
Ninjars Jul 31, 2023
99693d9
reverted whitespace changes in 1.x docs
Ninjars Jul 31, 2023
f6d6837
whitespace tweaks
Ninjars Aug 7, 2023
21a3b35
provide node lifecycle via LocalCommonLifecycleOwner composition local
Ninjars Aug 7, 2023
18eba90
repackaged platform helper classes
Ninjars Aug 9, 2023
19d903f
simplified demo classes
Ninjars Aug 9, 2023
07353f5
reverted change to Node.navigateUp()
Ninjars Aug 9, 2023
d939568
Merge branch '2.x' into node-mp
Ninjars Aug 9, 2023
4c89cec
repackaged code from platform-specific navigation modules to within c…
Ninjars Aug 14, 2023
5d25d91
cleaned up dependencies
Ninjars Aug 14, 2023
7f46fdd
Merge branch '2.x' into node-mp
Ninjars Aug 14, 2023
d46761e
updated changelog
Ninjars Aug 14, 2023
ca55991
fixed merge import path issue
Ninjars Aug 14, 2023
f585a22
fix for deprecation.md paths
Ninjars Aug 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
### Added

- [#539](https://github.com/bumble-tech/appyx/pull/539) – Position alignment
- [#538](https://github.com/bumble-tech/appyx/pull/538) – Availability to observe MotionProperties from children UI
- [#538](https://github.com/bumble-tech/appyx/pull/538) – Availability to observe MotionProperties
from children UI
- [#551](https://github.com/bumble-tech/appyx/pull/551) - Multiplatform Navigation module

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package com.bumble.appyx.components.experimental.cards

import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.spring
import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig
import com.bumble.appyx.interactions.core.model.BaseAppyxComponent
import com.bumble.appyx.interactions.core.ui.MotionController
import com.bumble.appyx.interactions.core.ui.context.TransitionBounds
import com.bumble.appyx.interactions.core.ui.context.UiContext
import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory
import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig

open class Cards<InteractionTarget : Any>(
model: CardsModel<InteractionTarget>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package com.bumble.appyx.components.experimental.cards
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.InvisibleCard.Queued
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.VisibleCard.BottomCard
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.VisibleCard.TopCard
import com.bumble.appyx.interactions.Parcelable
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.RawValue
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel
import com.bumble.appyx.interactions.core.state.SavedStateMap
import com.bumble.appyx.utils.multiplatform.Parcelable
import com.bumble.appyx.utils.multiplatform.Parcelize
import com.bumble.appyx.utils.multiplatform.RawValue

class CardsModel<InteractionTarget : Any>(
initialItems: List<InteractionTarget> = listOf(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package com.bumble.appyx.components.experimental.cards.operation

import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.experimental.cards.Cards
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.components.experimental.cards.CardsModel
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.InvisibleCard.VotedCard.VOTED_CARD_STATE.LIKED
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.VisibleCard.BottomCard
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.VisibleCard.TopCard
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.VisibleCard.TopCard.TOP_CARD_STATE.STANDARD
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class VoteLike<InteractionTarget>(
override var mode: Operation.Mode = Operation.Mode.KEYFRAME
): TopCardOperation<InteractionTarget>() {
) : TopCardOperation<InteractionTarget>() {

override fun createTargetState(fromState: CardsModel.State<InteractionTarget>): CardsModel.State<InteractionTarget> {
val votedCards = fromState.votedCards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.bumble.appyx.components.experimental.cards.operation

import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.experimental.cards.Cards
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.components.experimental.cards.CardsModel
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.InvisibleCard.VotedCard.VOTED_CARD_STATE.PASSED
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class VotePass<InteractionTarget>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.bumble.appyx.components.experimental.cards.CardsModel
import com.bumble.appyx.components.experimental.cards.CardsModel.State.Card.InvisibleCard.VotedCard.VOTED_CARD_STATE.LIKED
import com.bumble.appyx.components.experimental.cards.operation.VoteLike
import com.bumble.appyx.components.experimental.cards.operation.VotePass
import com.bumble.appyx.interactions.AppyxLogger
import com.bumble.appyx.interactions.core.ui.context.TransitionBounds
import com.bumble.appyx.interactions.core.ui.context.UiContext
import com.bumble.appyx.interactions.core.ui.gesture.Drag
Expand All @@ -23,6 +22,7 @@ import com.bumble.appyx.interactions.core.ui.property.impl.Scale
import com.bumble.appyx.interactions.core.ui.property.impl.ZIndex
import com.bumble.appyx.interactions.core.ui.state.MatchedTargetUiState
import com.bumble.appyx.transitionmodel.BaseMotionController
import com.bumble.appyx.utils.multiplatform.AppyxLogger

class CardsMotionController<InteractionTarget : Any>(
uiContext: UiContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.bumble.appyx.components.modal

import com.bumble.appyx.interactions.Parcelable
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.Elements
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel
import com.bumble.appyx.interactions.core.state.SavedStateMap
import com.bumble.appyx.utils.multiplatform.Parcelable
import com.bumble.appyx.utils.multiplatform.Parcelize

class ModalModel<InteractionTarget : Any>(
initialElements: List<InteractionTarget>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.RawValue
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize
import com.bumble.appyx.utils.multiplatform.RawValue

@Parcelize
class Add<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Destroy<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Dismiss<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class FullScreen<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Revert<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.modal.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.modal.Modal
import com.bumble.appyx.components.modal.ModalModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Show<InteractionTarget : Any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import com.bumble.appyx.components.modal.operation.FullScreen
import com.bumble.appyx.components.modal.operation.Revert
import com.bumble.appyx.interactions.core.ui.context.TransitionBounds
import com.bumble.appyx.interactions.core.ui.context.UiContext
import com.bumble.appyx.interactions.core.ui.gesture.Gesture
import com.bumble.appyx.interactions.core.ui.gesture.dragVerticalDirection
import com.bumble.appyx.interactions.core.ui.gesture.Drag
import com.bumble.appyx.interactions.core.ui.gesture.Gesture
import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory
import com.bumble.appyx.interactions.core.ui.gesture.dragVerticalDirection
import com.bumble.appyx.interactions.core.ui.property.impl.Height
import com.bumble.appyx.interactions.core.ui.property.impl.Position
import com.bumble.appyx.interactions.core.ui.property.impl.RoundedCorners
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import com.bumble.appyx.components.experimental.promoter.Promoter
import com.bumble.appyx.components.experimental.promoter.PromoterModel
import com.bumble.appyx.components.experimental.promoter.operation.addFirst
import com.bumble.appyx.components.experimental.promoter.ui.PromoterMotionController
import com.bumble.appyx.interactions.sample.android.SampleChildren
import com.bumble.appyx.interactions.sample.android.Element
import com.bumble.appyx.interactions.sample.InteractionTarget
import com.bumble.appyx.interactions.sample.InteractionTarget.Child1
import com.bumble.appyx.interactions.sample.InteractionTarget.Child2
import com.bumble.appyx.interactions.sample.InteractionTarget.Child3
import com.bumble.appyx.interactions.sample.InteractionTarget.Child4
import com.bumble.appyx.interactions.sample.android.Element
import com.bumble.appyx.interactions.sample.android.SampleChildren


@ExperimentalMaterialApi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.bumble.appyx.components.experimental.promoter

import com.bumble.appyx.components.experimental.promoter.PromoterModel.State.ElementState.DESTROYED
import com.bumble.appyx.interactions.Parcelable
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel
import com.bumble.appyx.interactions.core.state.SavedStateMap
import com.bumble.appyx.utils.multiplatform.Parcelable
import com.bumble.appyx.utils.multiplatform.Parcelize

class PromoterModel<InteractionTarget : Any>(
savedStateMap: SavedStateMap?,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.bumble.appyx.components.experimental.promoter.operation

import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.RawValue
import com.bumble.appyx.components.experimental.promoter.Promoter
import com.bumble.appyx.components.experimental.promoter.PromoterModel
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.components.experimental.promoter.Promoter
import com.bumble.appyx.components.experimental.promoter.PromoterModel
import com.bumble.appyx.utils.multiplatform.Parcelize
import com.bumble.appyx.utils.multiplatform.RawValue

@Parcelize
data class AddFirst<InteractionTarget>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class Puzzle15(
it
)
},
gestureFactory: (TransitionBounds) -> GestureFactory<Tile, Puzzle15Model.State> = { bounds -> Puzzle15MotionController.Gestures(bounds) },
gestureFactory: (TransitionBounds) -> GestureFactory<Tile, Puzzle15Model.State> = { bounds ->
Puzzle15MotionController.Gestures(
bounds
)
},
animationSpec: AnimationSpec<Float> = spring(),
animateSettle: Boolean = false,
) : BaseAppyxComponent<Tile, Puzzle15Model.State>(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.bumble.appyx.components.experimental.puzzle15

import com.bumble.appyx.components.experimental.puzzle15.Puzzle15Model.Tile
import com.bumble.appyx.interactions.Parcelable
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.RawValue
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel
import com.bumble.appyx.interactions.core.state.SavedStateMap
import com.bumble.appyx.utils.multiplatform.Parcelable
import com.bumble.appyx.utils.multiplatform.Parcelize
import com.bumble.appyx.utils.multiplatform.RawValue

class Puzzle15Model(
savedStateMap: SavedStateMap?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.bumble.appyx.components.experimental.puzzle15.operation

import com.bumble.appyx.components.experimental.puzzle15.Puzzle15Model
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Shuffle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package com.bumble.appyx.components.experimental.puzzle15.operation

import com.bumble.appyx.components.experimental.puzzle15.Puzzle15Model
import com.bumble.appyx.components.experimental.puzzle15.Puzzle15Model.Tile
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
class Swap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,37 @@ fun Puzzle15Ui(
onClick = { puzzle15.operation(Swap(direction = DOWN)) },
colors = ButtonDefaults.buttonColors(backgroundColor = accentColor),
) {
Icon(imageVector = Icons.Default.KeyboardArrowUp, contentDescription = "Move Up")
Icon(
imageVector = Icons.Default.KeyboardArrowUp,
contentDescription = "Move Up"
)
}
Button(
onClick = { puzzle15.operation(Swap(direction = LEFT)) },
colors = ButtonDefaults.buttonColors(backgroundColor = accentColor),
) {
Icon(imageVector = Icons.Default.KeyboardArrowRight, contentDescription = "Move Right")
Icon(
imageVector = Icons.Default.KeyboardArrowRight,
contentDescription = "Move Right"
)
}
Button(
onClick = { puzzle15.operation(Swap(direction = UP)) },
colors = ButtonDefaults.buttonColors(backgroundColor = accentColor),
) {
Icon(imageVector = Icons.Default.KeyboardArrowDown, contentDescription = "Move Down")
Icon(
imageVector = Icons.Default.KeyboardArrowDown,
contentDescription = "Move Down"
)
}
Button(
onClick = { puzzle15.operation(Swap(direction = RIGHT)) },
colors = ButtonDefaults.buttonColors(backgroundColor = accentColor),
) {
Icon(imageVector = Icons.Default.KeyboardArrowLeft, contentDescription = "Move Left")
Icon(
imageVector = Icons.Default.KeyboardArrowLeft,
contentDescription = "Move Left"
)
}
}
Button(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<div>
<canvas id="ComposeTarget" width="512" height="512"></canvas>
</div>
<script src="puzzle15-web.js"> </script>
<script src="puzzle15-web.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ fun <InteractionTarget : Any> TestDriveUi(
modifier = Modifier
.size(60.dp)
.align(targetUiState.position.value.alignment)
.offset(targetUiState.position.value.offset.x, targetUiState.position.value.offset.y)
.offset(
targetUiState.position.value.offset.x,
targetUiState.position.value.offset.y
)
.border(2.dp, targetUiState.backgroundColor.value)
.semantics {
contentDescription = TEST_DRIVE_EXPERIMENT_TEST_HELPER
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.bumble.appyx.components.internal.testdrive

import com.bumble.appyx.components.internal.testdrive.TestDriveModel.State.ElementState.A
import com.bumble.appyx.interactions.Parcelable
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.Element
import com.bumble.appyx.interactions.core.asElement
import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel
import com.bumble.appyx.interactions.core.state.SavedStateMap
import com.bumble.appyx.utils.multiplatform.Parcelable
import com.bumble.appyx.utils.multiplatform.Parcelize

class TestDriveModel<InteractionTarget : Any>(
val element: InteractionTarget,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.internal.testdrive.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.internal.testdrive.TestDrive
import com.bumble.appyx.components.internal.testdrive.TestDriveModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
data class MoveTo<InteractionTarget>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.bumble.appyx.components.internal.testdrive.operation
import androidx.compose.animation.core.AnimationSpec
import com.bumble.appyx.components.internal.testdrive.TestDrive
import com.bumble.appyx.components.internal.testdrive.TestDriveModel
import com.bumble.appyx.interactions.Parcelize
import com.bumble.appyx.interactions.core.model.transition.BaseOperation
import com.bumble.appyx.interactions.core.model.transition.Operation
import com.bumble.appyx.utils.multiplatform.Parcelize

@Parcelize
data class Next<InteractionTarget>(
Expand Down
Loading