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

Refactor AppyxComponent and application of draggable modifier #644

Merged

Conversation

KovalevAndrey
Copy link
Collaborator

@KovalevAndrey KovalevAndrey commented Dec 18, 2023

Description

  1. AppyxComponent in appyx-interaction now takes lambda for drawing children composable. Transition container is applied inside so we clients don't need to apply it themselves. Lambda has only one parameter Element instead of ElementUiModel
  2. AppyxComponent in appyx-navigation takes lamda for decorating children composable UI. The UI itself is taken from Nodes. Lambda has only one parameter Element instead of ElementUiModel so we don't expose more than we should
  3. AppyxComponent how takes isGestureBoundingBoxTransformed which takes into consideration rotation of the element when applying draggable modifier.
  4. AppyxComponent considers if gestures are provided when applying gesture modifier

Check list

  • I have updated CHANGELOG.md if required.
  • I have updated documentation if required.

@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch from 634ddfa to e3aafe0 Compare December 19, 2023 09:19
@KovalevAndrey KovalevAndrey changed the title Do not apply gesture modifier if no gestures are supplied. Refactor A… Refactor AppyxComponent and application of draggable modifier Dec 19, 2023
@KovalevAndrey KovalevAndrey marked this pull request as ready for review December 19, 2023 09:29
}

@Composable
private fun <InteractionTarget : Any, ModelState : Any> ChildGestureSupportTransformBoundingBox(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point I'm not even sure if we need it

@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch from 0e27637 to 5d6e917 Compare December 19, 2023 15:09
@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch from 5d6e917 to 241bef0 Compare December 19, 2023 15:27
@KovalevAndrey KovalevAndrey added this to the 2.0 milestone Jan 3, 2024
@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch from 6c2b2c9 to a2bfcfe Compare January 11, 2024 14:36
@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch 2 times, most recently from 11810d0 to bc586ac Compare January 17, 2024 10:03
@KovalevAndrey KovalevAndrey force-pushed the 2.x-do-not-apply-if-no-gestures branch from bc586ac to 3f9a701 Compare January 17, 2024 10:24
@@ -50,6 +50,11 @@ import com.bumble.appyx.interactions.core.ui.property.motionPropertyRenderValue

private val defaultExtraTouch = 48f.dp

enum class GesturesRelation {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I'd extract this to a standalone file in the gestures package
  2. I'd rename to GesturesReferencePoint
  3. I'd provide some comments on what they do

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for consistency, probably use singular rather than plural, the same as everywhere else

@KovalevAndrey KovalevAndrey merged commit e097de6 into bumble-tech:2.x Jan 23, 2024
7 checks passed
@KovalevAndrey KovalevAndrey deleted the 2.x-do-not-apply-if-no-gestures branch January 23, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants