Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
* upstream/main: (27 commits)
  Update dependency com.slack.lint.compose:compose-lint-checks to v1.4.1 (slackhq#1692)
  Update kotlinInject.anvil to v0.0.5 (slackhq#1712)
  Update dependency MarkupSafe to v3 (slackhq#1713)
  Update dependency termcolor to v2.5.0 (slackhq#1709)
  Update roborazzi to v1.28.0 (slackhq#1708)
  Add passing tonal elevation to M3 Bottom Sheet (slackhq#1690)
  Update dependency fastlane to v2.224.0 (slackhq#1706)
  Update dependency com.github.ajalt.clikt:clikt to v5.0.1 (slackhq#1707)
  Update dependency com.google.testparameterinjector:test-parameter-injector to v1.18 (slackhq#1705)
  Update dependency co.touchlab.skie to v0.9.2 (slackhq#1703)
  Update dependency co.touchlab.skie to v0.9.1 (slackhq#1697)
  Update dependency androidx.profileinstaller:profileinstaller to v1.4.1 (slackhq#1696)
  Update dependency androidx.compose:compose-bom to v2024.09.03 (slackhq#1695)
  Update benchmark to v1.3.2 (slackhq#1694)
  Update dependency pymdown-extensions to v10.11.2 (slackhq#1689)
  Update roborazzi to v1.27.0 (slackhq#1693)
  Update agp to v8.7.0 (slackhq#1691)
  Update dependency mkdocs-material to v9.5.39 (slackhq#1687)
  [FIXED] Broken link navigation.md to overlays (slackhq#1688)
  Update dependency pymdown-extensions to v10.11 (slackhq#1685)
  ...
  • Loading branch information
dturner committed Oct 9, 2024
2 parents b32c506 + 4fd7d3a commit 56abdf7
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mkdocs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Jinja2==3.1.4
livereload==2.7.0
lunr==0.7.0.post1
Markdown==3.7
MarkupSafe==2.1.5
MarkupSafe==3.0.0
mkdocs==1.6.1
mkdocs-macros-plugin==1.2.0
mkdocs-material==9.5.36
mkdocs-material==9.5.39
mkdocs-material-extensions==1.3.1
Pygments==2.18.0
pymdown-extensions==10.10.1
pymdown-extensions==10.11.2
python-dateutil==2.9.0.post0
PyYAML==6.0.2
repackage==0.7.3
six==1.16.0
termcolor==2.4.0
termcolor==2.5.0
tornado==6.4.1
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changelog

**Unreleased**
--------------
- **New**: Pass `tonalElevation` to `BottomSheetOverlay` so that is reflected in `ModalBottomSheet`.

0.24.0
------
Expand Down
40 changes: 19 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.958.0)
aws-sdk-core (3.201.3)
aws-partitions (1.985.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.0)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand All @@ -38,8 +38,8 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.111.0)
faraday (1.10.3)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -65,10 +65,10 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.222.0)
fastlane (2.224.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -127,7 +127,7 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
Expand All @@ -148,12 +148,12 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.6)
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.2)
jwt (2.9.3)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
Expand All @@ -172,8 +172,7 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.9)
strscan
rexml (3.3.8)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -186,7 +185,6 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -196,15 +194,15 @@ GEM
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public actual fun GestureNavigationDecoration(
else -> fallback
}

@Suppress("SlotReused") // This is an advanced use case
@RequiresApi(34)
public class AndroidPredictiveBackNavigationDecoration(private val onBackInvoked: () -> Unit) :
NavDecoration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.slack.circuit.foundation.internal.BackHandler
import com.slack.circuit.overlay.Overlay
Expand Down Expand Up @@ -49,6 +50,7 @@ private constructor(
private val onDismiss: (() -> Result)?,
private val sheetShape: Shape?,
private val sheetContainerColor: Color?,
private val tonalElevation: Dp?,
private val dragHandle: (@Composable () -> Unit)?,
private val skipPartiallyExpandedState: Boolean,
private val properties: ModalBottomSheetProperties,
Expand All @@ -70,6 +72,7 @@ private constructor(
public constructor(
model: Model,
sheetContainerColor: Color? = null,
tonalElevation: Dp? = null,
sheetShape: Shape? = null,
dragHandle: @Composable (() -> Unit)? = null,
skipPartiallyExpandedState: Boolean = false,
Expand All @@ -82,6 +85,7 @@ private constructor(
dragHandle = dragHandle,
sheetShape = sheetShape,
sheetContainerColor = sheetContainerColor,
tonalElevation = tonalElevation,
skipPartiallyExpandedState = skipPartiallyExpandedState,
properties =
createBottomSheetProperties(isFocusable = isFocusable, shouldDismissOnBackPress = false),
Expand All @@ -104,6 +108,7 @@ private constructor(
model: Model,
onDismiss: (() -> Result),
sheetContainerColor: Color? = null,
tonalElevation: Dp? = null,
sheetShape: Shape? = null,
dragHandle: @Composable (() -> Unit)? = null,
skipPartiallyExpandedState: Boolean = false,
Expand All @@ -116,6 +121,7 @@ private constructor(
dragHandle = dragHandle,
sheetShape = sheetShape,
sheetContainerColor = sheetContainerColor,
tonalElevation = tonalElevation,
skipPartiallyExpandedState = skipPartiallyExpandedState,
properties = properties,
content = content,
Expand Down Expand Up @@ -161,6 +167,7 @@ private constructor(
sheetState = sheetState,
shape = sheetShape ?: RoundedCornerShape(32.dp),
containerColor = sheetContainerColor ?: BottomSheetDefaults.ContainerColor,
tonalElevation = tonalElevation ?: 0.dp,
dragHandle = dragHandle ?: { BottomSheetDefaults.DragHandle() },
// Go edge-to-edge
windowInsets = WindowInsets(0, 0, 0, 0),
Expand Down
2 changes: 1 addition & 1 deletion docs/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TakePhotoPresenter {
Circuit automatically manages saving/restoring result states and ensuring that results are only delivered to the original receiver that requested it. If the target screen does not pop back a result, the previous screen's receiver will just never receive one.

!!! note "When to use an `Overlay` vs navigating to a `Screen` with result?"
See this doc in [Overlays](https://slackhq.github.io/circuit/overlays/overlays/#overlay-vs-popresult)!
See this doc in [Overlays](https://slackhq.github.io/circuit/overlays/#overlay-vs-popresult)!

## Nested Navigation

Expand Down
22 changes: 11 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ androidx-annotation = "1.8.2"
androidx-appcompat = "1.7.0"
androidx-browser = "1.8.0"
androidx-lifecycle = "2.8.6"
agp = "8.6.1"
agp = "8.7.0"
anvil = "0.3.1"
atomicfu = "0.25.0"
benchmark = "1.3.1"
benchmark = "1.3.2"
coil = "2.7.0"
coil3 = "3.0.0-alpha10"
compose-animation = "1.6.8"
Expand All @@ -30,7 +30,7 @@ publishedJvmTarget = "1.8"
kct = "0.5.1"
kotlin = "2.0.20"
kotlinInject = "0.7.2"
kotlinInject-anvil = "0.0.4"
kotlinInject-anvil = "0.0.5"
kotlinpoet = "1.18.1"
kotlinx-coroutines = "1.9.0"
kotlinx-serialization = "1.7.3"
Expand All @@ -47,12 +47,12 @@ okio = "3.9.1"
paparazzi = "1.3.4"
picnic = "0.7.0"
robolectric = "4.13"
roborazzi = "1.26.0"
skie = "0.9.0-RC.5"
roborazzi = "1.28.0"
skie = "0.9.2"
spotless = "7.0.0.BETA2"
sqldelight = "2.0.2"
telephoto = "0.13.0"
testParameterInjector = "1.17"
testParameterInjector = "1.18"
turbine = "1.1.0"
versionsPlugin = "0.49.0"

Expand Down Expand Up @@ -107,7 +107,7 @@ androidx-compose-accompanist-placeholder = { module = "com.google.accompanist:ac
androidx-compose-accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
androidx-compose-accompanist-systemUi = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
androidx-compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-animation" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version = "2024.09.02" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version = "2024.09.03" }
# Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-foundation" }
androidx-compose-googleFonts = { module = "androidx.compose.ui:ui-text-google-fonts", version.ref = "compose-ui" }
Expand Down Expand Up @@ -147,7 +147,7 @@ androidx-lifecycle-viewModel = { module = "androidx.lifecycle:lifecycle-viewmode
androidx-lifecycle-viewModel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" }
# Force a newer version of androidx.loader because Espresso depends on an old and wrong version of it
androidx-loader = "androidx.loader:loader:1.1.0"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.0"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.1"
androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.6.1"
androidx-test-ext-junit = "androidx.test.ext:junit:1.2.1"
androidx-test-monitor = "androidx.test:monitor:1.7.2"
Expand All @@ -167,7 +167,7 @@ autoService-ksp = { module = "dev.zacsweers.autoservice:auto-service-ksp", versi

baselineProfilePlugin = { module = "androidx.benchmark:benchmark-baseline-profile-gradle-plugin", version.ref = "benchmark" }

clikt = "com.github.ajalt.clikt:clikt:5.0.0"
clikt = "com.github.ajalt.clikt:clikt:5.0.1"

coil = { module = "io.coil-kt:coil", version.ref = "coil" }
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
Expand Down Expand Up @@ -232,7 +232,7 @@ kotlinInject-anvil-runtime-optional = { module = "software.amazon.lastmile.kotli

kotlinx-serialization-json-okio = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-okio", version.ref = "kotlinx-serialization" }

ksoup = "com.fleeksoft.ksoup:ksoup-ktor2:0.1.8"
ksoup = "com.fleeksoft.ksoup:ksoup-ktor2:0.1.9"

ksp = { module = "com.google.devtools.ksp:symbol-processing", version.ref = "ksp" }
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
Expand All @@ -249,7 +249,7 @@ ktor-serialization-json = { module = "io.ktor:ktor-serialization-kotlinx-json",
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanary" }
leakcanary-android-instrumentation = { module = "com.squareup.leakcanary:leakcanary-android-instrumentation", version.ref = "leakcanary" }

lints-compose = "com.slack.lint.compose:compose-lint-checks:1.3.1"
lints-compose = "com.slack.lint.compose:compose-lint-checks:1.4.1"

material = "com.google.android.material:material:1.12.0"

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import software.amazon.lastmile.kotlin.inject.anvil.MergeComponent
import software.amazon.lastmile.kotlin.inject.anvil.SingleIn

@Component
@MergeComponent
@MergeComponent(AppScope::class)
@SingleIn(AppScope::class)
abstract class AppComponent : AppComponentMerged {
abstract val kotlinInjectApp: KotlinInjectApp
abstract val presenterFactories: Set<Presenter.Factory>
abstract val uiFactories: Set<Ui.Factory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import com.slack.circuit.codegen.annotations.CircuitInject
import com.slack.circuit.foundation.Circuit
import com.slack.circuit.foundation.CircuitCompositionLocals
import com.slack.circuit.foundation.CircuitContent
import com.slack.circuit.runtime.CircuitUiState
Expand All @@ -18,12 +19,18 @@ import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import software.amazon.lastmile.kotlin.inject.anvil.AppScope

typealias KotlinInjectApp = @Composable () -> Unit

fun main() = application {
val circuit = remember { AppComponent::class.create().circuit }
val app = remember { AppComponent::class.create().kotlinInjectApp }

Window(onCloseRequest = ::exitApplication, title = "Sample") {
CircuitCompositionLocals(circuit) { CircuitContent(MyScreen("Circuit")) }
}
Window(onCloseRequest = ::exitApplication, title = "Sample") { app() }
}

@Inject
@Composable
fun KotlinInjectApp(circuit: Circuit) {
CircuitCompositionLocals(circuit) { CircuitContent(MyScreen("Circuit")) }
}

@CircuitInject(MyScreen::class, AppScope::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.slack.circuit.foundation.Circuit
import com.slack.circuit.runtime.presenter.Presenter
import com.slack.circuit.runtime.ui.Ui
import com.squareup.anvil.annotations.ContributesTo
import com.squareup.anvil.annotations.optional.SingleIn
import dagger.Module
import dagger.Provides
import dagger.multibindings.Multibinds
Expand All @@ -18,6 +19,7 @@ interface CircuitModule {
@Multibinds fun viewFactories(): Set<Ui.Factory>

companion object {
@SingleIn(AppScope::class)
@Provides
fun provideCircuit(
presenterFactories: @JvmSuppressWildcards Set<Presenter.Factory>,
Expand Down

0 comments on commit 56abdf7

Please sign in to comment.