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

Draw background only on action box #5

Merged
merged 3 commits into from
May 5, 2022

Conversation

alashow
Copy link
Contributor

@alashow alashow commented May 1, 2022

Not sure if this is best implementation but it's working.

Resolves #4

Also fixes #2

@alashow
Copy link
Contributor Author

alashow commented May 1, 2022

Couldn't run/check paparazzi tests because it's not working on my machine, throwing this error:

SEVERE: broken: Native layoutlib failed to load
java.lang.UnsatisfiedLinkError: Can't load library: /Users/alashov/.gradle/caches/transforms-3/ea0b7f66c989590baafb23b3b92901e4/transformed/layoutlib-native-macarm-2021.1.1-573f070/data/mac/lib64/libandroid_runtime.dylib

Seems like related to cashapp/paparazzi#375

@saket
Copy link
Owner

saket commented May 4, 2022

Let me see if I can paparazzi work again. Done on trunk!

Copy link
Owner

@saket saket left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

I added snapshot tests and removed 357f3c9 because it was a breaking change.

@@ -51,7 +51,7 @@ fun SwipeableActionsBox(
startActions: List<SwipeAction> = emptyList(),
endActions: List<SwipeAction> = emptyList(),
swipeThreshold: Dp = 40.dp,
backgroundUntilSwipeThreshold: Color = Color.DarkGray,
backgroundUntilSwipeThreshold: Color = Color.Transparent,
Copy link
Owner

Choose a reason for hiding this comment

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

I'd leave this as-is, mostly because this would be a breaking change for existing usages.

@saket
Copy link
Owner

saket commented May 5, 2022

Uhhh my changes aren't showing up on your branch. Trying again…

@saket saket force-pushed the berkeli/draw-over-action-box-only branch 3 times, most recently from e13c2ac to a460e89 Compare May 5, 2022 04:31
@saket saket merged commit 60029eb into saket:trunk May 5, 2022
@alashow alashow deleted the berkeli/draw-over-action-box-only branch September 6, 2022 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for content without background NPE when swiping on the side without actions
2 participants