diff --git a/app/dependencies/releaseRuntimeClasspath.txt b/app/dependencies/releaseRuntimeClasspath.txt index 17991f14..8c008d3a 100644 --- a/app/dependencies/releaseRuntimeClasspath.txt +++ b/app/dependencies/releaseRuntimeClasspath.txt @@ -11,45 +11,45 @@ androidx.autofill:autofill:1.0.0 androidx.collection:collection-jvm:1.4.0 androidx.collection:collection-ktx:1.4.0 androidx.collection:collection:1.4.0 -androidx.compose.animation:animation-android:1.7.0-beta06 -androidx.compose.animation:animation-core-android:1.7.0-beta06 -androidx.compose.animation:animation-core:1.7.0-beta06 -androidx.compose.animation:animation:1.7.0-beta06 -androidx.compose.foundation:foundation-android:1.7.0-beta06 -androidx.compose.foundation:foundation-layout-android:1.7.0-beta06 -androidx.compose.foundation:foundation-layout:1.7.0-beta06 -androidx.compose.foundation:foundation:1.7.0-beta06 -androidx.compose.material3.adaptive:adaptive-android:1.0.0-beta04 -androidx.compose.material3.adaptive:adaptive:1.0.0-beta04 -androidx.compose.material3:material3-adaptive-navigation-suite-android:1.3.0-beta05 -androidx.compose.material3:material3-adaptive-navigation-suite:1.3.0-beta05 -androidx.compose.material3:material3-android:1.3.0-beta05 -androidx.compose.material3:material3:1.3.0-beta05 -androidx.compose.material:material-icons-core-android:1.6.8 -androidx.compose.material:material-icons-core:1.6.8 -androidx.compose.material:material-icons-extended-android:1.6.8 -androidx.compose.material:material-icons-extended:1.6.8 -androidx.compose.material:material-ripple-android:1.7.0-beta02 -androidx.compose.material:material-ripple:1.7.0-beta02 -androidx.compose.runtime:runtime-android:1.7.0-beta06 -androidx.compose.runtime:runtime-saveable-android:1.7.0-beta06 -androidx.compose.runtime:runtime-saveable:1.7.0-beta06 -androidx.compose.runtime:runtime:1.7.0-beta06 -androidx.compose.ui:ui-android:1.7.0-beta06 -androidx.compose.ui:ui-geometry-android:1.7.0-beta06 -androidx.compose.ui:ui-geometry:1.7.0-beta06 -androidx.compose.ui:ui-graphics-android:1.7.0-beta06 -androidx.compose.ui:ui-graphics:1.7.0-beta06 -androidx.compose.ui:ui-text-android:1.7.0-beta06 -androidx.compose.ui:ui-text:1.7.0-beta06 -androidx.compose.ui:ui-tooling-preview-android:1.7.0-beta06 -androidx.compose.ui:ui-tooling-preview:1.7.0-beta06 -androidx.compose.ui:ui-unit-android:1.7.0-beta06 -androidx.compose.ui:ui-unit:1.7.0-beta06 -androidx.compose.ui:ui-util-android:1.7.0-beta06 -androidx.compose.ui:ui-util:1.7.0-beta06 -androidx.compose.ui:ui:1.7.0-beta06 -androidx.compose:compose-bom:2024.06.00 +androidx.compose.animation:animation-android:1.7.0 +androidx.compose.animation:animation-core-android:1.7.0 +androidx.compose.animation:animation-core:1.7.0 +androidx.compose.animation:animation:1.7.0 +androidx.compose.foundation:foundation-android:1.7.0 +androidx.compose.foundation:foundation-layout-android:1.7.0 +androidx.compose.foundation:foundation-layout:1.7.0 +androidx.compose.foundation:foundation:1.7.0 +androidx.compose.material3.adaptive:adaptive-android:1.0.0 +androidx.compose.material3.adaptive:adaptive:1.0.0 +androidx.compose.material3:material3-adaptive-navigation-suite-android:1.3.0 +androidx.compose.material3:material3-adaptive-navigation-suite:1.3.0 +androidx.compose.material3:material3-android:1.3.0 +androidx.compose.material3:material3:1.3.0 +androidx.compose.material:material-icons-core-android:1.7.0 +androidx.compose.material:material-icons-core:1.7.0 +androidx.compose.material:material-icons-extended-android:1.7.0 +androidx.compose.material:material-icons-extended:1.7.0 +androidx.compose.material:material-ripple-android:1.7.0 +androidx.compose.material:material-ripple:1.7.0 +androidx.compose.runtime:runtime-android:1.7.0 +androidx.compose.runtime:runtime-saveable-android:1.7.0 +androidx.compose.runtime:runtime-saveable:1.7.0 +androidx.compose.runtime:runtime:1.7.0 +androidx.compose.ui:ui-android:1.7.0 +androidx.compose.ui:ui-geometry-android:1.7.0 +androidx.compose.ui:ui-geometry:1.7.0 +androidx.compose.ui:ui-graphics-android:1.7.0 +androidx.compose.ui:ui-graphics:1.7.0 +androidx.compose.ui:ui-text-android:1.7.0 +androidx.compose.ui:ui-text:1.7.0 +androidx.compose.ui:ui-tooling-preview-android:1.7.0 +androidx.compose.ui:ui-tooling-preview:1.7.0 +androidx.compose.ui:ui-unit-android:1.7.0 +androidx.compose.ui:ui-unit:1.7.0 +androidx.compose.ui:ui-util-android:1.7.0 +androidx.compose.ui:ui-util:1.7.0 +androidx.compose.ui:ui:1.7.0 +androidx.compose:compose-bom:2024.09.00 androidx.concurrent:concurrent-futures:1.1.0 androidx.core:core-ktx:1.13.1 androidx.core:core-splashscreen:1.0.1 @@ -106,9 +106,9 @@ androidx.vectordrawable:vectordrawable:1.1.0 androidx.versionedparcelable:versionedparcelable:1.1.1 androidx.viewpager:viewpager:1.0.0 androidx.window.extensions.core:core:1.0.0 -androidx.window:window-core-android:1.3.0-rc01 -androidx.window:window-core:1.3.0-rc01 -androidx.window:window:1.3.0-rc01 +androidx.window:window-core-android:1.3.0 +androidx.window:window-core:1.3.0 +androidx.window:window:1.3.0 com.google.accompanist:accompanist-drawablepainter:0.32.0 com.google.android.gms:play-services-base:18.0.1 com.google.android.gms:play-services-basement:18.3.0 diff --git a/core/design-system/build.gradle.kts b/core/design-system/build.gradle.kts index a56b77c0..f4699e0b 100644 --- a/core/design-system/build.gradle.kts +++ b/core/design-system/build.gradle.kts @@ -37,7 +37,6 @@ dependencies { api(libs.androidx.compose.foundation) api(libs.androidx.compose.foundation.layout) api(libs.androidx.compose.material3) - api(libs.androidx.compose.material3.adaptive) api(libs.androidx.compose.material.iconsExtended) api(libs.androidx.compose.runtime) api(libs.androidx.compose.ui.util) @@ -50,6 +49,4 @@ dependencies { testImplementation(libs.robolectric) testImplementation(libs.roborazzi) testImplementation(projects.core.screenshotTesting) - - androidTestImplementation(libs.androidx.compose.ui.test) } \ No newline at end of file diff --git a/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/ProgressIndicator.kt b/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/ProgressIndicator.kt index 274d3cd1..2b1c35bc 100644 --- a/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/ProgressIndicator.kt +++ b/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/ProgressIndicator.kt @@ -1,3 +1,20 @@ +/* + * + * Copyright 2023 Einstein Blanco + * + * Licensed under the GNU General Public License v3.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ package com.eblan.socialworkreviewer.core.designsystem.component import androidx.compose.material3.LinearProgressIndicator @@ -22,4 +39,4 @@ fun SwrLinearProgressIndicator( trackColor = trackColor, strokeCap = strokeCap, ) -} \ No newline at end of file +} diff --git a/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/TopBar.kt b/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/TopBar.kt index 79e1ee34..d5dbc2d9 100644 --- a/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/TopBar.kt +++ b/core/design-system/src/main/kotlin/com/eblan/socialworkreviewer/core/designsystem/component/TopBar.kt @@ -1,3 +1,20 @@ +/* + * + * Copyright 2023 Einstein Blanco + * + * Licensed under the GNU General Public License v3.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ package com.eblan.socialworkreviewer.core.designsystem.component import androidx.compose.foundation.layout.RowScope @@ -10,7 +27,6 @@ import androidx.compose.material3.TopAppBarScrollBehavior import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier - @OptIn(ExperimentalMaterial3Api::class) @Composable fun SwrLargeTopAppBar( @@ -31,4 +47,4 @@ fun SwrLargeTopAppBar( colors = colors, scrollBehavior = scrollBehavior, ) -} \ No newline at end of file +} diff --git a/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ProgressIndicatorScreenshotTests.kt b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ProgressIndicatorScreenshotTests.kt index ed9a480a..903ce225 100644 --- a/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ProgressIndicatorScreenshotTests.kt +++ b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ProgressIndicatorScreenshotTests.kt @@ -1,3 +1,20 @@ +/* + * + * Copyright 2023 Einstein Blanco + * + * Licensed under the GNU General Public License v3.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ package com.eblan.socialworkreviewer.core.designsystem import androidx.activity.ComponentActivity @@ -30,4 +47,4 @@ class ProgressIndicatorScreenshotTests { ) } } -} \ No newline at end of file +} diff --git a/core/design-system/src/androidTest/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt similarity index 98% rename from core/design-system/src/androidTest/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt rename to core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt index 3995eae1..11216f78 100644 --- a/core/design-system/src/androidTest/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt +++ b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/ThemeTest.kt @@ -33,6 +33,8 @@ import com.eblan.socialworkreviewer.core.designsystem.theme.LightPurpleColorSche import com.eblan.socialworkreviewer.core.designsystem.theme.SwrTheme import org.junit.Rule import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner import kotlin.test.assertEquals /** @@ -41,6 +43,7 @@ import kotlin.test.assertEquals * * It verifies that the various composition locals — [MaterialTheme] and design system. */ +@RunWith(RobolectricTestRunner::class) class ThemeTest { @get:Rule diff --git a/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/TopAppBarScreenshotTests.kt b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/TopAppBarScreenshotTests.kt index a2f9d819..d137728f 100644 --- a/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/TopAppBarScreenshotTests.kt +++ b/core/design-system/src/test/kotlin/com/eblan/socialworkreviewer/core/designsystem/TopAppBarScreenshotTests.kt @@ -1,3 +1,20 @@ +/* + * + * Copyright 2023 Einstein Blanco + * + * Licensed under the GNU General Public License v3.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ package com.eblan.socialworkreviewer.core.designsystem import androidx.activity.ComponentActivity @@ -8,10 +25,13 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.graphics.Brush import androidx.compose.ui.platform.LocalInspectionMode +import androidx.compose.ui.test.DeviceConfigurationOverride +import androidx.compose.ui.test.FontScale import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.compose.ui.test.onRoot import com.eblan.socialworkreviewer.core.designsystem.component.SwrLargeTopAppBar import com.eblan.socialworkreviewer.core.designsystem.theme.LocalGradientColors +import com.eblan.socialworkreviewer.core.designsystem.theme.SwrTheme import com.eblan.socialworkreviewer.core.screenshottesting.util.DefaultRoborazziOptions import com.eblan.socialworkreviewer.core.screenshottesting.util.captureMultiTheme import com.github.takahirom.roborazzi.captureRoboImage @@ -23,9 +43,6 @@ import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config import org.robolectric.annotation.GraphicsMode import org.robolectric.annotation.LooperMode -import androidx.compose.ui.test.DeviceConfigurationOverride -import androidx.compose.ui.test.FontScale -import com.eblan.socialworkreviewer.core.designsystem.theme.SwrTheme @OptIn(ExperimentalMaterial3Api::class) @RunWith(RobolectricTestRunner::class) @@ -60,7 +77,7 @@ class TopAppBarScreenshotTests { } } composeTestRule.onRoot().captureRoboImage( - "src/test/screenshots/TopAppBar/TopAppBar_fontScale2.png", + "src/test/screenshots/LargeTopAppBar/LargeTopAppBar_fontScale2.png", roborazziOptions = DefaultRoborazziOptions, ) } @@ -80,4 +97,4 @@ class TopAppBarScreenshotTests { }, ) } -} \ No newline at end of file +} diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicDarkTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicDarkTheme.png new file mode 100644 index 00000000..8303a209 Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicTheme.png new file mode 100644 index 00000000..c1f1974e Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarDynamicTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenDarkTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenDarkTheme.png new file mode 100644 index 00000000..19968267 Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenTheme.png new file mode 100644 index 00000000..798ed86d Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarGreenTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleDarkTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleDarkTheme.png new file mode 100644 index 00000000..9943d1b6 Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleTheme.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleTheme.png new file mode 100644 index 00000000..a6b74e7c Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBarPurpleTheme.png differ diff --git a/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBar_fontScale2.png b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBar_fontScale2.png new file mode 100644 index 00000000..8d078167 Binary files /dev/null and b/core/design-system/src/test/screenshots/LargeTopAppBar/LargeTopAppBar_fontScale2.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_115.png b/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_115.png index a359e5ee..b81dbd38 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_115.png and b/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_115.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_20.png b/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_20.png index a509cfdf..ce905c21 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_20.png and b/core/design-system/src/test/screenshots/LoadingWheel/LoadingWheel_animation_20.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicDarkTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicDarkTheme.png index f4f478cc..a8eaa30f 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicDarkTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicTheme.png index 2a5d017a..8366e7ff 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelDynamicTheme.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenDarkTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenDarkTheme.png index 72a3ad7f..82e47389 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenDarkTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenTheme.png index 1aac765a..4404c029 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelGreenTheme.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleDarkTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleDarkTheme.png index 922fb3c9..147fb3b5 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleDarkTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleTheme.png b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleTheme.png index 8f38ca85..59ccb7b6 100644 Binary files a/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleTheme.png and b/core/design-system/src/test/screenshots/LoadingWheel/OverlayLoadingWheelPurpleTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicDarkTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicDarkTheme.png new file mode 100644 index 00000000..9c3f963a Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicTheme.png new file mode 100644 index 00000000..c642f9e5 Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorDynamicTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenDarkTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenDarkTheme.png new file mode 100644 index 00000000..665aa660 Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenTheme.png new file mode 100644 index 00000000..039066b3 Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorGreenTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleDarkTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleDarkTheme.png new file mode 100644 index 00000000..bd3a3168 Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleDarkTheme.png differ diff --git a/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleTheme.png b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleTheme.png new file mode 100644 index 00000000..d0db515c Binary files /dev/null and b/core/design-system/src/test/screenshots/ProgressIndicator/ProgressIndicatorPurpleTheme.png differ diff --git a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/CorrectChoicesScreen.kt b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/CorrectChoicesScreen.kt index fadc08b2..3bccef98 100644 --- a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/CorrectChoicesScreen.kt +++ b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/CorrectChoicesScreen.kt @@ -116,7 +116,6 @@ internal fun CorrectChoicesScreen( modifier = modifier.testTag("correctChoices:largeTopAppBar"), scrollBehavior = scrollBehavior, ) - }, ) { paddingValues -> Column( @@ -222,13 +221,17 @@ private fun CorrectChoicesSelection( val wrongChoice = isCurrentQuestion && choice !in correctChoices && choice in selectedChoices - val choiceBrush = if (correctChoice) { - Brush.linearGradient( - colors = greenGradientColors, - ) + val choiceBorderGradientColors = if (correctChoice) { + greenGradientColors } else if (wrongChoice) { + redGradientColors + } else { + emptyList() + } + + val choiceBrush = if (choiceBorderGradientColors.isNotEmpty()) { Brush.linearGradient( - colors = redGradientColors, + colors = choiceBorderGradientColors, ) } else { CardDefaults.outlinedCardBorder().brush @@ -237,7 +240,10 @@ private fun CorrectChoicesSelection( OutlinedCard( onClick = {}, modifier = Modifier.fillMaxWidth(), - border = BorderStroke(width = 2.dp, brush = choiceBrush), + border = BorderStroke( + width = 2.dp, + brush = choiceBrush, + ), ) { Box( modifier = Modifier diff --git a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuestionScreen.kt b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuestionScreen.kt index 86e5cd9c..c061719f 100644 --- a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuestionScreen.kt +++ b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuestionScreen.kt @@ -76,6 +76,7 @@ import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.StrokeCap import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.testTag @@ -318,7 +319,6 @@ private fun Questions( modifier = modifier.testTag("question:largeTopAppBar"), scrollBehavior = scrollBehavior, ) - }, snackbarHost = { SnackbarHost(hostState = snackbarHostState) @@ -356,6 +356,11 @@ private fun Questions( progress = { animatedProgress }, + modifier = modifier + .fillMaxWidth() + .height(30.dp) + .padding(10.dp), + strokeCap = StrokeCap.Round, ) HorizontalPager( @@ -507,9 +512,15 @@ private fun QuestionChoicesSelection( choices.forEach { choice -> val selectedChoice = isCurrentQuestion && choice in selectedChoices - val selectedChoiceBrush = if (selectedChoice) { + val choiceBorderGradientColors = if (selectedChoice) { + greenGradientColors + } else { + emptyList() + } + + val choiceBrush = if (choiceBorderGradientColors.isNotEmpty()) { Brush.linearGradient( - colors = greenGradientColors, + colors = choiceBorderGradientColors, ) } else { CardDefaults.outlinedCardBorder().brush @@ -542,7 +553,10 @@ private fun QuestionChoicesSelection( scaleY = choiceAnimation.value } }, - border = BorderStroke(width = 2.dp, brush = selectedChoiceBrush), + border = BorderStroke( + width = 2.dp, + brush = choiceBrush, + ), ) { Box( modifier = Modifier diff --git a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuickQuestionScreen.kt b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuickQuestionScreen.kt index 9859bc1a..4fa6819e 100644 --- a/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuickQuestionScreen.kt +++ b/feature/question/src/main/kotlin/com/eblan/socialworkreviewer/feature/question/screen/QuickQuestionScreen.kt @@ -253,17 +253,19 @@ private fun QuickQuestionChoicesSelection( val wrongChoice = isCurrentQuestion && selectedChoiceSizeLimit && choice !in correctChoices && choice in selectedChoices - val choiceBrush = if (selectedChoice && correctChoice) { - Brush.linearGradient( - colors = greenGradientColors, - ) + val choiceBorderGradientColors = if (selectedChoice && correctChoice) { + greenGradientColors } else if (correctChoice) { - Brush.linearGradient( - colors = greenGradientColors, - ) + greenGradientColors } else if (wrongChoice) { + redGradientColors + } else { + emptyList() + } + + val choiceBrush = if (choiceBorderGradientColors.isNotEmpty()) { Brush.linearGradient( - colors = redGradientColors, + colors = choiceBorderGradientColors, ) } else { CardDefaults.outlinedCardBorder().brush @@ -310,7 +312,10 @@ private fun QuickQuestionChoicesSelection( scaleY = correctChoiceAnimation.value } }, - border = BorderStroke(width = 2.dp, brush = choiceBrush), + border = BorderStroke( + width = 2.dp, + brush = choiceBrush, + ), ) { Box( modifier = Modifier diff --git a/feature/question/src/test/kotlin/com/eblan/socialworkreviewer/feature/question/QuestionViewModelTest.kt b/feature/question/src/test/kotlin/com/eblan/socialworkreviewer/feature/question/QuestionViewModelTest.kt index eaf87865..3514aaa2 100644 --- a/feature/question/src/test/kotlin/com/eblan/socialworkreviewer/feature/question/QuestionViewModelTest.kt +++ b/feature/question/src/test/kotlin/com/eblan/socialworkreviewer/feature/question/QuestionViewModelTest.kt @@ -113,6 +113,12 @@ class QuestionViewModelTest { fun currentQuestionData_isEmpty_whenStarted() = runTest { assertEquals( expected = QuestionData( + question = Question( + question = "", + correctChoices = emptyList(), + wrongChoices = emptyList(), + choices = emptyList(), + ), selectedChoices = emptyList(), questionsWithSelectedChoices = emptyMap(), answeredQuestions = emptyList(), diff --git a/feature/settings/src/test/screenshots/DarkDialog_foldable.png b/feature/settings/src/test/screenshots/DarkDialog_foldable.png index 56c01cdc..abff0328 100644 Binary files a/feature/settings/src/test/screenshots/DarkDialog_foldable.png and b/feature/settings/src/test/screenshots/DarkDialog_foldable.png differ diff --git a/feature/settings/src/test/screenshots/DarkDialog_foldable_dark.png b/feature/settings/src/test/screenshots/DarkDialog_foldable_dark.png index 5301fb82..3ac07f14 100644 Binary files a/feature/settings/src/test/screenshots/DarkDialog_foldable_dark.png and b/feature/settings/src/test/screenshots/DarkDialog_foldable_dark.png differ diff --git a/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable.png b/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable.png index 79243a4d..05be0df1 100644 Binary files a/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable.png and b/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable.png differ diff --git a/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable_dark.png b/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable_dark.png index 214cc04b..ca103320 100644 Binary files a/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable_dark.png and b/feature/settings/src/test/screenshots/SettingsScreenPopulated_foldable_dark.png differ diff --git a/feature/settings/src/test/screenshots/ThemeDialog_foldable.png b/feature/settings/src/test/screenshots/ThemeDialog_foldable.png index 4c8e480e..8d61cdd6 100644 Binary files a/feature/settings/src/test/screenshots/ThemeDialog_foldable.png and b/feature/settings/src/test/screenshots/ThemeDialog_foldable.png differ diff --git a/feature/settings/src/test/screenshots/ThemeDialog_foldable_dark.png b/feature/settings/src/test/screenshots/ThemeDialog_foldable_dark.png index 205242a7..8227b793 100644 Binary files a/feature/settings/src/test/screenshots/ThemeDialog_foldable_dark.png and b/feature/settings/src/test/screenshots/ThemeDialog_foldable_dark.png differ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1dcc8445..5c91b864 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,10 +5,8 @@ androidDesugarJdkLibs = "2.0.4" androidGradlePlugin = "8.4.0" androidTools = "31.3.0" androidxActivity = "1.9.0" -androidxComposeAlpha = "1.7.0-beta01" androidxComposeBom = "2024.09.00" -androidxComposeMaterial3Adaptive = "1.0.0-rc01" -androidxComposeMaterial3AdaptiveNavigationSuite = "1.3.0-beta05" +androidxComposeMaterial3AdaptiveNavigationSuite = "1.3.0" androidxCoreKtx = "1.13.1" androidxCoreSplashscreen = "1.0.1" androidxDataStore = "1.0.0" @@ -51,19 +49,17 @@ androidx-activity-compose = { group = "androidx.activity", name = "activity-comp androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidxActivity" } androidx-benchmark-macro = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidxMacroBenchmark" } androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" } -androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "androidxComposeAlpha" } +androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation"} androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout" } androidx-compose-material = { group = "androidx.compose.material", name = "material" } androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } -androidx-compose-material3-adaptive = { group = "androidx.compose.material3.adaptive", name = "adaptive", version.ref = "androidxComposeMaterial3Adaptive" } -androidx-compose-material3-adaptive-layout = { group = "androidx.compose.material3.adaptive", name = "adaptive-layout", version.ref = "androidxComposeMaterial3Adaptive" } androidx-compose-material3-adaptive-navigation-suite = { group = "androidx.compose.material3", name = "material3-adaptive-navigation-suite", version.ref = "androidxComposeMaterial3AdaptiveNavigationSuite" } androidx-compose-material-iconsExtended = { group = "androidx.compose.material", name = "material-icons-extended" } androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime" } androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util" } -androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "androidxComposeAlpha" } +androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4"} androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCoreKtx" } androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidxCoreSplashscreen" }