From 945bc23734abac27d7d05a6cadffe8828f16adc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 5 Apr 2024 11:25:57 +0200 Subject: [PATCH 1/5] Remove Accompanist SystemUiController library --- compound/build.gradle.kts | 7 ++-- .../android/compound/theme/ElementTheme.kt | 40 +++++++++---------- .../compound/theme/ForcedDarkElementTheme.kt | 24 +++++++++-- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/compound/build.gradle.kts b/compound/build.gradle.kts index ff05f39..9fe40dd 100644 --- a/compound/build.gradle.kts +++ b/compound/build.gradle.kts @@ -69,20 +69,19 @@ android { } dependencies { + implementation(libs.androidx.activity.activity) implementation(libs.androidx.compose.material3) implementation(platform(libs.androidx.compose.bom)) implementation(libs.ui.tooling.preview.android) implementation(libs.kotlinx.collections) + // Showkase implementation(libs.showkase) ksp(libs.showkase.processor) kspTest(libs.showkase.processor) - implementation(libs.accompanist.systemui) - + // Tests testImplementation(libs.test.junit) - - testImplementation(libs.androidx.activity.activity) testImplementation(libs.androidx.compose.ui.test.junit) testImplementation(libs.test.robolectric) testImplementation(libs.test.roborazzi) diff --git a/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt b/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt index cfc7301..758d79d 100644 --- a/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt +++ b/compound/src/main/kotlin/io/element/android/compound/theme/ElementTheme.kt @@ -17,6 +17,9 @@ package io.element.android.compound.theme import android.os.Build +import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.ColorScheme import androidx.compose.material3.LocalContentColor @@ -31,9 +34,8 @@ import androidx.compose.runtime.ReadOnlyComposable import androidx.compose.runtime.remember import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalContext -import com.google.accompanist.systemuicontroller.SystemUiController -import com.google.accompanist.systemuicontroller.rememberSystemUiController import io.element.android.compound.tokens.compoundColorsDark import io.element.android.compound.tokens.compoundColorsLight import io.element.android.compound.tokens.compoundTypography @@ -112,7 +114,6 @@ fun ElementTheme( typography: Typography = compoundTypography, content: @Composable () -> Unit, ) { - val systemUiController = rememberSystemUiController() val currentCompoundColor = remember(darkTheme) { compoundColors.copy() }.apply { updateColorsFrom(compoundColors) } @@ -127,7 +128,7 @@ fun ElementTheme( val statusBarColorScheme = if (dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { val context = LocalContext.current - if (darkTheme) { + if (lightStatusBar) { dynamicDarkColorScheme(context) } else { dynamicLightColorScheme(context) @@ -137,10 +138,21 @@ fun ElementTheme( } if (applySystemBarsUpdate) { + val activity = LocalContext.current as? ComponentActivity LaunchedEffect(statusBarColorScheme, darkTheme, lightStatusBar) { - systemUiController.applyTheme( - colorScheme = statusBarColorScheme, - darkTheme = darkTheme && !lightStatusBar + activity?.enableEdgeToEdge( + // For Status bar use the background color of the app + statusBarStyle = SystemBarStyle.auto( + lightScrim = statusBarColorScheme.background.toArgb(), + darkScrim = statusBarColorScheme.background.toArgb(), + detectDarkMode = { !lightStatusBar } + ), + // For Navigation bar use a transparent color so the content can be seen through it + navigationBarStyle = if (darkTheme) { + SystemBarStyle.dark(Color.Transparent.toArgb()) + } else { + SystemBarStyle.light(Color.Transparent.toArgb(), Color.Transparent.toArgb()) + } ) } } @@ -155,17 +167,3 @@ fun ElementTheme( ) } } - -internal fun SystemUiController.applyTheme( - colorScheme: ColorScheme, - darkTheme: Boolean, -) { - val useDarkIcons = !darkTheme - setStatusBarColor( - color = colorScheme.background - ) - setSystemBarsColor( - color = Color.Transparent, - darkIcons = useDarkIcons - ) -} diff --git a/compound/src/main/kotlin/io/element/android/compound/theme/ForcedDarkElementTheme.kt b/compound/src/main/kotlin/io/element/android/compound/theme/ForcedDarkElementTheme.kt index 37577a8..98c82f9 100644 --- a/compound/src/main/kotlin/io/element/android/compound/theme/ForcedDarkElementTheme.kt +++ b/compound/src/main/kotlin/io/element/android/compound/theme/ForcedDarkElementTheme.kt @@ -16,10 +16,15 @@ package io.element.android.compound.theme +import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle +import androidx.activity.enableEdgeToEdge import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect -import com.google.accompanist.systemuicontroller.rememberSystemUiController +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.platform.LocalContext /** * Can be used to force a composable in dark theme. @@ -30,12 +35,25 @@ fun ForcedDarkElementTheme( lightStatusBar: Boolean = false, content: @Composable () -> Unit, ) { - val systemUiController = rememberSystemUiController() val colorScheme = MaterialTheme.colorScheme val wasDarkTheme = !ElementTheme.colors.isLight + val activity = LocalContext.current as? ComponentActivity DisposableEffect(Unit) { onDispose { - systemUiController.applyTheme(colorScheme, wasDarkTheme) + activity?.enableEdgeToEdge( + statusBarStyle = SystemBarStyle.auto( + lightScrim = colorScheme.background.toArgb(), + darkScrim = colorScheme.background.toArgb(), + ), + navigationBarStyle = if (wasDarkTheme) { + SystemBarStyle.dark(Color.Transparent.toArgb()) + } else { + SystemBarStyle.light( + scrim = Color.Transparent.toArgb(), + darkScrim = Color.Transparent.toArgb() + ) + } + ) } } ElementTheme(darkTheme = true, lightStatusBar = lightStatusBar, content = content) From 932f45b49ca33b684ba5b07d0c41574baeafdec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 5 Apr 2024 11:26:18 +0200 Subject: [PATCH 2/5] Update several dependencies --- .idea/kotlinc.xml | 2 +- gradle/libs.versions.toml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index 8d81632..fe63bb6 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 09eab77..7fb0c3d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,22 +1,22 @@ [versions] # Project -android_gradle_plugin = "8.2.2" -kotlin = "1.9.22" -ksp = "1.9.22-1.0.17" +android_gradle_plugin = "8.3.1" +kotlin = "1.9.23" +ksp = "1.9.23-1.0.19" # AndroidX activity = "1.8.2" # Compose -compose_bom = "2024.02.00" -composecompiler = "1.5.9" +compose_bom = "2024.04.00" +composecompiler = "1.5.11" # Accompanist accompanist = "0.34.0" # Others showkase = "1.0.2" -ui-tooling-preview-android = "1.6.1" +ui-tooling-preview-android = "1.6.5" kover = "0.7.5" roborazzi = "1.9.0" @@ -27,7 +27,7 @@ kover_gradle_plugin = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", ve # AndroidX androidx_compose_bom = { module = "androidx.compose:compose-bom", version.ref = "compose_bom" } -androidx_compose_material3 = "androidx.compose.material3:material3:1.2.0" +androidx_compose_material3 = "androidx.compose.material3:material3:1.2.1" androidx_activity_activity = { module = "androidx.activity:activity", version.ref = "activity" } androidx_compose_ui_test_junit = { module = "androidx.compose.ui:ui-test-junit4-android" } @@ -39,7 +39,7 @@ accompanist_systemui = { module = "com.google.accompanist:accompanist-systemuico # Test test_junit = "junit:junit:4.13.2" -test_robolectric = "org.robolectric:robolectric:4.11.1" +test_robolectric = "org.robolectric:robolectric:4.12.1" test_roborazzi = { module = "io.github.takahirom.roborazzi:roborazzi", version.ref = "roborazzi" } test_roborazzi_compose = { module = "io.github.takahirom.roborazzi:roborazzi-compose", version.ref = "roborazzi" } test_roborazzi_junit = { module = "io.github.takahirom.roborazzi:roborazzi-junit-rule", version.ref = "roborazzi" } From 768a75c04bea218801ae8c9b860e54b83e4fcc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 5 Apr 2024 11:26:52 +0200 Subject: [PATCH 3/5] Update tokens too --- .../android/compound/tokens/CompoundColors.kt | 30 +++++ .../tokens/generated/CompoundIcons.kt | 7 +- .../tokens/generated/SemanticColors.kt | 107 +++++++++++++++++- .../tokens/generated/TypographyTokens.kt | 2 +- .../generated/internal/DarkColorTokens.kt | 2 +- .../generated/internal/LightColorTokens.kt | 2 +- .../drawable/ic_compound_take_photo_solid.xml | 10 ++ 7 files changed, 155 insertions(+), 5 deletions(-) create mode 100644 compound/src/main/res/drawable/ic_compound_take_photo_solid.xml diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt index 024d1c5..397ac04 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/CompoundColors.kt @@ -75,6 +75,21 @@ internal val compoundColorsLight = SemanticColors( iconSuccessPrimary = LightColorTokens.colorGreen900, iconInfoPrimary = LightColorTokens.colorBlue900, iconOnSolidPrimary = LightColorTokens.colorThemeBg, + bgAccentRest = LightColorTokens.colorGreen900, + bgAccentHovered = LightColorTokens.colorGreen1000, + bgAccentPressed = LightColorTokens.colorGreen1100, + bgDecorative1 = LightColorTokens.colorLime300, + bgDecorative2 = LightColorTokens.colorCyan300, + bgDecorative3 = LightColorTokens.colorFuchsia300, + bgDecorative4 = LightColorTokens.colorPurple300, + bgDecorative5 = LightColorTokens.colorPink300, + bgDecorative6 = LightColorTokens.colorOrange300, + textDecorative1 = LightColorTokens.colorLime1100, + textDecorative2 = LightColorTokens.colorCyan1100, + textDecorative3 = LightColorTokens.colorFuchsia1100, + textDecorative4 = LightColorTokens.colorPurple1100, + textDecorative5 = LightColorTokens.colorPink1100, + textDecorative6 = LightColorTokens.colorOrange1100, isLight = true, ) @@ -133,5 +148,20 @@ internal val compoundColorsDark = SemanticColors( iconSuccessPrimary = DarkColorTokens.colorGreen900, iconInfoPrimary = DarkColorTokens.colorBlue900, iconOnSolidPrimary = DarkColorTokens.colorThemeBg, + bgAccentRest = LightColorTokens.colorGreen900, + bgAccentHovered = LightColorTokens.colorGreen1000, + bgAccentPressed = LightColorTokens.colorGreen1100, + bgDecorative1 = LightColorTokens.colorLime300, + bgDecorative2 = LightColorTokens.colorCyan300, + bgDecorative3 = LightColorTokens.colorFuchsia300, + bgDecorative4 = LightColorTokens.colorPurple300, + bgDecorative5 = LightColorTokens.colorPink300, + bgDecorative6 = LightColorTokens.colorOrange300, + textDecorative1 = LightColorTokens.colorLime1100, + textDecorative2 = LightColorTokens.colorCyan1100, + textDecorative3 = LightColorTokens.colorFuchsia1100, + textDecorative4 = LightColorTokens.colorPurple1100, + textDecorative5 = LightColorTokens.colorPink1100, + textDecorative6 = LightColorTokens.colorOrange1100, isLight = false, ) diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt index fd12391..fb6e68c 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/CompoundIcons.kt @@ -433,6 +433,9 @@ object CompoundIcons { @Composable fun TakePhoto(): ImageVector { return ImageVector.vectorResource(R.drawable.ic_compound_take_photo) } + @Composable fun TakePhotoSolid(): ImageVector { + return ImageVector.vectorResource(R.drawable.ic_compound_take_photo_solid) + } @Composable fun TextFormatting(): ImageVector { return ImageVector.vectorResource(R.drawable.ic_compound_text_formatting) } @@ -521,7 +524,7 @@ object CompoundIcons { return ImageVector.vectorResource(R.drawable.ic_compound_web_browser) } - val all @Composable get() = persistentListOf( + val all @Composable get() = persistentListOf( Admin(), ArrowDown(), ArrowLeft(), @@ -658,6 +661,7 @@ object CompoundIcons { Strikethrough(), SwitchCameraSolid(), TakePhoto(), + TakePhotoSolid(), TextFormatting(), Threads(), ThreadsSolid(), @@ -826,6 +830,7 @@ object CompoundIcons { R.drawable.ic_compound_strikethrough, R.drawable.ic_compound_switch_camera_solid, R.drawable.ic_compound_take_photo, + R.drawable.ic_compound_take_photo_solid, R.drawable.ic_compound_text_formatting, R.drawable.ic_compound_threads, R.drawable.ic_compound_threads_solid, diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt index 4c27f49..04b020c 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/SemanticColors.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,9 @@ import androidx.compose.ui.graphics.Color */ @Stable class SemanticColors( + bgAccentHovered: Color, + bgAccentPressed: Color, + bgAccentRest: Color, bgActionPrimaryDisabled: Color, bgActionPrimaryHovered: Color, bgActionPrimaryPressed: Color, @@ -45,6 +48,12 @@ class SemanticColors( bgCriticalPrimary: Color, bgCriticalSubtle: Color, bgCriticalSubtleHovered: Color, + bgDecorative1: Color, + bgDecorative2: Color, + bgDecorative3: Color, + bgDecorative4: Color, + bgDecorative5: Color, + bgDecorative6: Color, bgInfoSubtle: Color, bgSubtlePrimary: Color, bgSubtleSecondary: Color, @@ -76,6 +85,12 @@ class SemanticColors( textActionAccent: Color, textActionPrimary: Color, textCriticalPrimary: Color, + textDecorative1: Color, + textDecorative2: Color, + textDecorative3: Color, + textDecorative4: Color, + textDecorative5: Color, + textDecorative6: Color, textDisabled: Color, textInfoPrimary: Color, textLinkExternal: Color, @@ -88,6 +103,15 @@ class SemanticColors( ) { var isLight by mutableStateOf(isLight) private set + /** Background colour for accent or brand actions. State: Hover */ + var bgAccentHovered by mutableStateOf(bgAccentHovered) + private set + /** Background colour for accent or brand actions. State: Pressed */ + var bgAccentPressed by mutableStateOf(bgAccentPressed) + private set + /** Background colour for accent or brand actions. State: Rest. */ + var bgAccentRest by mutableStateOf(bgAccentRest) + private set /** Background colour for primary actions. State: Disabled. */ var bgActionPrimaryDisabled by mutableStateOf(bgActionPrimaryDisabled) private set @@ -128,6 +152,24 @@ Elevation: Default (Level 0) */ /** Default subtle critical surfaces. State: Hover. */ var bgCriticalSubtleHovered by mutableStateOf(bgCriticalSubtleHovered) private set + /** Decorative background (1, Lime) for avatars and usernames. */ + var bgDecorative1 by mutableStateOf(bgDecorative1) + private set + /** Decorative background (2, Cyan) for avatars and usernames. */ + var bgDecorative2 by mutableStateOf(bgDecorative2) + private set + /** Decorative background (3, Fuchsia) for avatars and usernames. */ + var bgDecorative3 by mutableStateOf(bgDecorative3) + private set + /** Decorative background (4, Purple) for avatars and usernames. */ + var bgDecorative4 by mutableStateOf(bgDecorative4) + private set + /** Decorative background (5, Pink) for avatars and usernames. */ + var bgDecorative5 by mutableStateOf(bgDecorative5) + private set + /** Decorative background (6, Orange) for avatars and usernames. */ + var bgDecorative6 by mutableStateOf(bgDecorative6) + private set /** Subtle background colour for informational elements. State: Rest. */ var bgInfoSubtle by mutableStateOf(bgInfoSubtle) private set @@ -223,6 +265,24 @@ Elevation: Default (Level 1). */ /** Text colour for destructive plain actions. */ var textCriticalPrimary by mutableStateOf(textCriticalPrimary) private set + /** Decorative text colour (1, Lime) for avatars and usernames. */ + var textDecorative1 by mutableStateOf(textDecorative1) + private set + /** Decorative text colour (2, Cyan) for avatars and usernames. */ + var textDecorative2 by mutableStateOf(textDecorative2) + private set + /** Decorative text colour (3, Fuchsia) for avatars and usernames. */ + var textDecorative3 by mutableStateOf(textDecorative3) + private set + /** Decorative text colour (4, Purple) for avatars and usernames. */ + var textDecorative4 by mutableStateOf(textDecorative4) + private set + /** Decorative text colour (5, Pink) for avatars and usernames. */ + var textDecorative5 by mutableStateOf(textDecorative5) + private set + /** Decorative text colour (6, Orange) for avatars and usernames. */ + var textDecorative6 by mutableStateOf(textDecorative6) + private set /** Use for regular text in disabled elements. There's no minimum contrast requirement. */ var textDisabled by mutableStateOf(textDisabled) private set @@ -249,6 +309,9 @@ Elevation: Default (Level 1). */ private set fun copy( + bgAccentHovered: Color = this.bgAccentHovered, + bgAccentPressed: Color = this.bgAccentPressed, + bgAccentRest: Color = this.bgAccentRest, bgActionPrimaryDisabled: Color = this.bgActionPrimaryDisabled, bgActionPrimaryHovered: Color = this.bgActionPrimaryHovered, bgActionPrimaryPressed: Color = this.bgActionPrimaryPressed, @@ -262,6 +325,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary: Color = this.bgCriticalPrimary, bgCriticalSubtle: Color = this.bgCriticalSubtle, bgCriticalSubtleHovered: Color = this.bgCriticalSubtleHovered, + bgDecorative1: Color = this.bgDecorative1, + bgDecorative2: Color = this.bgDecorative2, + bgDecorative3: Color = this.bgDecorative3, + bgDecorative4: Color = this.bgDecorative4, + bgDecorative5: Color = this.bgDecorative5, + bgDecorative6: Color = this.bgDecorative6, bgInfoSubtle: Color = this.bgInfoSubtle, bgSubtlePrimary: Color = this.bgSubtlePrimary, bgSubtleSecondary: Color = this.bgSubtleSecondary, @@ -293,6 +362,12 @@ Elevation: Default (Level 1). */ textActionAccent: Color = this.textActionAccent, textActionPrimary: Color = this.textActionPrimary, textCriticalPrimary: Color = this.textCriticalPrimary, + textDecorative1: Color = this.textDecorative1, + textDecorative2: Color = this.textDecorative2, + textDecorative3: Color = this.textDecorative3, + textDecorative4: Color = this.textDecorative4, + textDecorative5: Color = this.textDecorative5, + textDecorative6: Color = this.textDecorative6, textDisabled: Color = this.textDisabled, textInfoPrimary: Color = this.textInfoPrimary, textLinkExternal: Color = this.textLinkExternal, @@ -303,6 +378,9 @@ Elevation: Default (Level 1). */ textSuccessPrimary: Color = this.textSuccessPrimary, isLight: Boolean = this.isLight, ) = SemanticColors( + bgAccentHovered = bgAccentHovered, + bgAccentPressed = bgAccentPressed, + bgAccentRest = bgAccentRest, bgActionPrimaryDisabled = bgActionPrimaryDisabled, bgActionPrimaryHovered = bgActionPrimaryHovered, bgActionPrimaryPressed = bgActionPrimaryPressed, @@ -316,6 +394,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary = bgCriticalPrimary, bgCriticalSubtle = bgCriticalSubtle, bgCriticalSubtleHovered = bgCriticalSubtleHovered, + bgDecorative1 = bgDecorative1, + bgDecorative2 = bgDecorative2, + bgDecorative3 = bgDecorative3, + bgDecorative4 = bgDecorative4, + bgDecorative5 = bgDecorative5, + bgDecorative6 = bgDecorative6, bgInfoSubtle = bgInfoSubtle, bgSubtlePrimary = bgSubtlePrimary, bgSubtleSecondary = bgSubtleSecondary, @@ -347,6 +431,12 @@ Elevation: Default (Level 1). */ textActionAccent = textActionAccent, textActionPrimary = textActionPrimary, textCriticalPrimary = textCriticalPrimary, + textDecorative1 = textDecorative1, + textDecorative2 = textDecorative2, + textDecorative3 = textDecorative3, + textDecorative4 = textDecorative4, + textDecorative5 = textDecorative5, + textDecorative6 = textDecorative6, textDisabled = textDisabled, textInfoPrimary = textInfoPrimary, textLinkExternal = textLinkExternal, @@ -359,6 +449,9 @@ Elevation: Default (Level 1). */ ) fun updateColorsFrom(other: SemanticColors) { + bgAccentHovered = other.bgAccentHovered + bgAccentPressed = other.bgAccentPressed + bgAccentRest = other.bgAccentRest bgActionPrimaryDisabled = other.bgActionPrimaryDisabled bgActionPrimaryHovered = other.bgActionPrimaryHovered bgActionPrimaryPressed = other.bgActionPrimaryPressed @@ -372,6 +465,12 @@ Elevation: Default (Level 1). */ bgCriticalPrimary = other.bgCriticalPrimary bgCriticalSubtle = other.bgCriticalSubtle bgCriticalSubtleHovered = other.bgCriticalSubtleHovered + bgDecorative1 = other.bgDecorative1 + bgDecorative2 = other.bgDecorative2 + bgDecorative3 = other.bgDecorative3 + bgDecorative4 = other.bgDecorative4 + bgDecorative5 = other.bgDecorative5 + bgDecorative6 = other.bgDecorative6 bgInfoSubtle = other.bgInfoSubtle bgSubtlePrimary = other.bgSubtlePrimary bgSubtleSecondary = other.bgSubtleSecondary @@ -403,6 +502,12 @@ Elevation: Default (Level 1). */ textActionAccent = other.textActionAccent textActionPrimary = other.textActionPrimary textCriticalPrimary = other.textCriticalPrimary + textDecorative1 = other.textDecorative1 + textDecorative2 = other.textDecorative2 + textDecorative3 = other.textDecorative3 + textDecorative4 = other.textDecorative4 + textDecorative5 = other.textDecorative5 + textDecorative6 = other.textDecorative6 textDisabled = other.textDisabled textInfoPrimary = other.textInfoPrimary textLinkExternal = other.textLinkExternal diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt index 6b403b2..9e481dd 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/TypographyTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt index dc656c4..1e2383e 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/DarkColorTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt index faebe19..b1ed69e 100644 --- a/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt +++ b/compound/src/main/kotlin/io/element/android/compound/tokens/generated/internal/LightColorTokens.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 New Vector Ltd + * Copyright (c) 2024 New Vector Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml b/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml new file mode 100644 index 0000000..a7053de --- /dev/null +++ b/compound/src/main/res/drawable/ic_compound_take_photo_solid.xml @@ -0,0 +1,10 @@ + + + From 2f641d1ef2bdf605df55043d622f4d91448337e7 Mon Sep 17 00:00:00 2001 From: ElementBot Date: Fri, 5 Apr 2024 09:31:24 +0000 Subject: [PATCH 4/5] Update screenshots --- compound/screenshots/Compound Icons - Dark.png | 4 ++-- compound/screenshots/Compound Icons - Light.png | 4 ++-- compound/screenshots/Compound Vector Icons - Dark.png | 4 ++-- compound/screenshots/Compound Vector Icons - Light.png | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compound/screenshots/Compound Icons - Dark.png b/compound/screenshots/Compound Icons - Dark.png index 0168ce9..3b81bc1 100644 --- a/compound/screenshots/Compound Icons - Dark.png +++ b/compound/screenshots/Compound Icons - Dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b61192d2f323a6a5d0fd69eaacf56a4d79b879a7c11983887f6e0b6f14a6c76e -size 150300 +oid sha256:fbad66c43719251f60c799588cd6543af22f411cad34ff3b68fe9346132eba0d +size 150224 diff --git a/compound/screenshots/Compound Icons - Light.png b/compound/screenshots/Compound Icons - Light.png index bbb8f02..5a45e29 100644 --- a/compound/screenshots/Compound Icons - Light.png +++ b/compound/screenshots/Compound Icons - Light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfd190aadc4b8fd453eba3b8675606861af367048d68f2e278004ad904cc8040 -size 157560 +oid sha256:d8e43a32403973ee30774739cd77b37332dab6808215f573d458c78e91246453 +size 157501 diff --git a/compound/screenshots/Compound Vector Icons - Dark.png b/compound/screenshots/Compound Vector Icons - Dark.png index c6fc410..7597a0e 100644 --- a/compound/screenshots/Compound Vector Icons - Dark.png +++ b/compound/screenshots/Compound Vector Icons - Dark.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59af27dab83481bd15e2fdd616abf478cc3f673e957df101a827548b5ed188d6 -size 53457 +oid sha256:9a129b16f9bd72f1048e8d498f8c59f56680cf4b3d9bdd3a103874a0057965ba +size 53630 diff --git a/compound/screenshots/Compound Vector Icons - Light.png b/compound/screenshots/Compound Vector Icons - Light.png index 5a8292c..360a86a 100644 --- a/compound/screenshots/Compound Vector Icons - Light.png +++ b/compound/screenshots/Compound Vector Icons - Light.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21825d5e3ef8732fb89ea9b263a06549e9b457772dec2ab5e1bd1239d1423d1b -size 57262 +oid sha256:ddcb54309c12808d5280b9bd831f6cb388d50dac734a75d19fdd15381cf69f4b +size 57339 From db0d62a9be4d12de3edb60ae459de1f6d6e391cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 5 Apr 2024 16:48:28 +0200 Subject: [PATCH 5/5] Remove Accompanist from `libs.versions.toml` --- gradle/libs.versions.toml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7fb0c3d..1a7d486 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,9 +11,6 @@ activity = "1.8.2" compose_bom = "2024.04.00" composecompiler = "1.5.11" -# Accompanist -accompanist = "0.34.0" - # Others showkase = "1.0.2" ui-tooling-preview-android = "1.6.5" @@ -34,9 +31,6 @@ androidx_compose_ui_test_junit = { module = "androidx.compose.ui:ui-test-junit4- # Kotlin kotlinx_collections = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7" -# Accompanist -accompanist_systemui = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" } - # Test test_junit = "junit:junit:4.13.2" test_robolectric = "org.robolectric:robolectric:4.12.1"