Skip to content

Commit

Permalink
Merge pull request #642 from zsoltk/renamings
Browse files Browse the repository at this point in the history
Renamings
  • Loading branch information
zsoltk authored Jan 12, 2024
2 parents c5017b5 + 4d6a0c4 commit 2527e74
Show file tree
Hide file tree
Showing 122 changed files with 677 additions and 540 deletions.
25 changes: 16 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

## Pending changes

{==

Please refer to [2.0.0-alpha10 – Migration guide](2.0.0-alpha10.md)

==}

### API breaking changes

- [#630](https://github.com/bumble-tech/appyx/pull/630) – Pass initial state into Spotlights visualisations
- [#642](https://github.com/bumble-tech/appyx/pull/642) – Renamings
- [#643](https://github.com/bumble-tech/appyx/pull/643) – Unify AppyxComponent composable between appyx-navigation and appyx-interactions modules
- [#651](https://github.com/bumble-tech/appyx/pull/651) - Keep only one instance of SaveStateMap typealias and moved it to `com.bumble.appyx.utils.multiplatform` package

Expand All @@ -18,8 +25,8 @@

### API breaking changes

- [#618](https://github.com/bumble-tech/appyx/pull/618) – Do not create PermanentAppyxComponent inside ParentNode. Provide it via constructor to ParentNode
- [#612](https://github.com/bumble-tech/appyx/pull/612) – Rename MotionController to Visualisation
- [#618](https://github.com/bumble-tech/appyx/pull/618) – Do not create `PermanentAppyxComponent` inside `ParentNode`. Provide it via constructor to ParentNode
- [#612](https://github.com/bumble-tech/appyx/pull/612) – Rename `MotionController` to `Visualisation`
- [#617](https://github.com/bumble-tech/appyx/pull/617) – Unify inside & outside position alignment

### Changed
Expand All @@ -39,7 +46,7 @@

### Fixed

- [#608](https://github.com/bumble-tech/appyx/pull/608) – Setting default value to NodeCustomisationDirectory in IosNodeHost
- [#608](https://github.com/bumble-tech/appyx/pull/608) – Setting default value to `NodeCustomisationDirectory` in `IosNodeHost`

<div style="text-align: center"><small>4 Oct 2023</small></div>

Expand All @@ -50,7 +57,7 @@
### Added

- [#601](https://github.com/bumble-tech/appyx/pull/601) – iOS support and target apps
- [#599](https://github.com/bumble-tech/appyx/pull/599) Added isContinuous flag to GestureFactory
- [#599](https://github.com/bumble-tech/appyx/pull/599) Added isContinuous flag to `GestureFactory`

<div style="text-align: center"><small>4 Oct 2023</small></div>

Expand Down Expand Up @@ -80,8 +87,8 @@
- [#587](https://github.com/bumble-tech/appyx/pull/587) – Fix `DraggableChildren` and rename it to `AppyxComponent`
- [#588](https://github.com/bumble-tech/appyx/pull/588) – Set bounds on all new motion controllers
- [#589](https://github.com/bumble-tech/appyx/pull/589) – Fix visibility resolution for elements that do not match parent's size
- [#591](https://github.com/bumble-tech/appyx/pull/591) – Flush output cache when onCreate is called in NodeConnector
- [#592](https://github.com/bumble-tech/appyx/pull/592) – Fix Backstack3D Motion Controller
- [#591](https://github.com/bumble-tech/appyx/pull/591) – Flush output cache when `onCreate` is called in `NodeConnector`
- [#592](https://github.com/bumble-tech/appyx/pull/592) – Fix `Backstack3D` `MotionController`

<div style="text-align: center"><small>13 Sep 2023</small></div>

Expand All @@ -101,8 +108,8 @@

### API breaking changes

- [#562](https://github.com/bumble-tech/appyx/issues/562) – Implement custom alignment to remove screen size knowledge when offsetting element in MotionController
- [#562](https://github.com/bumble-tech/appyx/pull/565) – Remove UiContext parameter from MotionProperty and provide BoxScope via composition local
- [#562](https://github.com/bumble-tech/appyx/issues/562) – Implement custom alignment to remove screen size knowledge when offsetting element in `MotionController`
- [#562](https://github.com/bumble-tech/appyx/pull/565) – Remove `UiContext` parameter from `MotionProperty` and provide `BoxScope` via composition local

### Added

Expand All @@ -122,7 +129,7 @@
### 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

### Fixed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import androidx.compose.ui.unit.dp
import com.bumble.appyx.components.experimental.cards.Cards
import com.bumble.appyx.components.experimental.cards.CardsModel
import com.bumble.appyx.components.experimental.cards.ui.CardsVisualisation
import com.bumble.appyx.interactions.core.AppyxComponent
import com.bumble.appyx.interactions.core.AppyxInteractionsContainer
import com.bumble.appyx.interactions.core.gesture.GestureValidator.Companion.permissiveValidator
import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup
import com.bumble.appyx.interactions.theme.appyx_dark
Expand All @@ -38,7 +38,7 @@ fun DatingCards(modifier: Modifier = Modifier) {

AppyxComponentSetup(cards)

AppyxComponent(
AppyxInteractionsContainer(
modifier = modifier
.fillMaxSize()
.background(appyx_dark)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import com.bumble.appyx.utils.multiplatform.AppyxLogger
class CardsVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
defaultAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, CardsModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, CardsModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = defaultAnimationSpec,
) {
Expand Down Expand Up @@ -98,7 +98,7 @@ class CardsVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)


class Gestures<InteractionTarget>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
@Suppress("MagicNumber")
class ModalVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
) : BaseVisualisation<InteractionTarget, ModalModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, ModalModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext
) {

Expand Down Expand Up @@ -65,7 +65,7 @@ class ModalVisualisation<InteractionTarget : Any>(
override fun mutableUiStateFor(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState = targetUiState.toMutableState(uiContext)
): MutableUiState = targetUiState.toMutableUiState(uiContext)

class Gestures<InteractionTarget : Any>(
transitionBounds: TransitionBounds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TargetUiState(
val corner: RoundedCorners.Target,
) {

fun toMutableState(
fun toMutableUiState(
uiContext: UiContext
): MutableUiState =
MutableUiState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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.PromoterVisualisation
import com.bumble.appyx.interactions.core.AppyxComponent
import com.bumble.appyx.interactions.core.AppyxInteractionsContainer
import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE
import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.KEYFRAME
import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup
Expand Down Expand Up @@ -74,7 +74,7 @@ fun PromoterExperiment(modifier: Modifier = Modifier) {
val screenWidthPx = (LocalConfiguration.current.screenWidthDp * density.density).roundToInt()
val screenHeightPx = (LocalConfiguration.current.screenHeightDp * density.density).roundToInt()

AppyxComponent(
AppyxInteractionsContainer(
appyxComponent = promoter,
modifier = Modifier
.weight(0.9f)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import kotlin.math.min
class PromoterVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
uiAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, PromoterModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, PromoterModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = uiAnimationSpec,
) {
Expand Down Expand Up @@ -52,7 +52,7 @@ class PromoterVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)

override fun updateBounds(transitionBounds: TransitionBounds) {
super.updateBounds(transitionBounds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
class Puzzle15Visualisation(
uiContext: UiContext,
defaultAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<Tile, Puzzle15Model.State, MutableUiState, TargetUiState>(
) : BaseVisualisation<Tile, Puzzle15Model.State, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = defaultAnimationSpec
) {
Expand Down Expand Up @@ -50,7 +50,7 @@ class Puzzle15Visualisation(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)

class Gestures(
bounds: TransitionBounds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import com.bumble.appyx.components.internal.testdrive.operation.next
import com.bumble.appyx.components.internal.testdrive.ui.rotation.TestDriveRotationVisualisation
import com.bumble.appyx.components.internal.testdrive.ui.rotation.TestDriveRotationVisualisation.Companion.toTargetUiState
import com.bumble.appyx.components.internal.testdrive.ui.simple.TestDriveSimpleVisualisation
import com.bumble.appyx.interactions.core.AppyxComponent
import com.bumble.appyx.interactions.core.AppyxInteractionsContainer
import com.bumble.appyx.interactions.core.gesture.GestureValidator
import com.bumble.appyx.interactions.core.gesture.GestureValidator.Companion.defaultValidator
import com.bumble.appyx.interactions.core.model.transition.Keyframes
Expand Down Expand Up @@ -134,7 +134,7 @@ fun <InteractionTarget : Any> TestDriveUi(
vertical = 12.dp
)
) {
AppyxComponent(
AppyxInteractionsContainer(
screenWidthPx = screenWidthPx,
screenHeightPx = screenHeightPx,
appyxComponent = testDrive,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.bumble.appyx.utils.multiplatform.AppyxLogger
class TestDriveRotationVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
uiAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, TestDriveModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, TestDriveModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = uiAnimationSpec,
) {
Expand Down Expand Up @@ -74,6 +74,6 @@ class TestDriveRotationVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)
}

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import com.bumble.appyx.utils.multiplatform.AppyxLogger
class TestDriveSimpleVisualisation<InteractionTarget : Any>(
uiContext: UiContext,
uiAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, TestDriveModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, TestDriveModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = uiAnimationSpec,
) {
Expand Down Expand Up @@ -81,7 +81,7 @@ class TestDriveSimpleVisualisation<InteractionTarget : Any>(
}

override fun mutableUiStateFor(uiContext: UiContext, targetUiState: TargetUiState): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)

class Gestures<InteractionTarget>(
private val transitionBounds: TransitionBounds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
class BackStackFader<InteractionTarget : Any>(
uiContext: UiContext,
defaultAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, BackStackModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, BackStackModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = defaultAnimationSpec,
) {
Expand All @@ -32,5 +32,5 @@ class BackStackFader<InteractionTarget : Any>(
}

override fun mutableUiStateFor(uiContext: UiContext, targetUiState: TargetUiState): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
class BackStackParallax<InteractionTarget : Any>(
uiContext: UiContext,
defaultAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = defaultAnimationSpec,
) {
Expand Down Expand Up @@ -76,7 +76,7 @@ class BackStackParallax<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)

class Gestures<InteractionTarget : Any>(
private val transitionBounds: TransitionBounds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation

class BackStackSlider<InteractionTarget : Any>(
uiContext: UiContext,
) : BaseVisualisation<InteractionTarget, BackStackModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, BackStackModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
) {

Expand Down Expand Up @@ -47,5 +47,5 @@ class BackStackSlider<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
class BackStack3D<InteractionTarget : Any>(
uiContext: UiContext,
private val itemsInStack: Int = 3,
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
) {

Expand Down Expand Up @@ -80,7 +80,7 @@ class BackStack3D<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)

class Gestures<InteractionTarget : Any>(
transitionBounds: TransitionBounds,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.bumble.appyx.transitionmodel.BaseVisualisation
class SpotlightFader<InteractionTarget : Any>(
uiContext: UiContext,
defaultAnimationSpec: SpringSpec<Float> = DefaultAnimationSpec
) : BaseVisualisation<InteractionTarget, SpotlightModel.State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, SpotlightModel.State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext,
defaultAnimationSpec = defaultAnimationSpec
) {
Expand Down Expand Up @@ -53,6 +53,6 @@ class SpotlightFader<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext)
targetUiState.toMutableUiState(uiContext)
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TargetUiState(
alpha = base.alpha,
)

fun toMutableState(
fun toMutableUiState(
uiContext: UiContext,
): MutableUiState =
MutableUiState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SpotlightSlider<InteractionTarget : Any>(
initialState: State<InteractionTarget>,
@Suppress("UnusedPrivateMember")
private val orientation: Orientation = Orientation.Horizontal, // TODO support RTL
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext
) {
private val scrollX = GenericFloatProperty(
Expand Down Expand Up @@ -84,7 +84,7 @@ class SpotlightSlider<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext, scrollX.renderValueFlow)
targetUiState.toMutableUiState(uiContext, scrollX.renderValueFlow)


class Gestures<InteractionTarget>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TargetUiState(
*
* TODO support RTL and Orientation.Vertical
*/
fun toMutableState(
fun toMutableUiState(
uiContext: UiContext,
scrollX: StateFlow<Float>
): MutableUiState =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SpotlightSliderRotation<InteractionTarget : Any>(
initialState: State<InteractionTarget>,
@Suppress("UnusedPrivateMember")
private val orientation: Orientation = Orientation.Horizontal, // TODO support RTL
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, MutableUiState, TargetUiState>(
) : BaseVisualisation<InteractionTarget, State<InteractionTarget>, TargetUiState, MutableUiState>(
uiContext = uiContext
) {
private val scrollX = GenericFloatProperty(
Expand Down Expand Up @@ -78,6 +78,6 @@ class SpotlightSliderRotation<InteractionTarget : Any>(
uiContext: UiContext,
targetUiState: TargetUiState
): MutableUiState =
targetUiState.toMutableState(uiContext, scrollX.renderValueFlow)
targetUiState.toMutableUiState(uiContext, scrollX.renderValueFlow)
}

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TargetUiState(
*
* TODO support RTL and Orientation.Vertical
*/
fun toMutableState(
fun toMutableUiState(
uiContext: UiContext,
scrollX: StateFlow<Float>
): MutableUiState {
Expand Down
Loading

0 comments on commit 2527e74

Please sign in to comment.