diff --git a/app/src/main/kotlin/io/element/android/x/MainActivity.kt b/app/src/main/kotlin/io/element/android/x/MainActivity.kt index ebd9494017..c37a35476d 100644 --- a/app/src/main/kotlin/io/element/android/x/MainActivity.kt +++ b/app/src/main/kotlin/io/element/android/x/MainActivity.kt @@ -18,16 +18,15 @@ package io.element.android.x import android.os.Bundle import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface import androidx.compose.ui.Modifier import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.core.view.WindowCompat import com.bumble.appyx.core.integration.NodeHost import com.bumble.appyx.core.integrationpoint.NodeComponentActivity import io.element.android.libraries.architecture.bindings -import io.element.android.libraries.designsystem.ElementXTheme +import io.element.android.libraries.designsystem.theme.ElementTheme import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.x.di.AppBindings import io.element.android.x.node.RootFlowNode @@ -41,10 +40,9 @@ class MainActivity : NodeComponentActivity() { appBindings.matrixClientsHolder().restore(savedInstanceState) WindowCompat.setDecorFitsSystemWindows(window, false) setContent { - ElementXTheme { - Surface( + ElementTheme { + Box( modifier = Modifier.fillMaxSize(), - color = MaterialTheme.colorScheme.background ) { NodeHost(integrationPoint = appyxIntegrationPoint) { RootFlowNode( diff --git a/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt b/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt index 689b46dcdc..c486f9b7cc 100644 --- a/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt +++ b/app/src/main/kotlin/io/element/android/x/component/ShowkaseButton.kt @@ -20,13 +20,13 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Close -import androidx.compose.material3.Button -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.Text @Composable internal fun ShowkaseButton( diff --git a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt index de8b29682e..94b93b8fd5 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppBindings.kt @@ -20,7 +20,6 @@ import com.squareup.anvil.annotations.ContributesTo import io.element.android.libraries.di.AppScope import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.x.root.RootPresenter -import kotlinx.coroutines.CoroutineScope @ContributesTo(AppScope::class) interface AppBindings { diff --git a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt index b2e2aca077..10e00d30ef 100644 --- a/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/LoggedInFlowNode.kt @@ -19,7 +19,6 @@ package io.element.android.x.node import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -37,6 +36,7 @@ import io.element.android.features.roomlist.RoomListNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.bindings import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.MatrixClient import io.element.android.libraries.matrix.core.RoomId diff --git a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt index ae3c31008d..37fd284b3f 100644 --- a/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt +++ b/app/src/main/kotlin/io/element/android/x/node/RootFlowNode.kt @@ -19,7 +19,6 @@ package io.element.android.x.node import android.os.Parcelable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -36,6 +35,7 @@ import com.bumble.appyx.navmodel.backstack.operation.push import io.element.android.features.rageshake.bugreport.BugReportNode import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler import io.element.android.libraries.architecture.createNode +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.di.DaggerComponentOwner import io.element.android.libraries.matrix.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.core.SessionId diff --git a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt b/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt index 2695163ac4..32fdeedb1d 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/changeserver/ChangeServerView.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) - package io.element.android.features.login.changeserver import androidx.compose.foundation.background @@ -33,13 +31,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.Button -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue @@ -57,6 +49,12 @@ import io.element.android.features.login.error.changeServerError import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.VectorIcon import io.element.android.libraries.designsystem.components.form.textFieldState +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.OutlinedTextField +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.testtags.TestTags import io.element.android.libraries.testtags.testTag @@ -66,126 +64,129 @@ fun ChangeServerView( modifier: Modifier = Modifier, onChangeServerSuccess: () -> Unit = {}, ) { - Surface( - modifier = modifier, - color = MaterialTheme.colorScheme.background, + val eventSink = state.eventSink + val scrollState = rememberScrollState() + Box( + modifier = modifier + .fillMaxSize() + .systemBarsPadding() + .imePadding() ) { - val eventSink = state.eventSink - val scrollState = rememberScrollState() - Box( + Column( modifier = Modifier - .fillMaxSize() - .systemBarsPadding() - .imePadding() + .verticalScroll( + state = scrollState, + ) + .padding(horizontal = 16.dp) ) { - Column( + val isError = state.changeServerAction is Async.Failure + Box( modifier = Modifier - .verticalScroll( - state = scrollState, + .padding(top = 99.dp) + .size(width = 81.dp, height = 73.dp) + .align(Alignment.CenterHorizontally) + .background( + color = MaterialTheme.colorScheme.surfaceVariant, + shape = RoundedCornerShape(32.dp) ) - .padding(horizontal = 16.dp) ) { - val isError = state.changeServerAction is Async.Failure - Box( + VectorIcon( modifier = Modifier - .padding(top = 99.dp) - .size(width = 81.dp, height = 73.dp) - .align(Alignment.CenterHorizontally) - .background( - color = MaterialTheme.colorScheme.surfaceVariant, - shape = RoundedCornerShape(32.dp) - ) - ) { - VectorIcon( - modifier = Modifier - .align(Alignment.Center) - .size(width = 48.dp, height = 48.dp), - // TODO Update with design input - resourceId = R.drawable.ic_baseline_dataset_24, - ) - } - Text( - text = "Your server", - modifier = Modifier - .fillMaxWidth() - .defaultMinSize(minHeight = 56.dp) - .align(Alignment.CenterHorizontally) - .padding(top = 38.dp), - textAlign = TextAlign.Center, - fontWeight = FontWeight.Bold, - fontSize = 24.sp, + .align(Alignment.Center) + .size(width = 48.dp, height = 48.dp), + // TODO Update with design input + resourceId = R.drawable.ic_baseline_dataset_24, ) - Text( - text = "A server is a home for all your data.\n" + - "You choose your server and it’s easy to make one.", // TODO "Learn more.", - modifier = Modifier - .fillMaxWidth() - .align(Alignment.CenterHorizontally) - .padding(top = 16.dp), - textAlign = TextAlign.Center, - fontSize = 16.sp, - color = MaterialTheme.colorScheme.secondary + } + Text( + text = "Your server", + modifier = Modifier + .fillMaxWidth() + .defaultMinSize(minHeight = 56.dp) + .align(Alignment.CenterHorizontally) + .padding(top = 38.dp), + textAlign = TextAlign.Center, + fontWeight = FontWeight.Bold, + fontSize = 24.sp, + color = MaterialTheme.colorScheme.primary, + ) + Text( + text = "A server is a home for all your data.\n" + + "You choose your server and it’s easy to make one.", // TODO "Learn more.", + modifier = Modifier + .fillMaxWidth() + .align(Alignment.CenterHorizontally) + .padding(top = 16.dp), + textAlign = TextAlign.Center, + fontSize = 16.sp, + color = MaterialTheme.colorScheme.secondary, + ) + var homeserverFieldState by textFieldState(stateValue = state.homeserver) + OutlinedTextField( + value = homeserverFieldState, + modifier = Modifier + .fillMaxWidth() + .testTag(TestTags.changeServerServer) + .padding(top = 200.dp), + onValueChange = { + homeserverFieldState = it + eventSink(ChangeServerEvents.SetServer(it)) + }, + label = { + Text(text = "Server") + }, + isError = isError, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Password, + imeAction = ImeAction.Done, + ), + keyboardActions = KeyboardActions( + onDone = { eventSink(ChangeServerEvents.Submit) } ) - var homeserverFieldState by textFieldState(stateValue = state.homeserver) - OutlinedTextField( - value = homeserverFieldState, - modifier = Modifier - .fillMaxWidth() - .testTag(TestTags.changeServerServer) - .padding(top = 200.dp), - onValueChange = { - homeserverFieldState = it - eventSink(ChangeServerEvents.SetServer(it)) - }, - label = { - Text(text = "Server") - }, - isError = isError, - keyboardOptions = KeyboardOptions( - keyboardType = KeyboardType.Password, - imeAction = ImeAction.Done, + ) + if (state.changeServerAction is Async.Failure) { + Text( + text = changeServerError( + state.homeserver, + state.changeServerAction.error ), - keyboardActions = KeyboardActions( - onDone = { eventSink(ChangeServerEvents.Submit) } - ) - ) - if (state.changeServerAction is Async.Failure) { - Text( - text = changeServerError( - state.homeserver, - state.changeServerAction.error - ), - color = MaterialTheme.colorScheme.error, - style = MaterialTheme.typography.bodySmall, - modifier = Modifier.padding(start = 16.dp) - ) - } - Button( - onClick = { eventSink(ChangeServerEvents.Submit) }, - enabled = state.submitEnabled, - modifier = Modifier - .fillMaxWidth() - .testTag(TestTags.changeServerContinue) - .padding(top = 44.dp) - ) { - Text(text = "Continue") - } - if (state.changeServerAction is Async.Success) { - onChangeServerSuccess() - } - } - if (state.changeServerAction is Async.Loading) { - CircularProgressIndicator( - modifier = Modifier.align(Alignment.Center) + color = MaterialTheme.colorScheme.error, + style = MaterialTheme.typography.bodySmall, + modifier = Modifier.padding(start = 16.dp) ) } + Button( + onClick = { eventSink(ChangeServerEvents.Submit) }, + enabled = state.submitEnabled, + modifier = Modifier + .fillMaxWidth() + .testTag(TestTags.changeServerContinue) + .padding(top = 44.dp) + ) { + Text(text = "Continue") + } + if (state.changeServerAction is Async.Success) { + onChangeServerSuccess() + } + } + if (state.changeServerAction is Async.Loading) { + CircularProgressIndicator( + modifier = Modifier.align(Alignment.Center) + ) } } } -@Composable @Preview -fun ChangeServerContentPreview() { +@Composable +fun ChangeServerViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ChangeServerViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { ChangeServerView( state = ChangeServerState(homeserver = "matrix.org"), ) diff --git a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt b/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt index b927ae4555..052de92a52 100644 --- a/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt +++ b/features/login/src/main/kotlin/io/element/android/features/login/root/LoginRootScreen.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) - package io.element.android.features.login.root import androidx.compose.foundation.layout.Box @@ -32,15 +30,7 @@ import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Visibility import androidx.compose.material.icons.filled.VisibilityOff -import androidx.compose.material3.Button -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -60,12 +50,19 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.element.android.features.login.error.loginError import io.element.android.libraries.designsystem.components.form.textFieldState +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.OutlinedTextField +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.core.SessionId import io.element.android.libraries.testtags.TestTags import io.element.android.libraries.testtags.testTag import io.element.android.libraries.ui.strings.R as StringR -@OptIn(ExperimentalMaterial3Api::class) @Composable fun LoginRootScreen( state: LoginRootState, @@ -74,161 +71,164 @@ fun LoginRootScreen( onLoginWithSuccess: (SessionId) -> Unit = {}, ) { val eventSink = state.eventSink - Surface( - modifier = modifier, - color = MaterialTheme.colorScheme.background, + Box( + modifier = modifier + .fillMaxSize() + .systemBarsPadding() + .imePadding() ) { - Box( + val scrollState = rememberScrollState() + var loginFieldState by textFieldState(stateValue = state.formState.login) + var passwordFieldState by textFieldState(stateValue = state.formState.password) + + Column( modifier = Modifier - .fillMaxSize() - .systemBarsPadding() - .imePadding() + .verticalScroll( + state = scrollState, + ) + .padding(horizontal = 16.dp), ) { - val scrollState = rememberScrollState() - var loginFieldState by textFieldState(stateValue = state.formState.login) - var passwordFieldState by textFieldState(stateValue = state.formState.password) - - Column( + val isError = state.loggedInState is LoggedInState.ErrorLoggingIn + // Title + Text( + text = stringResource(id = StringR.string.ftue_auth_welcome_back_title), modifier = Modifier - .verticalScroll( - state = scrollState, - ) - .padding(horizontal = 16.dp), + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 48.dp), + textAlign = TextAlign.Center, + fontWeight = FontWeight.Bold, + fontSize = 24.sp, + color = MaterialTheme.colorScheme.primary, + ) + // Form + Column( + // modifier = Modifier.weight(1f), ) { - val isError = state.loggedInState is LoggedInState.ErrorLoggingIn - // Title - Text( - text = stringResource(id = StringR.string.ftue_auth_welcome_back_title), - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 48.dp), - textAlign = TextAlign.Center, - fontWeight = FontWeight.Bold, - fontSize = 24.sp, - ) - // Form - Column( - // modifier = Modifier.weight(1f), + Box( + modifier = Modifier.fillMaxWidth() ) { - Box( - modifier = Modifier.fillMaxWidth() - ) { - OutlinedTextField( - value = state.homeserver, - modifier = Modifier.fillMaxWidth(), - onValueChange = { /* no op */ }, - enabled = false, - label = { - Text(text = "Server") - }, - keyboardOptions = KeyboardOptions( - keyboardType = KeyboardType.Uri, - ), - ) - Button( - onClick = onChangeServer, - modifier = Modifier - .align(Alignment.CenterEnd) - .testTag(TestTags.loginChangeServer) - .padding(top = 8.dp, end = 8.dp), - content = { - Text(text = "Change") - } - ) - } OutlinedTextField( - value = loginFieldState, - modifier = Modifier - .fillMaxWidth() - .testTag(TestTags.loginEmailUsername) - .padding(top = 60.dp), + value = state.homeserver, + modifier = Modifier.fillMaxWidth(), + onValueChange = { /* no op */ }, + enabled = false, label = { - Text(text = stringResource(id = StringR.string.login_signin_username_hint)) - }, - onValueChange = { - loginFieldState = it - eventSink(LoginRootEvents.SetLogin(it)) + Text(text = "Server") }, keyboardOptions = KeyboardOptions( - keyboardType = KeyboardType.Email, - imeAction = ImeAction.Next + keyboardType = KeyboardType.Uri, ), ) - var passwordVisible by remember { mutableStateOf(false) } - if (state.loggedInState is LoggedInState.LoggingIn) { - // Ensure password is hidden when user submits the form - passwordVisible = false - } - OutlinedTextField( - value = passwordFieldState, + Button( + onClick = onChangeServer, modifier = Modifier - .fillMaxWidth() - .testTag(TestTags.loginPassword) - .padding(top = 24.dp), - onValueChange = { - passwordFieldState = it - eventSink(LoginRootEvents.SetPassword(it)) - }, - label = { - Text(text = "Password") - }, - isError = isError, - visualTransformation = if (passwordVisible) VisualTransformation.None else PasswordVisualTransformation(), - trailingIcon = { - val image = - if (passwordVisible) Icons.Filled.Visibility else Icons.Filled.VisibilityOff - val description = - if (passwordVisible) "Hide password" else "Show password" + .align(Alignment.CenterEnd) + .testTag(TestTags.loginChangeServer) + .padding(top = 8.dp, end = 8.dp), + content = { + Text(text = "Change") + } + ) + } + OutlinedTextField( + value = loginFieldState, + modifier = Modifier + .fillMaxWidth() + .testTag(TestTags.loginEmailUsername) + .padding(top = 60.dp), + label = { + Text(text = stringResource(id = StringR.string.login_signin_username_hint)) + }, + onValueChange = { + loginFieldState = it + eventSink(LoginRootEvents.SetLogin(it)) + }, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Email, + imeAction = ImeAction.Next + ), + ) + var passwordVisible by remember { mutableStateOf(false) } + if (state.loggedInState is LoggedInState.LoggingIn) { + // Ensure password is hidden when user submits the form + passwordVisible = false + } + OutlinedTextField( + value = passwordFieldState, + modifier = Modifier + .fillMaxWidth() + .testTag(TestTags.loginPassword) + .padding(top = 24.dp), + onValueChange = { + passwordFieldState = it + eventSink(LoginRootEvents.SetPassword(it)) + }, + label = { + Text(text = "Password") + }, + isError = isError, + visualTransformation = if (passwordVisible) VisualTransformation.None else PasswordVisualTransformation(), + trailingIcon = { + val image = + if (passwordVisible) Icons.Filled.Visibility else Icons.Filled.VisibilityOff + val description = + if (passwordVisible) "Hide password" else "Show password" - IconButton(onClick = { passwordVisible = !passwordVisible }) { - Icon(imageVector = image, description) - } - }, - keyboardOptions = KeyboardOptions( - keyboardType = KeyboardType.Password, - imeAction = ImeAction.Done, - ), - keyboardActions = KeyboardActions( - onDone = { eventSink(LoginRootEvents.Submit) } - ), - ) - if (state.loggedInState is LoggedInState.ErrorLoggingIn) { - Text( - text = loginError(state.formState, state.loggedInState.failure), - color = MaterialTheme.colorScheme.error, - style = MaterialTheme.typography.bodySmall, - modifier = Modifier.padding(start = 16.dp) - ) - } - } - // Submit - Button( - onClick = { eventSink(LoginRootEvents.Submit) }, - enabled = state.submitEnabled, - modifier = Modifier - .fillMaxWidth() - .testTag(TestTags.loginContinue) - .padding(vertical = 32.dp) - ) { - Text(text = "Continue") - } - when (val loggedInState = state.loggedInState) { - is LoggedInState.LoggedIn -> onLoginWithSuccess(loggedInState.sessionId) - else -> Unit - } - } - if (state.loggedInState is LoggedInState.LoggingIn) { - CircularProgressIndicator( - modifier = Modifier.align(Alignment.Center) + IconButton(onClick = { passwordVisible = !passwordVisible }) { + Icon(imageVector = image, description) + } + }, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Password, + imeAction = ImeAction.Done, + ), + keyboardActions = KeyboardActions( + onDone = { eventSink(LoginRootEvents.Submit) } + ), ) + if (state.loggedInState is LoggedInState.ErrorLoggingIn) { + Text( + text = loginError(state.formState, state.loggedInState.failure), + color = MaterialTheme.colorScheme.error, + style = MaterialTheme.typography.bodySmall, + modifier = Modifier.padding(start = 16.dp) + ) + } } + // Submit + Button( + onClick = { eventSink(LoginRootEvents.Submit) }, + enabled = state.submitEnabled, + modifier = Modifier + .fillMaxWidth() + .testTag(TestTags.loginContinue) + .padding(vertical = 32.dp) + ) { + Text(text = "Continue") + } + when (val loggedInState = state.loggedInState) { + is LoggedInState.LoggedIn -> onLoginWithSuccess(loggedInState.sessionId) + else -> Unit + } + } + if (state.loggedInState is LoggedInState.LoggingIn) { + CircularProgressIndicator( + modifier = Modifier.align(Alignment.Center) + ) } } } -@Composable @Preview -fun LoginContentPreview() { +@Composable +fun LoginRootScreenLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun LoginRootScreenDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { LoginRootScreen( state = LoginRootState( homeserver = "matrix.org", diff --git a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt b/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt index cc94f56806..2134311672 100644 --- a/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt +++ b/features/logout/src/main/kotlin/io/element/android/features/logout/LogoutPreferenceScreen.kt @@ -29,6 +29,8 @@ import io.element.android.libraries.designsystem.components.ProgressDialog import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.components.preferences.PreferenceCategory import io.element.android.libraries.designsystem.components.preferences.PreferenceText +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -88,8 +90,15 @@ fun LogoutPreferenceContent( } } -@Composable @Preview -fun LogoutContentPreview() { +@Composable +fun LogoutPreferenceViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun LogoutPreferenceViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { LogoutPreferenceView(LogoutPreferenceState()) } diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt index 706dc48c43..e19fc869fa 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/MessagesView.kt @@ -39,13 +39,8 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.material.rememberModalBottomSheetState import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHost import androidx.compose.material3.SnackbarHostState -import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBar import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope @@ -64,6 +59,11 @@ import io.element.android.features.messages.timeline.TimelineView import io.element.android.features.messages.timeline.model.TimelineItem import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.Scaffold +import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.designsystem.utils.LogCompositions import kotlinx.coroutines.launch import timber.log.Timber diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt index 53df8d4b40..f2fe33f1c7 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/ActionListView.kt @@ -29,11 +29,10 @@ import androidx.compose.foundation.lazy.items import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.ListItem import androidx.compose.material.LocalContentColor -import androidx.compose.material.MaterialTheme -import androidx.compose.material.ModalBottomSheetLayout import androidx.compose.material.ModalBottomSheetState import androidx.compose.material.ModalBottomSheetValue import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.rememberCoroutineScope @@ -44,6 +43,7 @@ import androidx.compose.ui.unit.dp import io.element.android.features.messages.actionlist.model.TimelineItemAction import io.element.android.features.messages.timeline.model.TimelineItem import io.element.android.libraries.designsystem.components.VectorIcon +import io.element.android.libraries.designsystem.theme.components.ModalBottomSheetLayout import kotlinx.coroutines.flow.filter import kotlinx.coroutines.launch @@ -85,7 +85,7 @@ fun ActionListView( .imePadding() ) } - ) {} + ) } @Composable @@ -115,13 +115,13 @@ private fun SheetContent( text = { Text( text = action.title, - color = if (action.destructive) MaterialTheme.colors.error else Color.Unspecified, + color = if (action.destructive) MaterialTheme.colorScheme.error else Color.Unspecified, ) }, icon = { VectorIcon( resourceId = action.icon, - tint = if (action.destructive) MaterialTheme.colors.error else LocalContentColor.current, + tint = if (action.destructive) MaterialTheme.colorScheme.error else LocalContentColor.current, ) } ) diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt index 46d879b850..ea48797824 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/actionlist/model/TimelineItemAction.kt @@ -18,6 +18,7 @@ package io.element.android.features.messages.actionlist.model import androidx.annotation.DrawableRes import androidx.compose.runtime.Immutable +import io.element.android.libraries.designsystem.VectorIcons @Immutable sealed class TimelineItemAction( @@ -25,9 +26,9 @@ sealed class TimelineItemAction( @DrawableRes val icon: Int, val destructive: Boolean = false ) { - object Forward : TimelineItemAction("Forward", io.element.android.libraries.designsystem.VectorIcons.ArrowForward) - object Copy : TimelineItemAction("Copy", io.element.android.libraries.designsystem.VectorIcons.Copy) - object Redact : TimelineItemAction("Redact", io.element.android.libraries.designsystem.VectorIcons.Delete, destructive = true) - object Reply : TimelineItemAction("Reply", io.element.android.libraries.designsystem.VectorIcons.Reply) - object Edit : TimelineItemAction("Edit", io.element.android.libraries.designsystem.VectorIcons.Edit) + object Forward : TimelineItemAction("Forward", VectorIcons.ArrowForward) + object Copy : TimelineItemAction("Copy", VectorIcons.Copy) + object Redact : TimelineItemAction("Redact", VectorIcons.Delete, destructive = true) + object Reply : TimelineItemAction("Reply", VectorIcons.Reply) + object Edit : TimelineItemAction("Edit", VectorIcons.Edit) } diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt index e3b674d32a..0d2401d667 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/textcomposer/MessageComposerView.kt @@ -18,7 +18,7 @@ package io.element.android.features.messages.textcomposer import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import io.element.android.libraries.designsystem.LocalIsDarkTheme +import io.element.android.libraries.designsystem.theme.ElementTheme import io.element.android.libraries.textcomposer.TextComposer @Composable @@ -51,7 +51,7 @@ fun MessageComposerView( onComposerTextChange = ::onComposerTextChange, composerCanSendMessage = state.isSendButtonVisible, composerText = state.text?.charSequence?.toString(), - isInDarkMode = LocalIsDarkTheme.current, + isInDarkMode = !ElementTheme.colors.isLight, modifier = modifier ) } diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt index a73c724448..a6d6d8a2af 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/TimelineView.kt @@ -39,11 +39,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowDownward -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.FloatingActionButton -import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.derivedStateOf @@ -79,6 +75,12 @@ import io.element.android.features.messages.timeline.model.content.TimelineItemT import io.element.android.features.messages.timeline.model.content.TimelineItemUnknownContent import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.FloatingActionButton +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.utils.PairCombinedPreviewParameter import io.element.android.libraries.matrix.core.EventId import kotlinx.collections.immutable.ImmutableList @@ -355,19 +357,26 @@ class MessagesItemGroupPositionToMessagesTimelineItemContentProvider : TimelineItemGroupPositionProvider() to MessagesTimelineItemContentProvider() ) -@Suppress("PreviewPublic") @Preview @Composable -fun TimelineItemsPreview( - @PreviewParameter(MessagesTimelineItemContentProvider::class) - content: TimelineItemContent -) { +fun LoginRootScreenLightPreview( + @PreviewParameter(MessagesTimelineItemContentProvider::class) content: TimelineItemContent +) = ElementPreviewLight { ContentToPreview(content) } + +@Preview +@Composable +fun LoginRootScreenDarkPreview( + @PreviewParameter(MessagesTimelineItemContentProvider::class) content: TimelineItemContent +) = ElementPreviewDark { ContentToPreview(content) } + +@Composable +private fun ContentToPreview(content: TimelineItemContent) { val timelineItems = persistentListOf( // 3 items (First Middle Last) with isMine = false createMessageEvent( isMine = false, content = content, - groupPosition = MessagesItemGroupPosition.First + groupPosition = MessagesItemGroupPosition.Last ), createMessageEvent( isMine = false, @@ -377,13 +386,13 @@ fun TimelineItemsPreview( createMessageEvent( isMine = false, content = content, - groupPosition = MessagesItemGroupPosition.Last + groupPosition = MessagesItemGroupPosition.First ), // 3 items (First Middle Last) with isMine = true createMessageEvent( isMine = true, content = content, - groupPosition = MessagesItemGroupPosition.First + groupPosition = MessagesItemGroupPosition.Last ), createMessageEvent( isMine = true, @@ -393,7 +402,7 @@ fun TimelineItemsPreview( createMessageEvent( isMine = true, content = content, - groupPosition = MessagesItemGroupPosition.Last + groupPosition = MessagesItemGroupPosition.First ), ) TimelineView( diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt index 9f6c1eb28d..02fa87ec29 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/MessageEventBubble.kt @@ -23,20 +23,14 @@ import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.ripple.rememberRipple -import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.dp import io.element.android.features.messages.timeline.model.MessagesItemGroupPosition -import io.element.android.libraries.designsystem.LocalIsDarkTheme -import io.element.android.libraries.designsystem.MessageHighlightDark -import io.element.android.libraries.designsystem.MessageHighlightLight -import io.element.android.libraries.designsystem.SystemGrey5Dark -import io.element.android.libraries.designsystem.SystemGrey5Light -import io.element.android.libraries.designsystem.SystemGrey6Dark -import io.element.android.libraries.designsystem.SystemGrey6Light +import io.element.android.libraries.designsystem.theme.ElementTheme +import io.element.android.libraries.designsystem.theme.components.Surface private val BUBBLE_RADIUS = 16.dp @@ -88,24 +82,12 @@ fun MessageEventBubble( } val backgroundBubbleColor = if (isHighlighted) { - if (LocalIsDarkTheme.current) { - MessageHighlightDark - } else { - MessageHighlightLight - } + ElementTheme.colors.messageHighlightedBackground } else { if (isMine) { - if (LocalIsDarkTheme.current) { - SystemGrey5Dark - } else { - SystemGrey5Light - } + ElementTheme.colors.messageFromMeBackground } else { - if (LocalIsDarkTheme.current) { - SystemGrey6Dark - } else { - SystemGrey6Light - } + ElementTheme.colors.messageFromOtherBackground } } val bubbleShape = bubbleShape() diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemImageView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemImageView.kt index e6548a71e8..e497a52523 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemImageView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemImageView.kt @@ -14,11 +14,8 @@ * limitations under the License. */ -@file:OptIn(ExperimentalFoundationApi::class) - package io.element.android.features.messages.timeline.components -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemInformativeView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemInformativeView.kt index 9806bc05c8..d7960f2ef9 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemInformativeView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemInformativeView.kt @@ -20,16 +20,21 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width -import androidx.compose.material3.Icon +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Delete import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun TimelineItemInformativeView( @@ -57,3 +62,20 @@ fun TimelineItemInformativeView( ) } } + +@Preview +@Composable +fun MatrixUserRowLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun MatrixUserRowDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + TimelineItemInformativeView( + text = "Info", + iconDescription = "", + icon = Icons.Default.Delete + ) +} diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt index b061f02f3d..50185bdb50 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/TimelineItemReactionsView.kt @@ -24,8 +24,6 @@ import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.CornerSize import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -34,6 +32,8 @@ import androidx.compose.ui.unit.sp import com.google.accompanist.flowlayout.FlowRow import io.element.android.features.messages.timeline.model.AggregatedReaction import io.element.android.features.messages.timeline.model.TimelineItemReactions +import io.element.android.libraries.designsystem.theme.components.Surface +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun TimelineItemReactionsView( diff --git a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt index 21a7cac714..b7e8685656 100644 --- a/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt +++ b/features/messages/src/main/kotlin/io/element/android/features/messages/timeline/components/html/HtmlDocument.kt @@ -28,8 +28,6 @@ import androidx.compose.foundation.text.appendInlineContent import androidx.compose.material3.ColorScheme import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.draw.drawBehind @@ -49,6 +47,8 @@ import androidx.compose.ui.unit.sp import com.google.accompanist.flowlayout.FlowRow import io.element.android.libraries.designsystem.LinkColor import io.element.android.libraries.designsystem.components.ClickableLinkText +import io.element.android.libraries.designsystem.theme.components.Surface +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.permalink.PermalinkData import io.element.android.libraries.matrix.permalink.PermalinkParser import kotlinx.collections.immutable.persistentMapOf diff --git a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt index f0f524cddf..dc8362563e 100644 --- a/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt +++ b/features/onboarding/src/main/kotlin/io/element/android/features/onboarding/OnBoardingScreen.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) - package io.element.android.features.onboarding import androidx.compose.foundation.Image @@ -26,10 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.systemBarsPadding -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue @@ -49,7 +43,8 @@ import com.google.accompanist.pager.ExperimentalPagerApi import com.google.accompanist.pager.HorizontalPager import com.google.accompanist.pager.HorizontalPagerIndicator import com.google.accompanist.pager.rememberPagerState -import io.element.android.libraries.designsystem.components.VectorButton +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.testtags.TestTags import io.element.android.libraries.testtags.testTag import kotlinx.coroutines.delay @@ -67,71 +62,55 @@ fun OnBoardingScreen( val carrouselState = remember { SplashCarouselStateFactory().create() } val nbOfPages = carrouselState.items.size var key by remember { mutableStateOf(false) } - Surface( - modifier = modifier, - color = MaterialTheme.colorScheme.background, + Box( + modifier = modifier + .fillMaxSize() + .systemBarsPadding() + .padding(vertical = 16.dp) ) { - Box( - modifier = Modifier - .fillMaxSize() - .systemBarsPadding() - .padding(vertical = 16.dp) + Column( + modifier = Modifier.fillMaxSize(), ) { - Column( - modifier = Modifier.fillMaxSize(), + val pagerState = rememberPagerState() + LaunchedEffect(key) { + launch { + delay(3_000) + pagerState.animateScrollToPage((pagerState.currentPage + 1) % nbOfPages) + // https://stackoverflow.com/questions/73714228/accompanist-pager-animatescrolltopage-doesnt-scroll-to-next-page-correctly + key = !key + } + } + LaunchedEffect(pagerState) { + // Collect from the pager state a snapshotFlow reading the currentPage + snapshotFlow { pagerState.currentPage }.collect { page -> + onPageChanged(page) + } + } + HorizontalPager( + modifier = Modifier.weight(1f), + count = nbOfPages, + state = pagerState, + ) { page -> + // Our page content + OnBoardingPage(carrouselState.items[page]) + } + HorizontalPagerIndicator( + pagerState = pagerState, + modifier = Modifier + .align(CenterHorizontally) + .padding(16.dp), + ) + Button( + onClick = { + onSignIn() + }, + enabled = true, + modifier = Modifier + .align(CenterHorizontally) + .testTag(TestTags.onBoardingSignIn) + .padding(top = 16.dp) ) { - val pagerState = rememberPagerState() - LaunchedEffect(key) { - launch { - delay(3_000) - pagerState.animateScrollToPage((pagerState.currentPage + 1) % nbOfPages) - // https://stackoverflow.com/questions/73714228/accompanist-pager-animatescrolltopage-doesnt-scroll-to-next-page-correctly - key = !key - } - } - LaunchedEffect(pagerState) { - // Collect from the pager state a snapshotFlow reading the currentPage - snapshotFlow { pagerState.currentPage }.collect { page -> - onPageChanged(page) - } - } - HorizontalPager( - modifier = Modifier.weight(1f), - count = nbOfPages, - state = pagerState, - ) { page -> - // Our page content - OnBoardingPage(carrouselState.items[page]) - } - HorizontalPagerIndicator( - pagerState = pagerState, - modifier = Modifier - .align(CenterHorizontally) - .padding(16.dp), - ) - /* - VectorButton( - text = "CREATE ACCOUNT", - onClick = { - onSignUp() - }, - enabled = true, - modifier = Modifier - .align(CenterHorizontally) - .padding(top = 16.dp) - ) - */ - VectorButton( - text = stringResource(id = StringR.string.login_splash_submit), - onClick = { - onSignIn() - }, - enabled = true, - modifier = Modifier - .align(CenterHorizontally) - .testTag(TestTags.onBoardingSignIn) - .padding(top = 16.dp) - ) + Text(text = stringResource(id = StringR.string.login_splash_submit)) } } } diff --git a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt b/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt index bab68974fb..bd8bda3e40 100644 --- a/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt +++ b/features/preferences/src/main/kotlin/io/element/android/features/preferences/root/PreferencesRootView.kt @@ -27,6 +27,8 @@ import io.element.android.features.rageshake.preferences.RageshakePreferencesSta import io.element.android.features.rageshake.preferences.RageshakePreferencesView import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.preferences.PreferenceView +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -56,7 +58,14 @@ fun PreferencesRootView( @Preview @Composable -fun PreferencesContentPreview() { +fun PreferencesRootViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferencesRootViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { val state = PreferencesRootState( logoutState = LogoutPreferenceState(), rageshakeState = RageshakePreferencesState(), diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt index 8a32f1ac7a..f2fbd7f8f5 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/bugreport/BugReportView.kt @@ -26,13 +26,7 @@ import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.Button -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Surface -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue @@ -54,10 +48,15 @@ import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.components.LabelledCheckbox import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.components.form.textFieldState +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.OutlinedTextField +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.utils.LogCompositions import io.element.android.libraries.ui.strings.R as StringR -@OptIn(ExperimentalMaterial3Api::class) @Composable fun BugReportView( state: BugReportState, @@ -73,147 +72,151 @@ fun BugReportView( } return } - Surface( - modifier = modifier, - color = MaterialTheme.colorScheme.background, + Box( + modifier = modifier + .fillMaxSize() + .systemBarsPadding() + .imePadding() ) { - Box( + val scrollState = rememberScrollState() + Column( modifier = Modifier - .fillMaxSize() - .systemBarsPadding() - .imePadding() + .verticalScroll( + state = scrollState, + ) + .padding(horizontal = 16.dp), ) { - val scrollState = rememberScrollState() - Column( + val isError = state.sending is Async.Failure + val isFormEnabled = state.sending !is Async.Loading + // Title + Text( + text = stringResource(id = StringR.string.send_bug_report), modifier = Modifier - .verticalScroll( - state = scrollState, - ) - .padding(horizontal = 16.dp), + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 16.dp), + textAlign = TextAlign.Center, + fontWeight = FontWeight.Bold, + fontSize = 24.sp, + color = MaterialTheme.colorScheme.primary, + ) + // Form + Text( + text = stringResource(id = StringR.string.send_bug_report_description), + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 16.dp), + fontSize = 16.sp, + color = MaterialTheme.colorScheme.primary, + ) + var descriptionFieldState by textFieldState( + stateValue = state.formState.description + ) + Column( + // modifier = Modifier.weight(1f), ) { - val isError = state.sending is Async.Failure - val isFormEnabled = state.sending !is Async.Loading - // Title - Text( - text = stringResource(id = StringR.string.send_bug_report), + OutlinedTextField( + value = descriptionFieldState, modifier = Modifier .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 16.dp), - textAlign = TextAlign.Center, - fontWeight = FontWeight.Bold, - fontSize = 24.sp, - ) - // Form - Text( - text = stringResource(id = StringR.string.send_bug_report_description), - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 16.dp), - fontSize = 16.sp, - ) - var descriptionFieldState by textFieldState( - stateValue = state.formState.description - ) - Column( - // modifier = Modifier.weight(1f), - ) { - OutlinedTextField( - value = descriptionFieldState, - modifier = Modifier - .fillMaxWidth() - .padding(top = 16.dp), - enabled = isFormEnabled, - label = { - Text(text = stringResource(id = StringR.string.send_bug_report_placeholder)) - }, - supportingText = { - Text(text = stringResource(id = StringR.string.send_bug_report_description_in_english)) - }, - onValueChange = { - descriptionFieldState = it - eventSink(BugReportEvents.SetDescription(it)) - }, - keyboardOptions = KeyboardOptions( - keyboardType = KeyboardType.Text, - imeAction = ImeAction.Next - ), - // TODO Error text too short - ) - } - LabelledCheckbox( - checked = state.formState.sendLogs, - onCheckedChange = { eventSink(BugReportEvents.SetSendLog(it)) }, + .padding(top = 16.dp), enabled = isFormEnabled, - text = stringResource(id = StringR.string.send_bug_report_include_logs) + label = { + Text(text = stringResource(id = StringR.string.send_bug_report_placeholder)) + }, + supportingText = { + Text(text = stringResource(id = StringR.string.send_bug_report_description_in_english)) + }, + onValueChange = { + descriptionFieldState = it + eventSink(BugReportEvents.SetDescription(it)) + }, + keyboardOptions = KeyboardOptions( + keyboardType = KeyboardType.Text, + imeAction = ImeAction.Next + ), + // TODO Error text too short ) - if (state.hasCrashLogs) { - LabelledCheckbox( - checked = state.formState.sendCrashLogs, - onCheckedChange = { eventSink(BugReportEvents.SetSendCrashLog(it)) }, - enabled = isFormEnabled, - text = stringResource(id = StringR.string.send_bug_report_include_crash_logs) - ) - } + } + LabelledCheckbox( + checked = state.formState.sendLogs, + onCheckedChange = { eventSink(BugReportEvents.SetSendLog(it)) }, + enabled = isFormEnabled, + text = stringResource(id = StringR.string.send_bug_report_include_logs) + ) + if (state.hasCrashLogs) { LabelledCheckbox( - checked = state.formState.canContact, - onCheckedChange = { eventSink(BugReportEvents.SetCanContact(it)) }, + checked = state.formState.sendCrashLogs, + onCheckedChange = { eventSink(BugReportEvents.SetSendCrashLog(it)) }, enabled = isFormEnabled, - text = stringResource(id = StringR.string.you_may_contact_me) + text = stringResource(id = StringR.string.send_bug_report_include_crash_logs) ) - if (state.screenshotUri != null) { - LabelledCheckbox( - checked = state.formState.sendScreenshot, - onCheckedChange = { eventSink(BugReportEvents.SetSendScreenshot(it)) }, - enabled = isFormEnabled, - text = stringResource(id = StringR.string.send_bug_report_include_screenshot) - ) - if (state.formState.sendScreenshot) { - Box( - modifier = Modifier.fillMaxWidth(), - contentAlignment = Alignment.Center - ) { - val context = LocalContext.current - val model = ImageRequest.Builder(context) - .data(state.screenshotUri) - .build() - AsyncImage( - modifier = Modifier.fillMaxWidth(fraction = 0.5f), - model = model, - contentDescription = null - ) - } + } + LabelledCheckbox( + checked = state.formState.canContact, + onCheckedChange = { eventSink(BugReportEvents.SetCanContact(it)) }, + enabled = isFormEnabled, + text = stringResource(id = StringR.string.you_may_contact_me) + ) + if (state.screenshotUri != null) { + LabelledCheckbox( + checked = state.formState.sendScreenshot, + onCheckedChange = { eventSink(BugReportEvents.SetSendScreenshot(it)) }, + enabled = isFormEnabled, + text = stringResource(id = StringR.string.send_bug_report_include_screenshot) + ) + if (state.formState.sendScreenshot) { + Box( + modifier = Modifier.fillMaxWidth(), + contentAlignment = Alignment.Center + ) { + val context = LocalContext.current + val model = ImageRequest.Builder(context) + .data(state.screenshotUri) + .build() + AsyncImage( + modifier = Modifier.fillMaxWidth(fraction = 0.5f), + model = model, + contentDescription = null + ) } } - // Submit - Button( - onClick = { eventSink(BugReportEvents.SendBugReport) }, - enabled = state.submitEnabled, - modifier = Modifier - .fillMaxWidth() - .padding(vertical = 32.dp) - ) { - Text(text = stringResource(id = StringR.string.action_send)) - } } - when (state.sending) { - is Async.Loading -> { - CircularProgressIndicator( - progress = state.sendingProgress, - modifier = Modifier.align(Alignment.Center) - ) - } - is Async.Failure -> ErrorDialog( - content = state.sending.error.toString(), + // Submit + Button( + onClick = { eventSink(BugReportEvents.SendBugReport) }, + enabled = state.submitEnabled, + modifier = Modifier + .fillMaxWidth() + .padding(vertical = 32.dp) + ) { + Text(text = stringResource(id = StringR.string.action_send)) + } + } + when (state.sending) { + is Async.Loading -> { + CircularProgressIndicator( + progress = state.sendingProgress, + modifier = Modifier.align(Alignment.Center) ) - else -> Unit } + is Async.Failure -> ErrorDialog( + content = state.sending.error.toString(), + ) + else -> Unit } } } -@Composable @Preview -fun BugReportContentPreview() { +@Composable +fun BugReportViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun BugReportViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { BugReportView( state = BugReportState(), ) diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt index e3c58ab515..fb1a6b2d50 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt @@ -20,6 +20,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.utils.LogCompositions import io.element.android.libraries.ui.strings.R as StringR @@ -67,7 +69,14 @@ fun CrashDetectionContent( @Preview @Composable -fun CrashDetectionContentPreview() { +fun CrashDetectionContentLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun CrashDetectionContentDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { CrashDetectionContent( state = CrashDetectionState() ) diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt index de99427763..bc8002b978 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/detection/RageshakeDetectionView.kt @@ -27,6 +27,8 @@ import io.element.android.features.rageshake.screenshot.ImageResult import io.element.android.features.rageshake.screenshot.screenshot import io.element.android.libraries.androidutils.hardware.vibrate import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.utils.LogCompositions import io.element.android.libraries.designsystem.utils.OnLifecycleEvent import io.element.android.libraries.ui.strings.R as StringR @@ -99,6 +101,13 @@ fun RageshakeDialogContent( @Preview @Composable -fun RageshakeDialogContentPreview() { +fun RageshakeDialogContentLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun RageshakeDialogContentDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { RageshakeDialogContent() } diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt index ce5d9bcab8..815340b8b2 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/preferences/RageshakePreferencesView.kt @@ -27,6 +27,8 @@ import io.element.android.libraries.designsystem.components.preferences.Preferen import io.element.android.libraries.designsystem.components.preferences.PreferenceSlide import io.element.android.libraries.designsystem.components.preferences.PreferenceSwitch import io.element.android.libraries.designsystem.components.preferences.PreferenceText +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -73,14 +75,28 @@ fun RageshakePreferencesView( } } -@Composable @Preview -fun RageshakePreferencesViewPreview() { +@Composable +fun RageshakePreferencesViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun RageshakePreferencesViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { RageshakePreferencesView(RageshakePreferencesState(isEnabled = true, isSupported = true, sensitivity = 0.5f)) } -@Composable @Preview -fun RageshakePreferenceNotSupportedPreview() { +@Composable +fun RageshakePreferencesViewNotSupportedLightPreview() = ElementPreviewLight { ContentNotSupportedToPreview() } + +@Preview +@Composable +fun RageshakePreferencesViewNotSupportedDarkPreview() = ElementPreviewDark { ContentNotSupportedToPreview() } + +@Composable +private fun ContentNotSupportedToPreview() { RageshakePreferencesView(RageshakePreferencesState(isEnabled = true, isSupported = false, sensitivity = 0.5f)) } diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt index 8a67b649e3..3ed5edcf63 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListView.kt @@ -14,8 +14,6 @@ * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class) - package io.element.android.features.roomlist import androidx.compose.foundation.layout.Column @@ -24,7 +22,6 @@ import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Scaffold import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.rememberTopAppBarState import androidx.compose.runtime.Composable @@ -43,6 +40,9 @@ import io.element.android.features.roomlist.model.RoomListRoomSummary import io.element.android.features.roomlist.model.RoomListState import io.element.android.features.roomlist.model.stubbedRoomSummaries import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Scaffold import io.element.android.libraries.designsystem.utils.LogCompositions import io.element.android.libraries.matrix.core.RoomId import io.element.android.libraries.matrix.core.UserId @@ -76,6 +76,7 @@ fun RoomListView( ) } +@OptIn(ExperimentalMaterial3Api::class) @Composable fun RoomListView( roomSummaries: ImmutableList, @@ -125,11 +126,15 @@ fun RoomListView( filter = filter, onFilterChanged = onFilterChanged, onOpenSettings = onOpenSettings, - scrollBehavior = scrollBehavior + scrollBehavior = scrollBehavior, + modifier = Modifier, ) }, content = { padding -> - Column(modifier = Modifier.padding(padding)) { + Column( + modifier = Modifier + .padding(padding) + ) { LazyColumn( modifier = Modifier .weight(1f) @@ -152,7 +157,14 @@ private fun RoomListRoomSummary.contentType() = isPlaceholder @Preview @Composable -fun RoomListViewPreview() { +fun RoomListViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun RoomListViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { RoomListView( roomSummaries = stubbedRoomSummaries(), matrixUser = MatrixUser(id = UserId("@id"), username = "User#1", avatarData = AvatarData("U")), diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt index c7f077374f..f622164af9 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomListTopBar.kt @@ -27,14 +27,7 @@ import androidx.compose.material.icons.filled.Close import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.filled.Settings import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.MediumTopAppBar -import androidx.compose.material3.Text -import androidx.compose.material3.TextField -import androidx.compose.material3.TextFieldDefaults -import androidx.compose.material3.TopAppBar import androidx.compose.material3.TopAppBarScrollBehavior import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -46,7 +39,6 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusRequester import androidx.compose.ui.focus.focusRequester -import androidx.compose.ui.graphics.Color import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.TextStyle @@ -54,6 +46,12 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.sp import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.form.textFieldState +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.MediumTopAppBar +import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.designsystem.theme.components.TextField +import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.designsystem.utils.LogCompositions import io.element.android.libraries.matrix.ui.model.MatrixUser import io.element.android.libraries.ui.strings.R as StringR @@ -64,7 +62,8 @@ fun RoomListTopBar( filter: String, onFilterChanged: (String) -> Unit, onOpenSettings: () -> Unit, - scrollBehavior: TopAppBarScrollBehavior + scrollBehavior: TopAppBarScrollBehavior, + modifier: Modifier = Modifier, ) { LogCompositions( tag = "RoomListScreen", @@ -87,6 +86,7 @@ fun RoomListTopBar( onFilterChanged = onFilterChanged, onCloseClicked = ::closeFilter, scrollBehavior = scrollBehavior, + modifier = modifier, ) } else { DefaultRoomListTopBar( @@ -96,6 +96,7 @@ fun RoomListTopBar( searchWidgetStateIsOpened = true }, scrollBehavior = scrollBehavior, + modifier = modifier, ) } } @@ -148,14 +149,6 @@ fun SearchRoomListTopBar( } } }, - colors = TextFieldDefaults.textFieldColors( - textColor = MaterialTheme.colorScheme.onBackground, - containerColor = Color.Transparent, - cursorColor = MaterialTheme.colorScheme.onBackground.copy(alpha = ContentAlpha.medium), - focusedIndicatorColor = Color.Transparent, - unfocusedIndicatorColor = Color.Transparent, - disabledIndicatorColor = Color.Transparent - ) ) }, navigationIcon = { @@ -182,10 +175,11 @@ private fun DefaultRoomListTopBar( matrixUser: MatrixUser?, onOpenSettings: () -> Unit, onSearchClicked: () -> Unit, - scrollBehavior: TopAppBarScrollBehavior + scrollBehavior: TopAppBarScrollBehavior, + modifier: Modifier = Modifier, ) { MediumTopAppBar( - modifier = Modifier + modifier = modifier .nestedScroll(scrollBehavior.nestedScrollConnection), title = { Text( diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt index 7b561d9054..53ca8b5d1f 100644 --- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt +++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/components/RoomSummaryRow.kt @@ -32,7 +32,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.ripple.rememberRipple import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment @@ -54,6 +53,13 @@ import androidx.compose.ui.unit.sp import com.google.accompanist.placeholder.material.placeholder import io.element.android.features.roomlist.model.RoomListRoomSummary import io.element.android.libraries.designsystem.components.avatar.Avatar +import io.element.android.libraries.designsystem.theme.ElementTheme +import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.designsystem.theme.roomListPlaceHolder +import io.element.android.libraries.designsystem.theme.roomListRoomMessage +import io.element.android.libraries.designsystem.theme.roomListRoomMessageDate +import io.element.android.libraries.designsystem.theme.roomListRoomName +import io.element.android.libraries.designsystem.theme.roomListUnreadIndicator private val minHeight = 72.dp @@ -95,7 +101,11 @@ internal fun DefaultRoomSummaryRow( ) { Avatar( room.avatarData, - modifier = Modifier.placeholder(room.isPlaceholder, shape = CircleShape) + modifier = Modifier.placeholder( + visible = room.isPlaceholder, + shape = CircleShape, + color = ElementTheme.colors.roomListPlaceHolder(), + ) ) Column( modifier = Modifier @@ -105,19 +115,27 @@ internal fun DefaultRoomSummaryRow( ) { // Name Text( - modifier = Modifier - .placeholder(room.isPlaceholder, shape = TextPlaceholderShape), + modifier = Modifier.placeholder( + visible = room.isPlaceholder, + shape = TextPlaceholderShape, + color = ElementTheme.colors.roomListPlaceHolder(), + ), fontSize = 16.sp, fontWeight = FontWeight.SemiBold, text = room.name, + color = MaterialTheme.roomListRoomName(), maxLines = 1, overflow = TextOverflow.Ellipsis ) // Last Message Text( - modifier = Modifier.placeholder(room.isPlaceholder, shape = TextPlaceholderShape), + modifier = Modifier.placeholder( + visible = room.isPlaceholder, + shape = TextPlaceholderShape, + color = ElementTheme.colors.roomListPlaceHolder(), + ), text = room.lastMessage?.toString().orEmpty(), - color = MaterialTheme.colorScheme.secondary, + color = MaterialTheme.roomListRoomMessage(), fontSize = 14.sp, maxLines = 1, overflow = TextOverflow.Ellipsis @@ -129,14 +147,18 @@ internal fun DefaultRoomSummaryRow( .alignByBaseline(), ) { Text( - modifier = Modifier.placeholder(room.isPlaceholder, shape = TextPlaceholderShape), + modifier = Modifier.placeholder( + visible = room.isPlaceholder, + shape = TextPlaceholderShape, + color = ElementTheme.colors.roomListPlaceHolder(), + ), fontSize = 12.sp, text = room.timestamp ?: "", - color = MaterialTheme.colorScheme.secondary, + color = MaterialTheme.roomListRoomMessageDate(), ) Spacer(Modifier.size(4.dp)) val unreadIndicatorColor = - if (room.hasUnread) MaterialTheme.colorScheme.primary else Color.Transparent + if (room.hasUnread) MaterialTheme.roomListUnreadIndicator() else Color.Transparent Box( modifier = Modifier .size(12.dp) diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt index 0de5a4df96..8069b3a991 100644 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt +++ b/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt @@ -17,11 +17,14 @@ package io.element.android.features.template import androidx.compose.foundation.layout.Box -import androidx.compose.material3.Text +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun TemplateView( @@ -29,13 +32,23 @@ fun TemplateView( modifier: Modifier = Modifier, ) { Box(modifier, contentAlignment = Alignment.Center) { - Text("Template feature view") + Text( + "Template feature view", + color = MaterialTheme.colorScheme.primary, + ) } } -@Composable @Preview -fun TemplateViewPreview() { +@Composable +fun TemplateViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun TemplateViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { TemplateView( state = TemplateState(), ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c3b00a39a9..036a9060be 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ ksp = "1.8.0-1.0.8" molecule = "0.7.0" # AndroidX -material = "1.6.1" +material = "1.8.0" corektx = "1.9.0" datastore = "1.0.0" constraintlayout = "2.1.4" diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Color.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Color.kt index 936f102a85..279b38fdd1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Color.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Color.kt @@ -52,10 +52,4 @@ val ElementGreen = Color(0xFF0DBD8B) val ElementOrange = Color(0xFFD9B072) val Vermilion = Color(0xFFFF5B55) -// TODO Update color -val MessageHighlightLight = Azure - -// TODO Update color -val MessageHighlightDark = Azure - val LinkColor = Color(0xFF054F6E) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ColorUtil.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ColorUtil.kt index b15bfc49db..469c70913a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ColorUtil.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ColorUtil.kt @@ -25,6 +25,6 @@ fun Boolean.toEnabledColor(): Color { return if (this) { MaterialTheme.colorScheme.primary } else { - MaterialTheme.colorScheme.secondary + MaterialTheme.colorScheme.primary.copy(alpha = 0.40f) } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Type.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ElementTextStyles.kt similarity index 83% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Type.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ElementTextStyles.kt index 6e97bfa4fb..4e0e3bd854 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Type.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ElementTextStyles.kt @@ -16,55 +16,13 @@ package io.element.android.libraries.designsystem -import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.sp -import com.airbnb.android.showkase.annotation.ShowkaseTypography - -@ShowkaseTypography(name = "Body Large", group = "Element") -val bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp -) - -@ShowkaseTypography(name = "Headline Small", group = "Element") -val headlineSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Bold, - fontSize = 32.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp -) - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = bodyLarge, - headlineSmall = headlineSmall, - /* Other default text styles to override - titleLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 22.sp, - lineHeight = 28.sp, - letterSpacing = 0.sp - ), - labelSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Medium, - fontSize = 11.sp, - lineHeight = 16.sp, - letterSpacing = 0.5.sp - ) - */ -) +// TODO Remove object ElementTextStyles { object Bold { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt index 591baf1152..54a8be0334 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt @@ -21,7 +21,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.PressInteraction import androidx.compose.foundation.text.InlineTextContent import androidx.compose.material3.LocalTextStyle -import androidx.compose.material3.Text +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -32,6 +32,7 @@ import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.TextLayoutResult import androidx.compose.ui.text.TextStyle +import io.element.android.libraries.designsystem.theme.components.Text import kotlinx.collections.immutable.ImmutableMap import kotlinx.collections.immutable.persistentMapOf @@ -83,6 +84,7 @@ fun ClickableLinkText( onTextLayout = { layoutResult.value = it }, - inlineContent = inlineContent + inlineContent = inlineContent, + color = MaterialTheme.colorScheme.primary, ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt index f1ad5738ac..698d2fb6ee 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt @@ -18,12 +18,15 @@ package io.element.android.libraries.designsystem.components import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material3.Checkbox -import androidx.compose.material3.Text +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Checkbox +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun LabelledCheckbox( @@ -42,13 +45,23 @@ fun LabelledCheckbox( onCheckedChange = onCheckedChange, enabled = enabled, ) - Text(text = text) + Text( + text = text, + color = MaterialTheme.colorScheme.primary, + ) } } @Preview @Composable -fun LabelledCheckboxPreview() { +fun LabelledCheckboxLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun LabelledCheckboxDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { LabelledCheckbox( checked = true, text = "Some text", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt index 8bcc77226b..5028bcc030 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt @@ -22,9 +22,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -32,6 +30,10 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun ProgressDialog( @@ -48,19 +50,19 @@ fun ProgressDialog( modifier = modifier .fillMaxWidth() .background( - color = MaterialTheme.colorScheme.onBackground, + color = MaterialTheme.colorScheme.surfaceVariant, shape = RoundedCornerShape(8.dp) ) ) { Column(horizontalAlignment = Alignment.CenterHorizontally) { CircularProgressIndicator( modifier = Modifier.padding(16.dp), - color = MaterialTheme.colorScheme.background + color = MaterialTheme.colorScheme.onSurfaceVariant ) if (!text.isNullOrBlank()) { Text( text = text, - color = MaterialTheme.colorScheme.background, + color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(16.dp) ) } @@ -69,8 +71,15 @@ fun ProgressDialog( } } -@Composable @Preview -fun ProgressDialogPreview() { +@Composable +fun ProgressDialogLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ProgressDialogDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { ProgressDialog(text = "test dialog content") } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorIcon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorIcon.kt index 60e7c644ad..d576b1dacc 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorIcon.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorIcon.kt @@ -16,7 +16,6 @@ package io.element.android.libraries.designsystem.components -import androidx.compose.material3.Icon import androidx.compose.material3.LocalContentColor import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -29,7 +28,7 @@ fun VectorIcon( modifier: Modifier = Modifier, tint: Color = LocalContentColor.current, ) { - Icon( + androidx.compose.material3.Icon( painter = painterResource(id = resourceId), contentDescription = null, modifier = modifier, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/Avatar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/Avatar.kt index 1df00a7c50..b9a6d19bc8 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/Avatar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/avatar/Avatar.kt @@ -20,7 +20,6 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -34,6 +33,9 @@ import androidx.compose.ui.unit.sp import coil.compose.AsyncImage import io.element.android.libraries.designsystem.AvatarGradientEnd import io.element.android.libraries.designsystem.AvatarGradientStart +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text import timber.log.Timber @Composable @@ -97,6 +99,13 @@ private fun InitialsAvatar( @Preview @Composable -fun InitialsAvatarPreview() { +fun AvatarLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun AvatarDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { Avatar(AvatarData(name = "A")) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ConfirmationDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ConfirmationDialog.kt index 6059b6b998..aee26ba7f2 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ConfirmationDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ConfirmationDialog.kt @@ -22,13 +22,20 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.AlertDialog -import androidx.compose.material3.Button -import androidx.compose.material3.Text +import androidx.compose.material3.AlertDialogDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shape import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -43,6 +50,12 @@ fun ConfirmationDialog( onCancelClicked: () -> Unit = {}, onThirdButtonClicked: () -> Unit = {}, onDismiss: () -> Unit = {}, + shape: Shape = AlertDialogDefaults.shape, + containerColor: Color = MaterialTheme.colorScheme.surfaceVariant, + iconContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + titleContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + textContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + tonalElevation: Dp = AlertDialogDefaults.TonalElevation, ) { AlertDialog( modifier = modifier, @@ -93,12 +106,25 @@ fun ConfirmationDialog( } } }, + shape = shape, + containerColor = containerColor, + iconContentColor = iconContentColor, + titleContentColor = titleContentColor, + textContentColor = textContentColor, + tonalElevation = tonalElevation, ) } -@Composable @Preview -fun ConfirmationDialogPreview() { +@Composable +fun ConfirmationDialogLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ConfirmationDialogDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { ConfirmationDialog( title = "Title", content = "Content", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ErrorDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ErrorDialog.kt index 99e473fdbd..fc4aefe6f1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ErrorDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/ErrorDialog.kt @@ -21,13 +21,20 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.AlertDialog -import androidx.compose.material3.Button -import androidx.compose.material3.Text +import androidx.compose.material3.AlertDialogDefaults +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shape import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -37,6 +44,12 @@ fun ErrorDialog( title: String = stringResource(id = StringR.string.dialog_title_error), submitText: String = stringResource(id = StringR.string.ok), onDismiss: () -> Unit = {}, + shape: Shape = AlertDialogDefaults.shape, + containerColor: Color = MaterialTheme.colorScheme.surfaceVariant, + iconContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + titleContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + textContentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant, + tonalElevation: Dp = AlertDialogDefaults.TonalElevation, ) { AlertDialog( modifier = modifier, @@ -62,12 +75,25 @@ fun ErrorDialog( } } }, + shape = shape, + containerColor = containerColor, + iconContentColor = iconContentColor, + titleContentColor = titleContentColor, + textContentColor = textContentColor, + tonalElevation = tonalElevation, ) } -@Composable @Preview -fun ErrorDialogPreview() { +@Composable +fun ErrorDialogLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ErrorDialogDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { ErrorDialog( content = "Content", ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt index c9e6ac6740..5129d58e16 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt @@ -20,13 +20,18 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Divider +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Announcement +import androidx.compose.material.icons.filled.BugReport import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Divider +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun PreferenceCategory( @@ -46,20 +51,39 @@ fun PreferenceCategory( Text( modifier = Modifier.padding(top = 8.dp, start = 56.dp), style = MaterialTheme.typography.titleSmall, - text = title + color = MaterialTheme.colorScheme.primary, + text = title, ) content() } } -@Composable @Preview -fun PreferenceCategoryPreview() { +@Composable +fun PreferenceCategoryLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferenceCategoryDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { PreferenceCategory( title = "Category title", ) { - PreferenceTextPreview() - PreferenceSwitchPreview() - PreferenceSlidePreview() + PreferenceText( + title = "Title", + icon = Icons.Default.BugReport, + ) + PreferenceSwitch( + title = "Switch", + icon = Icons.Default.Announcement, + isChecked = true + ) + PreferenceSlide( + title = "Slide", + summary = "Summary", + value = 0.75F + ) } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceScreen.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceScreen.kt index 4b5f007506..08d5a377a6 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceScreen.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceScreen.kt @@ -28,13 +28,10 @@ import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Announcement import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.filled.BugReport import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBar import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -42,6 +39,13 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.sp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.Scaffold +import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.designsystem.theme.components.TopAppBar @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -110,12 +114,36 @@ fun PreferenceTopAppBar( ) } -@Composable @Preview -fun PreferenceScreenPreview() { +@Composable +fun PreferenceViewLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferenceViewDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { PreferenceView( title = "Preference screen" ) { - PreferenceCategoryPreview() + PreferenceCategory( + title = "Category title", + ) { + PreferenceText( + title = "Title", + icon = Icons.Default.BugReport, + ) + PreferenceSwitch( + title = "Switch", + icon = Icons.Default.Announcement, + isChecked = true + ) + PreferenceSlide( + title = "Slide", + summary = "Summary", + value = 0.75F + ) + } } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt index aadb0ab236..c16eaab45b 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt @@ -24,14 +24,16 @@ import androidx.compose.foundation.layout.defaultMinSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Slider -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.tooling.preview.Preview import io.element.android.libraries.designsystem.components.preferences.components.PreferenceIcon +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Slider +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.toEnabledColor @Composable @@ -84,9 +86,16 @@ fun PreferenceSlide( } } -@Composable @Preview -fun PreferenceSlidePreview() { +@Composable +fun PreferenceSlideLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferenceSlideDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { PreferenceSlide( title = "Slide", summary = "Summary", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt index 68a402296c..53e4e0a29c 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt @@ -24,15 +24,17 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Announcement -import androidx.compose.material3.Checkbox import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.tooling.preview.Preview import io.element.android.libraries.designsystem.components.preferences.components.PreferenceIcon +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Checkbox +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.toEnabledColor @Composable @@ -75,12 +77,20 @@ fun PreferenceSwitch( } } -@Composable @Preview -fun PreferenceSwitchPreview() { +@Composable +fun PreferenceSwitchLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferenceSwitchDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { PreferenceSwitch( title = "Switch", icon = Icons.Default.Announcement, + enabled = true, isChecked = true ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceText.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceText.kt index bef45830e2..1c10d6259a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceText.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceText.kt @@ -25,13 +25,15 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.BugReport import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.tooling.preview.Preview import io.element.android.libraries.designsystem.components.preferences.components.PreferenceIcon +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun PreferenceText( @@ -57,15 +59,23 @@ fun PreferenceText( .weight(1f) .padding(end = preferencePaddingEnd), style = MaterialTheme.typography.bodyLarge, - text = title + text = title, + color = MaterialTheme.colorScheme.primary, ) } } } -@Composable @Preview -fun PreferenceTextPreview() { +@Composable +fun PreferenceTextLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun PreferenceTextDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { PreferenceText( title = "Title", icon = Icons.Default.BugReport, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/components/PreferenceIcon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/components/PreferenceIcon.kt index 6a821333cc..81c8146c57 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/components/PreferenceIcon.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/components/PreferenceIcon.kt @@ -19,11 +19,11 @@ package io.element.android.libraries.designsystem.components.preferences.compone import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width -import androidx.compose.material3.Icon import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.toEnabledColor @Composable diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt new file mode 100644 index 0000000000..f79cfed70b --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.preview + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import io.element.android.libraries.designsystem.theme.ElementTheme + +@Composable +fun ElementPreviewLight( + showBackground: Boolean = true, + content: @Composable () -> Unit +) { + ElementPreview( + darkTheme = false, + showBackground = showBackground, + content = content + ) +} + +@Composable +fun ElementPreviewDark( + showBackground: Boolean = true, + content: @Composable () -> Unit +) { + ElementPreview( + darkTheme = true, + showBackground = showBackground, + content = content + ) +} + +@Composable +private fun ElementPreview( + darkTheme: Boolean, + showBackground: Boolean, + content: @Composable () -> Unit +) { + ElementTheme(darkTheme = darkTheme) { + if (showBackground) { + Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) { + content() + } + } else { + content() + } + } +} + diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt new file mode 100644 index 0000000000..5fd5c3f0af --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme + +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.SystemGrey4Dark +import io.element.android.libraries.designsystem.SystemGrey6Light +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.previews.ColorListPreview + +/** + * Room list. + */ +@Composable +fun MaterialTheme.roomListRoomName() = colorScheme.primary + +@Composable +fun MaterialTheme.roomListRoomMessage() = colorScheme.secondary + +@Composable +fun MaterialTheme.roomListRoomMessageDate() = colorScheme.secondary + +@Composable +fun MaterialTheme.roomListUnreadIndicator() = colorScheme.primary + +@Composable +fun ElementColors.roomListPlaceHolder() = if (isLight) SystemGrey6Light else SystemGrey4Dark + +@Preview +@Composable +fun ColorAliasesLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ColorAliasesDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + ColorListPreview( + backgroundColor = Color.Black, + foregroundColor = Color.White, + colors = mapOf( + "roomListRoomName" to MaterialTheme.roomListRoomName(), + "roomListRoomMessage" to MaterialTheme.roomListRoomMessage(), + "roomListRoomMessageDate" to MaterialTheme.roomListRoomMessageDate(), + "roomListUnreadIndicator" to MaterialTheme.roomListUnreadIndicator(), + "roomListPlaceHolder" to ElementTheme.colors.roomListPlaceHolder(), + ) + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsDark.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsDark.kt new file mode 100644 index 0000000000..774158856e --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsDark.kt @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme + +import androidx.compose.material3.darkColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.Azure +import io.element.android.libraries.designsystem.DarkGrey +import io.element.android.libraries.designsystem.SystemGrey5Dark +import io.element.android.libraries.designsystem.SystemGrey6Dark +import io.element.android.libraries.designsystem.theme.previews.ColorsSchemePreview + +fun elementColorsDark() = ElementColors( + messageFromMeBackground = SystemGrey5Dark, + messageFromOtherBackground = SystemGrey6Dark, + messageHighlightedBackground = Azure, + isLight = false, +) + +// TODO Lots of colors are missing +val materialColorSchemeDark = darkColorScheme( + primary = Color.White, + // TODO onPrimary = ColorDarkTokens.OnPrimary, + // TODO primaryContainer = ColorDarkTokens.PrimaryContainer, + // TODO onPrimaryContainer = ColorDarkTokens.OnPrimaryContainer, + // TODO inversePrimary = ColorDarkTokens.InversePrimary, + secondary = DarkGrey, + // TODO onSecondary = ColorDarkTokens.OnSecondary, + // TODO secondaryContainer = ColorDarkTokens.SecondaryContainer, + // TODO onSecondaryContainer = ColorDarkTokens.OnSecondaryContainer, + tertiary = Color.White, + // TODO onTertiary = ColorDarkTokens.OnTertiary, + // TODO tertiaryContainer = ColorDarkTokens.TertiaryContainer, + // TODO onTertiaryContainer = ColorDarkTokens.OnTertiaryContainer, + background = Color.Black, + onBackground = Color.White, + surface = Color.Black, + onSurface = Color.White, + surfaceVariant = SystemGrey5Dark, + // TODO onSurfaceVariant = ColorDarkTokens.OnSurfaceVariant, + // TODO surfaceTint = primary, + // TODO inverseSurface = ColorDarkTokens.InverseSurface, + // TODO inverseOnSurface = ColorDarkTokens.InverseOnSurface, + // TODO error = ColorDarkTokens.Error, + // TODO onError = ColorDarkTokens.OnError, + // TODO errorContainer = ColorDarkTokens.ErrorContainer, + // TODO onErrorContainer = ColorDarkTokens.OnErrorContainer, + // TODO outline = ColorDarkTokens.Outline, + // TODO outlineVariant = ColorDarkTokens.OutlineVariant, + // TODO scrim = ColorDarkTokens.Scrim, +) + +@Preview +@Composable +fun ColorsSchemePreviewDark() = ColorsSchemePreview( + Color.White, + Color.Black, + materialColorSchemeDark, +) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsLight.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsLight.kt new file mode 100644 index 0000000000..dc13718360 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorsLight.kt @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme + +import androidx.compose.material3.lightColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.Azure +import io.element.android.libraries.designsystem.LightGrey +import io.element.android.libraries.designsystem.SystemGrey5Light +import io.element.android.libraries.designsystem.SystemGrey6Light +import io.element.android.libraries.designsystem.theme.previews.ColorsSchemePreview + +fun elementColorsLight() = ElementColors( + messageFromMeBackground = SystemGrey5Light, + messageFromOtherBackground = SystemGrey6Light, + messageHighlightedBackground = Azure, + isLight = true, +) + +// TODO Lots of colors are missing +val materialColorSchemeLight = lightColorScheme( + primary = Color.Black, + // TODO onPrimary = ColorLightTokens.OnPrimary, + // TODO primaryContainer = ColorLightTokens.PrimaryContainer, + // TODO onPrimaryContainer = ColorLightTokens.OnPrimaryContainer, + // TODO inversePrimary = ColorLightTokens.InversePrimary, + secondary = LightGrey, + // TODO onSecondary = ColorLightTokens.OnSecondary, + // TODO secondaryContainer = ColorLightTokens.SecondaryContainer, + // TODO onSecondaryContainer = ColorLightTokens.OnSecondaryContainer, + tertiary = Color.Black, + // TODO onTertiary = ColorLightTokens.OnTertiary, + // TODO tertiaryContainer = ColorLightTokens.TertiaryContainer, + // TODO onTertiaryContainer = ColorLightTokens.OnTertiaryContainer, + background = Color.White, + onBackground = Color.Black, + surface = Color.White, + onSurface = Color.Black, + surfaceVariant = SystemGrey5Light, + onSurfaceVariant = Color.Black, + // TODO surfaceTint = primary, + // TODO inverseSurface = ColorLightTokens.InverseSurface, + // TODO inverseOnSurface = ColorLightTokens.InverseOnSurface, + // TODO error = ColorLightTokens.Error, + // TODO onError = ColorLightTokens.OnError, + // TODO errorContainer = ColorLightTokens.ErrorContainer, + // TODO onErrorContainer = ColorLightTokens.OnErrorContainer, + // TODO outline = ColorLightTokens.Outline, + // TODO outlineVariant = ColorLightTokens.OutlineVariant, + // TODO scrim = ColorLightTokens.Scrim, +) + +@Preview +@Composable +fun ColorsSchemePreviewLight() = ColorsSchemePreview( + Color.Black, + Color.White, + materialColorSchemeLight, +) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementColors.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementColors.kt new file mode 100644 index 0000000000..b39c31d157 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementColors.kt @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme + +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.setValue +import androidx.compose.ui.graphics.Color + +class ElementColors( + messageFromMeBackground: Color, + messageFromOtherBackground: Color, + messageHighlightedBackground: Color, + isLight: Boolean, +) { + var messageFromMeBackground by mutableStateOf(messageFromMeBackground) + private set + var messageFromOtherBackground by mutableStateOf(messageFromOtherBackground) + private set + var messageHighlightedBackground by mutableStateOf(messageHighlightedBackground) + private set + + var isLight by mutableStateOf(isLight) + private set + + fun copy( + messageFromMeBackground: Color = this.messageFromMeBackground, + messageFromOtherBackground: Color = this.messageFromOtherBackground, + messageHighlightedBackground: Color = this.messageHighlightedBackground, + isLight: Boolean = this.isLight, + ) = ElementColors( + messageFromMeBackground = messageFromMeBackground, + messageFromOtherBackground = messageFromOtherBackground, + messageHighlightedBackground = messageHighlightedBackground, + isLight = isLight, + ) + + fun updateColorsFrom(other: ElementColors) { + messageFromMeBackground = other.messageFromMeBackground + messageFromOtherBackground = other.messageFromOtherBackground + messageHighlightedBackground = other.messageHighlightedBackground + isLight = other.isLight + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Theme.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt similarity index 55% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Theme.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt index d2168f644e..cbeb84badb 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/Theme.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTheme.kt @@ -14,77 +14,58 @@ * limitations under the License. */ -package io.element.android.libraries.designsystem +package io.element.android.libraries.designsystem.theme import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.ColorScheme import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.ReadOnlyComposable import androidx.compose.runtime.SideEffect -import androidx.compose.runtime.compositionLocalOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.LocalContext import com.google.accompanist.systemuicontroller.rememberSystemUiController -private val DarkColorScheme = darkColorScheme( - primary = Color.White, - secondary = DarkGrey, - tertiary = Color.White, - background = Color.Black, - onBackground = Color.White, - surface = Color.Black, - surfaceVariant = SystemGrey5Dark, - onSurface = Color.White, - onSurfaceVariant = Color.White, -) +/** + * Inspired from https://medium.com/@lucasyujideveloper/54cbcbde1ace + */ +object ElementTheme { + val colors: ElementColors + @Composable + @ReadOnlyComposable + get() = LocalColors.current +} -private val LightColorScheme = lightColorScheme( - primary = Color.Black, - secondary = LightGrey, - tertiary = Color.Black, - background = Color.White, - onBackground = Color.Black, - surface = Color.White, - surfaceVariant = SystemGrey5Light, - onSurface = Color.Black, - onSurfaceVariant = Color.Black, - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) -@Suppress("CompositionLocalAllowlist") -val LocalIsDarkTheme = compositionLocalOf { error("Not defined") } +/* Global variables (application level) */ +val LocalColors = staticCompositionLocalOf { elementColorsLight() } @Composable -fun ElementXTheme( +fun ElementTheme( darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = false, - content: @Composable () -> Unit + dynamicColor: Boolean = false, /* true to enable MaterialYou */ + lightColors: ElementColors = elementColorsLight(), + darkColors: ElementColors = elementColorsDark(), + materialLightColors: ColorScheme = materialColorSchemeLight, + materialDarkColors: ColorScheme = materialColorSchemeDark, + content: @Composable () -> Unit, ) { + val systemUiController = rememberSystemUiController() + val useDarkIcons = !darkTheme + val currentColor = remember { if (darkTheme) darkColors else lightColors } val colorScheme = when { dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { val context = LocalContext.current if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) } - darkTheme -> DarkColorScheme - else -> LightColorScheme + darkTheme -> materialDarkColors + else -> materialLightColors } - val systemUiController = rememberSystemUiController() - val useDarkIcons = !darkTheme - SideEffect { systemUiController.setStatusBarColor( color = colorScheme.background @@ -94,11 +75,13 @@ fun ElementXTheme( darkIcons = useDarkIcons ) } - - CompositionLocalProvider(LocalIsDarkTheme provides darkTheme) { + val rememberedColors = remember { currentColor.copy() }.apply { updateColorsFrom(currentColor) } + CompositionLocalProvider( + LocalColors provides rememberedColors, + ) { MaterialTheme( colorScheme = colorScheme, - typography = Typography, + // TODO typography = content = content ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTypography.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTypography.kt new file mode 100644 index 0000000000..b2159522c8 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ElementTypography.kt @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme + +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp +import com.airbnb.android.showkase.annotation.ShowkaseTypography + +/** + * TODO Provide the typo to Material3 theme. + */ +@ShowkaseTypography(name = "H1", group = "Element") +val h1Default: TextStyle = TextStyle( + fontFamily = FontFamily.SansSerif, + fontWeight = FontWeight.Bold, + fontSize = 24.sp +) + +@ShowkaseTypography(name = "Body1", group = "Element") +val body1Default: TextStyle = TextStyle( + fontFamily = FontFamily.SansSerif, + fontWeight = FontWeight.Normal, + fontSize = 16.sp +) + +@ShowkaseTypography(name = "BodySmall", group = "Element") +val bodySmallDefault: TextStyle = TextStyle( + fontFamily = FontFamily.SansSerif, + fontWeight = FontWeight.Normal, + fontSize = 14.sp +) + +@ShowkaseTypography(name = "bodyMedium", group = "Element") +val bodyMediumDefault: TextStyle = TextStyle( + fontFamily = FontFamily.SansSerif, + fontWeight = FontWeight.Normal, + fontSize = 18.sp +) + +@ShowkaseTypography(name = "Body Large", group = "Element") +val bodyLargeDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp +) + +@ShowkaseTypography(name = "Headline Small", group = "Element") +val headlineSmallDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Bold, + fontSize = 24.sp, + lineHeight = 30.sp, + letterSpacing = 1.sp +) + +@ShowkaseTypography(name = "Headline Medium", group = "Element") +val headlineMediumDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Bold, + fontSize = 28.sp, + lineHeight = 34.sp, + letterSpacing = 1.sp +) + +@ShowkaseTypography(name = "Headline Large", group = "Element") +val headlineLargeDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Bold, + fontSize = 32.sp, + lineHeight = 38.sp, + letterSpacing = 1.sp +) + +@ShowkaseTypography(name = "titleSmall", group = "Element") +val titleSmallDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 14.sp, + lineHeight = 20.sp, + letterSpacing = 0.5.sp +) + +@ShowkaseTypography(name = "titleMedium", group = "Element") +val titleMediumDefault: TextStyle = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 18.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp +) + diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt new file mode 100644 index 0000000000..d20e5f9651 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.RowScope +import androidx.compose.material3.ButtonColors +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.ButtonElevation +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight + +@Composable +fun Button( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + shape: Shape = ButtonDefaults.shape, + colors: ButtonColors = ButtonDefaults.buttonColors(), + elevation: ButtonElevation? = ButtonDefaults.buttonElevation(), + border: BorderStroke? = null, + contentPadding: PaddingValues = ButtonDefaults.ContentPadding, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + content: @Composable RowScope.() -> Unit +) { + androidx.compose.material3.Button( + onClick = onClick, + modifier = modifier, + enabled = enabled, + shape = shape, + colors = colors, + elevation = elevation, + border = border, + contentPadding = contentPadding, + interactionSource = interactionSource, + content = content, + ) +} + +@Preview +@Composable +fun ButtonsLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ButtonsDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + Column { + Button(onClick = {}, enabled = true) { + Text(text = "Click me! - Enabled") + } + Button(onClick = {}, enabled = false) { + Text(text = "Click me! - Disabled") + } + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt new file mode 100644 index 0000000000..2c8a7411fb --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Column +import androidx.compose.material3.CheckboxColors +import androidx.compose.material3.CheckboxDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight + +@Composable +fun Checkbox( + checked: Boolean, + onCheckedChange: ((Boolean) -> Unit)?, + modifier: Modifier = Modifier, + enabled: Boolean = true, + colors: CheckboxColors = CheckboxDefaults.colors(), + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } +) { + androidx.compose.material3.Checkbox( + checked = checked, + onCheckedChange = onCheckedChange, + modifier = modifier, + enabled = enabled, + colors = colors, + interactionSource = interactionSource, + ) +} + +@Preview +@Composable +fun CheckboxesLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun CheckboxesDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + Column { + Checkbox(onCheckedChange = {}, enabled = true, checked = true) + Checkbox(onCheckedChange = {}, enabled = true, checked = false) + Checkbox(onCheckedChange = {}, enabled = false, checked = true) + Checkbox(onCheckedChange = {}, enabled = false, checked = false) + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt new file mode 100644 index 0000000000..00a0f8c0de --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.material3.ProgressIndicatorDefaults +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.Dp + +@Composable +fun CircularProgressIndicator( + progress: Float, + modifier: Modifier = Modifier, + color: Color = ProgressIndicatorDefaults.circularColor, + strokeWidth: Dp = ProgressIndicatorDefaults.CircularStrokeWidth +) { + androidx.compose.material3.CircularProgressIndicator( + modifier = modifier, + progress = progress, + color = color, + strokeWidth = strokeWidth, + ) +} + +@Composable +fun CircularProgressIndicator( + modifier: Modifier = Modifier, + color: Color = ProgressIndicatorDefaults.circularColor, + strokeWidth: Dp = ProgressIndicatorDefaults.CircularStrokeWidth, +) { + androidx.compose.material3.CircularProgressIndicator( + modifier = modifier, + color = color, + strokeWidth = strokeWidth, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Divider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Divider.kt new file mode 100644 index 0000000000..f15b81129e --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Divider.kt @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.material3.DividerDefaults +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight + +@Composable +fun Divider( + modifier: Modifier = Modifier, + thickness: Dp = DividerDefaults.Thickness, + color: Color = DividerDefaults.color, +) { + androidx.compose.material3.Divider( + modifier = modifier, + thickness = thickness, + color = color, + ) +} + +@Preview +@Composable +fun DividerLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun DividerDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + Divider() +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt new file mode 100644 index 0000000000..e27f2e7b25 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.material3.FloatingActionButtonDefaults +import androidx.compose.material3.FloatingActionButtonElevation +import androidx.compose.material3.contentColorFor +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shape + +@Composable +fun FloatingActionButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + shape: Shape = FloatingActionButtonDefaults.shape, + containerColor: Color = FloatingActionButtonDefaults.containerColor, + contentColor: Color = contentColorFor(containerColor), + elevation: FloatingActionButtonElevation = FloatingActionButtonDefaults.elevation(), + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + content: @Composable () -> Unit, +) { + androidx.compose.material3.FloatingActionButton( + onClick = onClick, + modifier = modifier, + shape = shape, + containerColor = containerColor, + contentColor = contentColor, + elevation = elevation, + interactionSource = interactionSource, + content = content, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt new file mode 100644 index 0000000000..6006a6c60a --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.material3.LocalContentColor +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.vector.ImageVector + +@Composable +fun Icon( + imageVector: ImageVector, + contentDescription: String?, + modifier: Modifier = Modifier, + tint: Color = LocalContentColor.current +) { + androidx.compose.material3.Icon( + imageVector = imageVector, + contentDescription = contentDescription, + modifier = modifier, + tint = tint, + ) +} + +@Composable +fun Icon( + bitmap: ImageBitmap, + contentDescription: String?, + modifier: Modifier = Modifier, + tint: Color = LocalContentColor.current +) { + androidx.compose.material3.Icon( + bitmap = bitmap, + contentDescription = contentDescription, + modifier = modifier, + tint = tint, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt new file mode 100644 index 0000000000..5af819c1f0 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.material3.IconButtonDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier + +@Composable +fun IconButton( + onClick: () -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + content: @Composable () -> Unit +) { + androidx.compose.material3.IconButton( + onClick = onClick, + modifier = modifier, + enabled = enabled, + colors = IconButtonDefaults.iconButtonColors(), + interactionSource = interactionSource, + content = content, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt new file mode 100644 index 0000000000..cbc215717d --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.TopAppBarColors +import androidx.compose.material3.TopAppBarDefaults +import androidx.compose.material3.TopAppBarScrollBehavior +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun MediumTopAppBar( + title: @Composable () -> Unit, + modifier: Modifier = Modifier, + navigationIcon: @Composable () -> Unit = {}, + actions: @Composable RowScope.() -> Unit = {}, + windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, + colors: TopAppBarColors = TopAppBarDefaults.mediumTopAppBarColors(), + scrollBehavior: TopAppBarScrollBehavior? = null +) { + androidx.compose.material3.MediumTopAppBar( + title = title, + modifier = modifier, + navigationIcon = navigationIcon, + actions = actions, + windowInsets = windowInsets, + colors = colors, + scrollBehavior = scrollBehavior, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt new file mode 100644 index 0000000000..6b558e3418 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.layout.ColumnScope +import androidx.compose.material.ExperimentalMaterialApi +import androidx.compose.material.MaterialTheme +import androidx.compose.material.ModalBottomSheetDefaults +import androidx.compose.material.ModalBottomSheetState +import androidx.compose.material.ModalBottomSheetValue +import androidx.compose.material.contentColorFor +import androidx.compose.material.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.unit.Dp + +@OptIn(ExperimentalMaterialApi::class) +@Composable +fun ModalBottomSheetLayout( + sheetContent: @Composable ColumnScope.() -> Unit, + modifier: Modifier = Modifier, + sheetState: ModalBottomSheetState = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden), + sheetShape: Shape = MaterialTheme.shapes.large, + sheetElevation: Dp = ModalBottomSheetDefaults.Elevation, + sheetBackgroundColor: Color = MaterialTheme.colors.surface, + sheetContentColor: Color = contentColorFor(sheetBackgroundColor), + scrimColor: Color = ModalBottomSheetDefaults.scrimColor, + content: @Composable () -> Unit = {} +) { + androidx.compose.material.ModalBottomSheetLayout( + sheetContent = sheetContent, + modifier = modifier, + sheetState = sheetState, + sheetShape = sheetShape, + sheetElevation = sheetElevation, + sheetBackgroundColor = sheetBackgroundColor, + sheetContentColor = sheetContentColor, + scrimColor = scrimColor, + content = content, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt new file mode 100644 index 0000000000..6e0cc157fe --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.TextFieldColors +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.VisualTransformation +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun OutlinedTextField( + value: String, + onValueChange: (String) -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + readOnly: Boolean = false, + textStyle: TextStyle = LocalTextStyle.current, + label: @Composable (() -> Unit)? = null, + placeholder: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, + trailingIcon: @Composable (() -> Unit)? = null, + supportingText: @Composable (() -> Unit)? = null, + isError: Boolean = false, + visualTransformation: VisualTransformation = VisualTransformation.None, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, + keyboardActions: KeyboardActions = KeyboardActions.Default, + singleLine: Boolean = false, + maxLines: Int = Int.MAX_VALUE, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + shape: Shape = TextFieldDefaults.outlinedShape, + colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors() +) { + androidx.compose.material3.OutlinedTextField( + value = value, + onValueChange = onValueChange, + modifier = modifier, + enabled = enabled, + readOnly = readOnly, + textStyle = textStyle, + label = label, + placeholder = placeholder, + leadingIcon = leadingIcon, + trailingIcon = trailingIcon, + supportingText = supportingText, + isError = isError, + visualTransformation = visualTransformation, + keyboardOptions = keyboardOptions, + keyboardActions = keyboardActions, + singleLine = singleLine, + maxLines = maxLines, + interactionSource = interactionSource, + shape = shape, + colors = colors, + ) +} + +@Preview +@Composable +fun OutlinedTextFieldsLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun OutlinedTextFieldsDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + Column { + OutlinedTextField(onValueChange = {}, value = "Content", isError = false, enabled = true, readOnly = true) + OutlinedTextField(onValueChange = {}, value = "Content", isError = false, enabled = true, readOnly = false) + OutlinedTextField(onValueChange = {}, value = "Content", isError = false, enabled = false, readOnly = true) + OutlinedTextField(onValueChange = {}, value = "Content", isError = false, enabled = false, readOnly = false) + OutlinedTextField(onValueChange = {}, value = "Content", isError = true, enabled = true, readOnly = true) + OutlinedTextField(onValueChange = {}, value = "Content", isError = true, enabled = true, readOnly = false) + OutlinedTextField(onValueChange = {}, value = "Content", isError = true, enabled = false, readOnly = true) + OutlinedTextField(onValueChange = {}, value = "Content", isError = true, enabled = false, readOnly = false) + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Scaffold.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Scaffold.kt new file mode 100644 index 0000000000..99a69c0553 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Scaffold.kt @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.FabPosition +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.ScaffoldDefaults +import androidx.compose.material3.contentColorFor +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun Scaffold( + modifier: Modifier = Modifier, + topBar: @Composable () -> Unit = {}, + bottomBar: @Composable () -> Unit = {}, + snackbarHost: @Composable () -> Unit = {}, + floatingActionButton: @Composable () -> Unit = {}, + floatingActionButtonPosition: FabPosition = FabPosition.End, + containerColor: Color = MaterialTheme.colorScheme.background, + contentColor: Color = contentColorFor(containerColor), + contentWindowInsets: WindowInsets = ScaffoldDefaults.contentWindowInsets, + content: @Composable (PaddingValues) -> Unit +) { + androidx.compose.material3.Scaffold( + modifier = modifier, + topBar = topBar, + bottomBar = bottomBar, + snackbarHost = snackbarHost, + floatingActionButton = floatingActionButton, + floatingActionButtonPosition = floatingActionButtonPosition, + containerColor = containerColor, + contentColor = contentColor, + contentWindowInsets = contentWindowInsets, + content = content, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt new file mode 100644 index 0000000000..a303e1ba77 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Column +import androidx.compose.material3.SliderColors +import androidx.compose.material3.SliderDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight + +@Composable +fun Slider( + value: Float, + onValueChange: (Float) -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + valueRange: ClosedFloatingPointRange = 0f..1f, + /*@IntRange(from = 0)*/ + steps: Int = 0, + onValueChangeFinished: (() -> Unit)? = null, + colors: SliderColors = SliderDefaults.colors(), + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } +) { + androidx.compose.material3.Slider( + value = value, + onValueChange = onValueChange, + modifier = modifier, + enabled = enabled, + valueRange = valueRange, + steps = steps, + onValueChangeFinished = onValueChangeFinished, + colors = colors, + interactionSource = interactionSource, + ) +} + +@Preview +@Composable +fun SlidersLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun SlidersDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + Column { + Slider(onValueChange = {}, value = 0.33f, enabled = true) + Slider(onValueChange = {}, value = 0.33f, enabled = false) + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt new file mode 100644 index 0000000000..8518d8a715 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.BorderStroke +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.contentColorFor +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.RectangleShape +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp + +@Composable +fun Surface( + modifier: Modifier = Modifier, + shape: Shape = RectangleShape, + color: Color = MaterialTheme.colorScheme.surface, + contentColor: Color = contentColorFor(color), + tonalElevation: Dp = 0.dp, + shadowElevation: Dp = 0.dp, + border: BorderStroke? = null, + content: @Composable () -> Unit +) { + androidx.compose.material3.Surface( + modifier = modifier, + shape = shape, + color = color, + contentColor = contentColor, + tonalElevation = tonalElevation, + shadowElevation = shadowElevation, + border = border, + content = content, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt new file mode 100644 index 0000000000..2e05f2a793 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.IntrinsicSize +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.text.InlineTextContent +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.contentColorFor +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.text.TextLayoutResult +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextDecoration +import androidx.compose.ui.text.style.TextOverflow +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.TextUnit +import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.utils.toHrf +import kotlinx.collections.immutable.ImmutableMap +import kotlinx.collections.immutable.persistentMapOf + +@Composable +fun Text( + text: String, + modifier: Modifier = Modifier, + color: Color = Color.Unspecified, + fontSize: TextUnit = TextUnit.Unspecified, + fontStyle: FontStyle? = null, + fontWeight: FontWeight? = null, + fontFamily: FontFamily? = null, + letterSpacing: TextUnit = TextUnit.Unspecified, + textDecoration: TextDecoration? = null, + textAlign: TextAlign? = null, + lineHeight: TextUnit = TextUnit.Unspecified, + overflow: TextOverflow = TextOverflow.Clip, + softWrap: Boolean = true, + maxLines: Int = Int.MAX_VALUE, + onTextLayout: (TextLayoutResult) -> Unit = {}, + style: TextStyle = LocalTextStyle.current +) { + androidx.compose.material3.Text( + text = text, + modifier = modifier, + color = color, + fontSize = fontSize, + fontStyle = fontStyle, + fontWeight = fontWeight, + fontFamily = fontFamily, + letterSpacing = letterSpacing, + textDecoration = textDecoration, + textAlign = textAlign, + lineHeight = lineHeight, + overflow = overflow, + softWrap = softWrap, + maxLines = maxLines, + onTextLayout = onTextLayout, + style = style, + ) +} + +@Composable +fun Text( + text: AnnotatedString, + modifier: Modifier = Modifier, + color: Color = Color.Unspecified, + fontSize: TextUnit = TextUnit.Unspecified, + fontStyle: FontStyle? = null, + fontWeight: FontWeight? = null, + fontFamily: FontFamily? = null, + letterSpacing: TextUnit = TextUnit.Unspecified, + textDecoration: TextDecoration? = null, + textAlign: TextAlign? = null, + lineHeight: TextUnit = TextUnit.Unspecified, + overflow: TextOverflow = TextOverflow.Clip, + softWrap: Boolean = true, + maxLines: Int = Int.MAX_VALUE, + inlineContent: ImmutableMap = persistentMapOf(), + onTextLayout: (TextLayoutResult) -> Unit = {}, + style: TextStyle = LocalTextStyle.current +) { + androidx.compose.material3.Text( + text = text, + modifier = modifier, + color = color, + fontSize = fontSize, + fontStyle = fontStyle, + fontWeight = fontWeight, + fontFamily = fontFamily, + letterSpacing = letterSpacing, + textDecoration = textDecoration, + textAlign = textAlign, + lineHeight = lineHeight, + overflow = overflow, + softWrap = softWrap, + maxLines = maxLines, + inlineContent = inlineContent, + onTextLayout = onTextLayout, + style = style, + ) +} + +@Preview +@Composable +fun TextLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun TextDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { + val colors = mapOf( + "primary" to MaterialTheme.colorScheme.primary, + "secondary" to MaterialTheme.colorScheme.secondary, + "tertiary" to MaterialTheme.colorScheme.tertiary, + "background" to MaterialTheme.colorScheme.background, + "error" to MaterialTheme.colorScheme.error, + "surface" to MaterialTheme.colorScheme.surface, + "surfaceVariant" to MaterialTheme.colorScheme.surfaceVariant, + "primaryContainer" to MaterialTheme.colorScheme.primaryContainer, + "secondaryContainer" to MaterialTheme.colorScheme.secondaryContainer, + "tertiaryContainer" to MaterialTheme.colorScheme.tertiaryContainer, + // "inversePrimary" to MaterialTheme.colorScheme.inversePrimary, + "errorContainer" to MaterialTheme.colorScheme.errorContainer, + "inverseSurface" to MaterialTheme.colorScheme.inverseSurface, + ) + Column( + modifier = Modifier.width(IntrinsicSize.Max) + ) { + colors.keys.forEach { name -> + val color = colors[name]!! + val textColor = contentColorFor(backgroundColor = color) + Box( + modifier = Modifier + .background(color = color) + .fillMaxWidth() + .padding(2.dp) + ) { + Text( + text = "Text on $name\n${textColor.toHrf()} on ${color.toHrf()}", + color = textColor, + ) + } + Spacer(modifier = Modifier.height(2.dp)) + } + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt new file mode 100644 index 0000000000..27995b46af --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.text.KeyboardActions +import androidx.compose.foundation.text.KeyboardOptions +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.TextFieldColors +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Shape +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.input.VisualTransformation + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun TextField( + value: String, + onValueChange: (String) -> Unit, + modifier: Modifier = Modifier, + enabled: Boolean = true, + readOnly: Boolean = false, + textStyle: TextStyle = LocalTextStyle.current, + label: @Composable (() -> Unit)? = null, + placeholder: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, + trailingIcon: @Composable (() -> Unit)? = null, + supportingText: @Composable (() -> Unit)? = null, + isError: Boolean = false, + visualTransformation: VisualTransformation = VisualTransformation.None, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, + keyboardActions: KeyboardActions = KeyboardActions.Default, + singleLine: Boolean = false, + maxLines: Int = Int.MAX_VALUE, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + shape: Shape = TextFieldDefaults.filledShape, + colors: TextFieldColors = TextFieldDefaults.textFieldColors() +) { + androidx.compose.material3.TextField( + value = value, + onValueChange = onValueChange, + modifier = modifier, + enabled = enabled, + readOnly = readOnly, + textStyle = textStyle, + label = label, + placeholder = placeholder, + leadingIcon = leadingIcon, + trailingIcon = trailingIcon, + supportingText = supportingText, + isError = isError, + visualTransformation = visualTransformation, + keyboardOptions = keyboardOptions, + keyboardActions = keyboardActions, + singleLine = singleLine, + maxLines = maxLines, + interactionSource = interactionSource, + shape = shape, + colors = colors, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt new file mode 100644 index 0000000000..76c388cefe --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.components + +import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.TopAppBarColors +import androidx.compose.material3.TopAppBarDefaults +import androidx.compose.material3.TopAppBarScrollBehavior +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun TopAppBar( + title: @Composable () -> Unit, + modifier: Modifier = Modifier, + navigationIcon: @Composable () -> Unit = {}, + actions: @Composable RowScope.() -> Unit = {}, + windowInsets: WindowInsets = TopAppBarDefaults.windowInsets, + colors: TopAppBarColors = TopAppBarDefaults.smallTopAppBarColors(), + scrollBehavior: TopAppBarScrollBehavior? = null +) { + androidx.compose.material3.TopAppBar( + title = title, + modifier = modifier, + navigationIcon = navigationIcon, + actions = actions, + windowInsets = windowInsets, + colors = colors, + scrollBehavior = scrollBehavior, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorListPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorListPreview.kt new file mode 100644 index 0000000000..3d728c0ad4 --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorListPreview.kt @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.previews + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp + +@Composable +internal fun ColorListPreview( + backgroundColor: Color, + foregroundColor: Color, + colors: Map, + modifier: Modifier = Modifier, +) { + Column( + modifier = modifier + .background(color = backgroundColor) + .fillMaxWidth() + ) { + colors.keys.forEach { name -> + val color = colors[name]!! + ColorPreview(backgroundColor = backgroundColor, foregroundColor = foregroundColor, name = name, color = color) + } + Spacer(modifier = Modifier.height(2.dp)) + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorPreview.kt new file mode 100644 index 0000000000..6cfcfec8ff --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorPreview.kt @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.previews + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import io.element.android.libraries.designsystem.theme.components.Text +import io.element.android.libraries.designsystem.utils.toHrf + +@Composable +internal fun ColorPreview( + backgroundColor: Color, + foregroundColor: Color, + name: String, color: Color, + modifier: Modifier = Modifier, +) { + Column(modifier = modifier.fillMaxWidth()) { + Text(text = name + " " + color.toHrf(), fontSize = 6.sp, color = foregroundColor) + val backgroundBrush = Brush.linearGradient( + listOf( + backgroundColor, + foregroundColor, + ) + ) + Row( + modifier = Modifier.background(backgroundBrush) + ) { + repeat(2) { + Box( + modifier = Modifier + .padding(1.dp) + .background(color = color) + .height(10.dp) + .weight(1f) + ) + } + } + } +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorsSchemePreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorsSchemePreview.kt new file mode 100644 index 0000000000..79bdb0b35f --- /dev/null +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/previews/ColorsSchemePreview.kt @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2023 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.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 io.element.android.libraries.designsystem.theme.previews + +import androidx.compose.material3.ColorScheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color + +@Composable +internal fun ColorsSchemePreview( + backgroundColor: Color, + foregroundColor: Color, + colorScheme: ColorScheme, + modifier: Modifier = Modifier, +) { + val colors = mapOf( + "primary" to colorScheme.primary, + "onPrimary" to colorScheme.onPrimary, + "primaryContainer" to colorScheme.primaryContainer, + "onPrimaryContainer" to colorScheme.onPrimaryContainer, + "inversePrimary" to colorScheme.inversePrimary, + "secondary" to colorScheme.secondary, + "onSecondary" to colorScheme.onSecondary, + "secondaryContainer" to colorScheme.secondaryContainer, + "onSecondaryContainer" to colorScheme.onSecondaryContainer, + "tertiary" to colorScheme.tertiary, + "onTertiary" to colorScheme.onTertiary, + "tertiaryContainer" to colorScheme.tertiaryContainer, + "onTertiaryContainer" to colorScheme.onTertiaryContainer, + "background" to colorScheme.background, + "onBackground" to colorScheme.onBackground, + "surface" to colorScheme.surface, + "onSurface" to colorScheme.onSurface, + "surfaceVariant" to colorScheme.surfaceVariant, + "onSurfaceVariant" to colorScheme.onSurfaceVariant, + "surfaceTint" to colorScheme.surfaceTint, + "inverseSurface" to colorScheme.inverseSurface, + "inverseOnSurface" to colorScheme.inverseOnSurface, + "error" to colorScheme.error, + "onError" to colorScheme.onError, + "errorContainer" to colorScheme.errorContainer, + "onErrorContainer" to colorScheme.onErrorContainer, + "outline" to colorScheme.outline, + "outlineVariant" to colorScheme.outlineVariant, + "scrim" to colorScheme.scrim, + ) + ColorListPreview( + backgroundColor = backgroundColor, + foregroundColor = foregroundColor, + colors = colors, + modifier = modifier, + ) +} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/Colors.kt similarity index 52% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorButton.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/Colors.kt index 928e83cfa4..42723cbb54 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/VectorButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/Colors.kt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 New Vector Ltd + * Copyright (c) 2023 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. @@ -14,20 +14,13 @@ * limitations under the License. */ -package io.element.android.libraries.designsystem.components +package io.element.android.libraries.designsystem.utils -import androidx.compose.material3.Button -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color -@Composable -fun VectorButton(text: String, enabled: Boolean, onClick: () -> Unit, modifier: Modifier = Modifier) { - Button( - onClick = onClick, - enabled = enabled, - modifier = modifier - ) { - Text(text = text) - } +/** + * Convert color to Human Readable Format. + */ +internal fun Color.toHrf(): String { + return "0x" + value.toString(16).take(8).uppercase() } diff --git a/libraries/elementresources/build.gradle.kts b/libraries/elementresources/build.gradle.kts index 3451be5c38..a33e0bc471 100644 --- a/libraries/elementresources/build.gradle.kts +++ b/libraries/elementresources/build.gradle.kts @@ -23,5 +23,5 @@ android { } dependencies { - implementation("com.google.android.material:material:1.7.0") + implementation(libs.androidx.material) } diff --git a/libraries/matrix/src/main/kotlin/io/element/android/libraries/matrix/room/RoomSummaryDataSource.kt b/libraries/matrix/src/main/kotlin/io/element/android/libraries/matrix/room/RoomSummaryDataSource.kt index 11ae71795d..8d3ead328d 100644 --- a/libraries/matrix/src/main/kotlin/io/element/android/libraries/matrix/room/RoomSummaryDataSource.kt +++ b/libraries/matrix/src/main/kotlin/io/element/android/libraries/matrix/room/RoomSummaryDataSource.kt @@ -20,7 +20,6 @@ import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.matrix.sync.roomListDiff import io.element.android.libraries.matrix.sync.state import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel import kotlinx.coroutines.cancelChildren @@ -29,7 +28,6 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach -import kotlinx.coroutines.flow.sample import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.matrix.rustcomponents.sdk.RoomListEntry diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt index 3fe339180e..e83c486476 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -36,6 +35,9 @@ import androidx.compose.ui.unit.sp import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.core.UserId import io.element.android.libraries.matrix.ui.model.MatrixUser import io.element.android.libraries.matrix.ui.model.getBestName @@ -64,8 +66,9 @@ fun MatrixUserHeader( fontWeight = FontWeight.SemiBold, text = matrixUser.getBestName(), maxLines = 1, - overflow = TextOverflow.Ellipsis - ) + overflow = TextOverflow.Ellipsis, + color = MaterialTheme.colorScheme.primary, + ) // Id if (matrixUser.username.isNullOrEmpty().not()) { Spacer(modifier = Modifier.height(4.dp)) @@ -82,7 +85,14 @@ fun MatrixUserHeader( @Preview @Composable -fun MatrixUserHeaderPreview() { +fun MatrixUserHeaderLightPreview() = ElementPreviewLight { ContentToPreview1() } + +@Preview +@Composable +fun MatrixUserHeaderDarkPreview() = ElementPreviewDark { ContentToPreview1() } + +@Composable +private fun ContentToPreview1() { MatrixUserHeader( MatrixUser( id = UserId("@alice:server.org"), @@ -94,7 +104,14 @@ fun MatrixUserHeaderPreview() { @Preview @Composable -fun MatrixUserHeaderNoUsernamePreview() { +fun MatrixUserHeaderNoUserNameLightPreview() = ElementPreviewLight { ContentToPreview2() } + +@Preview +@Composable +fun MatrixUserHeaderNoUserNameDarkPreview() = ElementPreviewDark { ContentToPreview2() } + +@Composable +private fun ContentToPreview2() { MatrixUserHeader( MatrixUser( id = UserId("@alice:server.org"), diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt index 498a8d17a9..50bb7d377f 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -35,6 +34,9 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.core.UserId import io.element.android.libraries.matrix.ui.model.MatrixUser import io.element.android.libraries.matrix.ui.model.getBestName @@ -68,7 +70,8 @@ fun MatrixUserRow( fontWeight = FontWeight.SemiBold, text = matrixUser.getBestName(), maxLines = 1, - overflow = TextOverflow.Ellipsis + overflow = TextOverflow.Ellipsis, + color = MaterialTheme.colorScheme.primary, ) // Id if (matrixUser.username.isNullOrEmpty().not()) { @@ -86,7 +89,14 @@ fun MatrixUserRow( @Preview @Composable -fun MatrixUserRowPreview() { +fun MatrixUserRowLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun MatrixUserRowDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { MatrixUserRow( MatrixUser( id = UserId("@alice:server.org"), diff --git a/libraries/textcomposer/build.gradle.kts b/libraries/textcomposer/build.gradle.kts index 4b5f82f747..6f15fefa42 100644 --- a/libraries/textcomposer/build.gradle.kts +++ b/libraries/textcomposer/build.gradle.kts @@ -35,8 +35,9 @@ dependencies { implementation(projects.libraries.androidutils) implementation(projects.libraries.core) implementation(projects.libraries.matrix) + implementation(projects.libraries.designsystem) implementation(libs.wysiwyg) implementation(libs.androidx.constraintlayout) - implementation("com.google.android.material:material:1.7.0") + implementation(libs.androidx.material) ksp(libs.showkase.processor) } diff --git a/libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt b/libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt index 930b5d6f77..2c5cc26798 100644 --- a/libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt +++ b/libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt @@ -21,7 +21,7 @@ import android.net.Uri import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height -import androidx.compose.material3.Text +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -33,6 +33,9 @@ import androidx.compose.ui.unit.sp import androidx.compose.ui.viewinterop.AndroidView import androidx.core.view.isInvisible import androidx.core.view.isVisible +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.ui.strings.R as StringR @Composable @@ -123,7 +126,8 @@ private fun FakeComposer( .align(Alignment.Center), textAlign = TextAlign.Center, text = "Composer Preview", - fontSize = 20.sp + fontSize = 20.sp, + color = MaterialTheme.colorScheme.secondary, ) } } @@ -145,7 +149,14 @@ private fun MessageComposerView.setup(isDarkMode: Boolean, composerMode: Message @Preview @Composable -fun TextComposerPreview() { +fun TextComposerLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun TextComposerDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { TextComposer( onSendMessage = {}, fullscreen = false, diff --git a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseButton.kt b/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseButton.kt index 9ae1b78577..441a7cbd78 100644 --- a/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseButton.kt +++ b/tests/uitests/src/main/kotlin/io/element/android/tests/uitests/ShowkaseButton.kt @@ -20,10 +20,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Close -import androidx.compose.material3.Button -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -32,6 +28,12 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.preview.ElementPreviewDark +import io.element.android.libraries.designsystem.preview.ElementPreviewLight +import io.element.android.libraries.designsystem.theme.components.Button +import io.element.android.libraries.designsystem.theme.components.Icon +import io.element.android.libraries.designsystem.theme.components.IconButton +import io.element.android.libraries.designsystem.theme.components.Text @Composable fun ShowkaseButton( @@ -59,8 +61,15 @@ fun ShowkaseButton( } } -@Preview(group = "Buttons", name = "Showkase button") +@Preview @Composable -fun ShowkaseButtonPreview() { +fun ShowkaseButtonLightPreview() = ElementPreviewLight { ContentToPreview() } + +@Preview +@Composable +fun ShowkaseButtonDarkPreview() = ElementPreviewDark { ContentToPreview() } + +@Composable +private fun ContentToPreview() { ShowkaseButton() } diff --git a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt b/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt index 1c26565acf..1ccb0d76b2 100644 --- a/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt +++ b/tests/uitests/src/test/kotlin/io/element/android/tests/uitests/ScreenshotTest.kt @@ -36,7 +36,7 @@ import app.cash.paparazzi.Paparazzi import com.airbnb.android.showkase.models.Showkase import com.google.testing.junit.testparameterinjector.TestParameter import com.google.testing.junit.testparameterinjector.TestParameterInjector -import io.element.android.libraries.designsystem.ElementXTheme +import io.element.android.libraries.designsystem.theme.ElementTheme import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -75,7 +75,6 @@ class ScreenshotTest { @TestParameter(valuesProvider = PreviewProvider::class) componentTestPreview: TestPreview, @TestParameter baseDeviceConfig: BaseDeviceConfig, @TestParameter(value = ["1.0"/*, "1.5"*/]) fontScale: Float, - @TestParameter(value = ["light", "dark"]) theme: String, @TestParameter(value = ["en" /*"fr", "de", "ru"*/]) localeStr: String, ) { paparazzi.unsafeUpdateConfig( @@ -101,7 +100,7 @@ class ScreenshotTest { override fun getOnBackPressedDispatcher() = OnBackPressedDispatcher() } ) { - ElementXTheme(darkTheme = (theme == "dark")) { + ElementTheme { Box(modifier = Modifier.background(MaterialTheme.colorScheme.background)) { componentTestPreview.Content() } diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body1,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body1,NEXUS_5,1,en].png new file mode 100644 index 0000000000..e2d264f3fd --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body1,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e60a495255bf6048af20f1cd7365caf6ca6f5d9e97bbf1519ce469f3cccec958 +size 6064 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_BodySmall,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_BodySmall,NEXUS_5,1,en].png new file mode 100644 index 0000000000..058c257e7d --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_BodySmall,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3025338830e0e20781a727ef61751be208d2c633e271f42fe91dbf89df43dbf5 +size 6681 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_H1,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_H1,NEXUS_5,1,en].png new file mode 100644 index 0000000000..69c38b48fe --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_H1,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c68a348292da117047095d945c7b3fa764e4894fbc25354a88607af33378b90 +size 4775 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Large,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Large,NEXUS_5,1,en].png new file mode 100644 index 0000000000..eb99d57c55 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Large,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8960ee49f84a98f0c309ea2d3cc208bfdf493c8843066830ee228e0c3b25634 +size 9695 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Medium,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Medium,NEXUS_5,1,en].png new file mode 100644 index 0000000000..173136b77d --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Medium,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dcfab4f43c1a796c9166116285353c4351182db3d5417f657c8a48e9798c6e87 +size 9589 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,en].png new file mode 100644 index 0000000000..a8d282ced2 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12fdbd29d34a17ceec91dd37fddb46560a9047df5a4878491443e75c1fb2ad44 +size 8214 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_bodyMedium,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_bodyMedium,NEXUS_5,1,en].png new file mode 100644 index 0000000000..b282061ed3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_bodyMedium,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5334cd5b273fc2e6ac65c730bc88adf74fa6b89fda0e76009d35a75bf2790559 +size 7728 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleMedium,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleMedium,NEXUS_5,1,en].png new file mode 100644 index 0000000000..935ccb6489 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleMedium,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:310e8dfa7d52b5ee835243b1025a7e20ec3fb7dafee62c230c870720e91cf897 +size 7044 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleSmall,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleSmall,NEXUS_5,1,en].png new file mode 100644 index 0000000000..6316774563 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_titleSmall,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c4cbc97971b8a1561c232f14cb8600fea59527e7315bca9d225dde13cb1edd9 +size 6223 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..b8fd07a2b9 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c434e7bb1316fdd1668c9d41675ff7fe1acc62dfdc6c64e96e485155a51befc4 +size 27698 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.changeserver_null_DefaultGroup_ChangeServerContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.changeserver_null_DefaultGroup_ChangeServerContentPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.changeserver_null_DefaultGroup_ChangeServerViewLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..640514fca1 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7393dde7da886bec54405dc602e6584eca8d8617f3f28d9b00e708b0381f3c2b +size 25315 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.root_null_DefaultGroup_LoginContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.root_null_DefaultGroup_LoginContentPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..92c0633a91 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155e39fcadcc8bc039267a8b0dca338a92bcb3b4b23ab55a0cd9f3ef91c729fc +size 8888 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.logout_null_DefaultGroup_LogoutContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.logout_null_DefaultGroup_LogoutContentPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.logout_null_DefaultGroup_LogoutPreferenceViewLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..58ab573693 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef86e92ea3caad3687d66458e3b0832361808692783671db54dd321d61564792 +size 5836 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..9067e20c9d --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline.components_null_DefaultGroup_MatrixUserRowLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:674265aa2728d2f1724abcf600a573307d69d8dd77212eaf269176e56dc82fd5 +size 5610 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__0,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__0,NEXUS_5,1,en].png new file mode 100644 index 0000000000..0aa521f943 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__0,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7be62fbfef658b54e9a2fea2b66cae87de145f1dd8dd70baa4828d1c2a8c9c96 +size 31637 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__1,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__1,NEXUS_5,1,en].png new file mode 100644 index 0000000000..8548e31a8c --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__1,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffbfcdf2cd238cd58bac1cbc141be5aa7e74184c4b35018777552d6956e17263 +size 43423 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__2,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__2,NEXUS_5,1,en].png new file mode 100644 index 0000000000..556e55dcc1 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__2,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49fb267e9136c8b78f083156681b9432c757af755a2161cfdea42df43371e645 +size 33431 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__3,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__3,NEXUS_5,1,en].png new file mode 100644 index 0000000000..ea261625d8 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__3,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa2177214c486e5af577c7d001bf92f1fbe7e1b68adcef3c2d7b91fe1d95a864 +size 55533 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__4,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__4,NEXUS_5,1,en].png new file mode 100644 index 0000000000..a23377387a --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__4,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffb69c688191b581c220d2b1b4f89be74a59496caaf39a1e54a3d5ddc586b319 +size 29603 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__5,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__5,NEXUS_5,1,en].png new file mode 100644 index 0000000000..47a852803b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenDarkPreview__5,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:461792b0350436f4dd3527243b8a8fb57d619cb94c6f49db93462675c1ada886 +size 51009 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__0,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__0,NEXUS_5,1,en].png new file mode 100644 index 0000000000..3d1094d520 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__0,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3697be1c70d071df9f1af57085d31a44a175b323602bbbe00dea091757d5e06d +size 31265 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__1,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__1,NEXUS_5,1,en].png new file mode 100644 index 0000000000..77adf1dcdc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__1,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37461ec9e58f5999e5d0bc0810a84131ec5faaec2b7e99359b36f05d8865d3d2 +size 41757 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__2,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__2,NEXUS_5,1,en].png new file mode 100644 index 0000000000..9509ba2522 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__2,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b4489e2f3f326f952d4680adcb14e88174628454bd3b3503864166074c5ca5c +size 33177 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__3,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__3,NEXUS_5,1,en].png new file mode 100644 index 0000000000..88aa21ce03 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__3,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee3a40f5c8131f588642420d4e682f6ed0a00d6faf3d793b249e28c43b09e9c +size 52914 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__4,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__4,NEXUS_5,1,en].png new file mode 100644 index 0000000000..68a59311cc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__4,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:154c03f8e6eb6be2cb26fe077b4e6397df13173fe6bfcd3f23bc8287a37921b7 +size 29275 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__5,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__5,NEXUS_5,1,en].png new file mode 100644 index 0000000000..8d8bc4078e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.timeline_null_DefaultGroup_LoginRootScreenLightPreview__5,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a9a1a9ac69f15110934ae2de3ce55d7c1d3027079e68ecdf5dcb2861863ce8e +size 49057 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..80c9003f06 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55f4d1755b6692051b0fcdf7014cf567cd924dbebed18d22999a6472618a44c2 +size 26524 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..4ee53a9091 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.preferences.root_null_DefaultGroup_PreferencesRootViewLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30a23b12d9f25e216e15df05ea4be2ca5d10d16b1c4be25fee876a255c6a19b3 +size 26287 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..547f890601 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a73f66fa8ddb5c69580e59bf86364f430cf89c0710bcba98b8d8ccf605d16c2 +size 50660 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.bugreport_null_DefaultGroup_BugReportContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.bugreport_null_DefaultGroup_BugReportContentPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.bugreport_null_DefaultGroup_BugReportViewLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..374ed70e4e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9ab15f317d30dbbd2dd1efae4e364e05e0523790b506d970465879f71e41dec +size 28995 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..35277743a5 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:971012a67b23f0c07957b439af663ed44b47310089e20374bee1d8c4712bd209 +size 29213 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..396101cd5f --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:643bb6ca2dba3bd686d633beb103cd92a70547486c397d6472b1488d57b027c9 +size 33156 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..082816d1dc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:127f77b02e010acd936c86d1b54c25e152e3bfe660a0cf07c674bd17569a72cc +size 33163 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..1d080b2c8b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c385c5b124217368b054e85e8313a0dac30274ea6fc08f9a71f60e80f547df0 +size 22589 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewNotSupportedDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewNotSupportedDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..c408edcdc4 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewNotSupportedDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eac040a95a0e551d61fb0a14c26190304ac97b8a575a0911812f3fdade88f0e6 +size 21014 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferenceNotSupportedPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewNotSupportedLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferenceNotSupportedPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewNotSupportedLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..877935d457 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c086ed8fea4f3369a93b5f00e76b8ecdfe4e7874042d277583987db0003bca4b +size 34956 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..517438eb48 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab3d7fb8f67d178af44db4bae63f606eb88612c18b84d989c382fc17b9df068b +size 32363 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.avatar_null_DefaultGroup_AvatarDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.avatar_null_DefaultGroup_AvatarDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..e33d3ad878 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.avatar_null_DefaultGroup_AvatarDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f59bf1e9e6695cab308f19400f8a4c58114b3f7e1a97e649c263e3b5b07b7de3 +size 8527 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.avatar_null_DefaultGroup_InitialsAvatarPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.avatar_null_DefaultGroup_AvatarLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.avatar_null_DefaultGroup_InitialsAvatarPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.avatar_null_DefaultGroup_AvatarLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..886a306c07 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8988d36c35a1b134e878a7276d18cf2cb7779ff6ceb4a7436cfa9aa2ad7bed87 +size 18722 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..7720c31f21 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf1eaf7c71a6bd5855b40efc0852cf023c790142502fa1149878c8d0dd209be3 +size 18495 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..4fa59da9a0 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaf83db86c387f95244f106ee642a0524c24030f61d62f3cba3566fb37c00dcf +size 12280 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..2a7fdb03fc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3766ad81b5bb9b1e674ad8ad6efc481a95bfd655195d5c8b814ba2f16594640 +size 12374 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..a8a3738f0e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f67cd11f58cba1e7de19aab0c35ca0638b4c0f0dee373d4fc7155e903285e62 +size 15843 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSlideDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSlideDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..1bf464f832 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSlideDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5141e6fedfb2e6c22abbe9efd30258223283ee470d79d3aa59bbf58bc1ce900 +size 8904 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSlidePreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSlideLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSlidePreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSlideLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..a160900ada --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb61f940a3a773ed05e515807797b88eb4a4f38ffc6f99a5c5816bd5d403fbdd +size 7546 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceTextDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceTextDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..49d48a0ead --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceTextDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55d597b5b3bb53c1f7fcd96104548c6b93de4a4ef464302c73ba04c6a6d85afd +size 6117 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceTextPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceTextLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceTextPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceTextLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceScreenPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceViewDarkPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceScreenPreview_,NEXUS_5,1,dark,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceViewDarkPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceScreenPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceViewLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceScreenPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.preferences_null_DefaultGroup_PreferenceViewLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_LabelledCheckboxDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_LabelledCheckboxDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..fb4edaf477 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_LabelledCheckboxDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcbf114b16949dc147ed8437ad80470635c44716e9938b441d8ec2bd453bef66 +size 7801 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_LabelledCheckboxPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_LabelledCheckboxLightPreview_,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_LabelledCheckboxPreview_,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_LabelledCheckboxLightPreview_,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..91688bd758 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17d4e90669b132283c8be57ac9e35fda09263f28f5f1075a3f8878ef5357cff3 +size 9648 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..bd42f78314 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components_null_DefaultGroup_ProgressDialogLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:473beb3dcaeb9325aa92f98582b322fe74e2026659fe3cbdff793ee68246e7c1 +size 9923 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..0eadae1fce --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dce173f40598eb7ee75febe9135c6563ef7b35e6861dcf6f2d09c0af5febebb8 +size 13450 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..b46401dbe3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_ButtonsLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52bbba0b16671da66ae06ad549151f794023043025971729ae1f5b9d6bb8f4ae +size 12689 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..4ee8b68466 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72b4f5c01f5236b7141b222cf8414f303ac60b74c386d2c71fa6348b2ab1173b +size 7506 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..3fe644f51e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_CheckboxesLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3fc3903727b9ff1941ae59bf0566ac7485705813606550ad8ac615726e4efab +size 6121 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..8d3376900b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:274521bb420e73dcce6bca9d4328909d896998e4fdf3cebe79dd7c6c4873db45 +size 4469 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..3ffdafd3ac --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_DividerLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e3a82fb55f7a5be9ddbb5a8146d4fe53ad6111e21b40912428fd95dde85346c +size 4470 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..fb679b5908 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e842ff561687f991106043a4f6b51455bd917db879ef1d624bd59df155ac61dd +size 21932 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..36cc8f6ff1 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_OutlinedTextFieldsLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c0ef4d55a1a21fdcec03d5f95871cb0bea94350cbfc5ed7a50cc343df7898ec +size 21054 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..0261662a40 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73a3e053cfbc83db5222b89209597ba56c3797da224b2e4a70286740c686c2ab +size 6388 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..d7d6b5016d --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_SlidersLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b9632ce17a34536ad14ada77f5852c43d0628444a2ee7a1b129432d98e92399 +size 6290 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..9a2284a7ab --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5127c51e1eb76ceb0620073449a5dde0805f9ba3d0fae6368aaf15473e837c1f +size 104643 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..cf5702384e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2239989d1ea3db71952a74282d79a08c4e2dbc321c1cea6478b7cf25957bfecb +size 102883 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesDarkPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesDarkPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..f30ca8538a --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesDarkPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75ed390c5f71cdfebf87f722b3d377f6c1a047d2b3791812516ddad2c2326407 +size 30804 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesLightPreview_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesLightPreview_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..ba868312fc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorAliasesLightPreview_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f388b7b6dce61610a5bb3d839f3be11be19363cf734a3f70032354d33f2b0db +size 32087 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewDark_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewDark_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..62ad4ddd72 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewDark_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:425c923cf0e7993816c237d22a50c32962dc58e42a56bba788742f5b5ac2fdc6 +size 115420 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewLight_,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewLight_,NEXUS_5,1,en].png new file mode 100644 index 0000000000..f4f1aeaa13 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme_null_DefaultGroup_ColorsSchemePreviewLight_,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c25192e1654d49d72af7591700ee88303562812de23ec1118e8f27d852da8a9 +size 116950 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.tests.uitests_null_DefaultGroup_ShowkaseButtonDarkPreview_null,NEXUS_5,1,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.tests.uitests_null_DefaultGroup_ShowkaseButtonDarkPreview_null,NEXUS_5,1,en].png new file mode 100644 index 0000000000..d3e7ef562a --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.tests.uitests_null_DefaultGroup_ShowkaseButtonDarkPreview_null,NEXUS_5,1,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0eebdfaaf064be053b22b548fdf45fe218a341fa8718d204e8c2463e45a374bb +size 10649 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.tests.uitests_null_Buttons_Showkasebutton_null,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.tests.uitests_null_DefaultGroup_ShowkaseButtonLightPreview_null,NEXUS_5,1,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.tests.uitests_null_Buttons_Showkasebutton_null,NEXUS_5,1,light,en].png rename to tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.tests.uitests_null_DefaultGroup_ShowkaseButtonLightPreview_null,NEXUS_5,1,en].png diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,dark,en].png deleted file mode 100644 index 44aabba74b..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_DarkGrey,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:457c973681addb003e8f84ce3706361cfe0bb88845799838971da910476a4ba8 -size 4371 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,dark,en].png deleted file mode 100644 index 35c67a316c..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Color_Material Design_LightGrey,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2c05b0f79fea3df1147a454202f1ca2973d48939e4fc296be171ad98f272333 -size 4371 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,dark,en].png deleted file mode 100644 index 786ac1495b..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Body Large,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d1b2622226f026d0231020c389b6e99a1c50cd0bc84d77df6060e390c8521fb -size 7056 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,dark,en].png deleted file mode 100644 index ab15d2cfd5..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de0b7b271b6057db6ef81888356583bdc3432e4f26a52c58586f88043de20021 -size 9476 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,light,en].png deleted file mode 100644 index 02e426ff7b..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[Typo_Element_Headline Small,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d02db7b3881676d8b194e6871e178af8af99e09bd5cc15b865a25bd405e3fc33 -size 9445 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.avatar_null_DefaultGroup_InitialsAvatarPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.avatar_null_DefaultGroup_InitialsAvatarPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 2c7e9fbd5d..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.avatar_null_DefaultGroup_InitialsAvatarPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c0fb883d948d8177cd32eb81b24e7b104acd7b6b120b73d6693088f947701da -size 8295 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 29165db48c..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6d88788a186b08d8e2834c39efb1c6476cf51aec70aa08dc806eb69e2d98d9a -size 20004 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index 4193346f3c..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ConfirmationDialogPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45860d45aefad7cfd7d7b9f92146799860a5ede7e815d5b28b606fc566b3838c -size 18344 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 8bba8846db..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39d924e3718d7f045c15888373a96ec85d4afd0ef405bf25edc453fddaacdc55 -size 13082 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index 49b0df4d6f..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.dialogs_null_DefaultGroup_ErrorDialogPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5e5bf72f9d90cbe4b4136a4a2e30168895a3354c6f35ed1d4fc77bfe2987fdaf -size 12565 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 2d55ca4648..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceCategoryPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e23f8342179fc1a88c278f8e81ddb026034958a6b2fdbaae06ff26dc282d483 -size 11654 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSlidePreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSlidePreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 302811af53..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSlidePreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb61547b9e5b4666abd74145086ae2ee846dced3099f9b36dd2534047caf3266 -size 8465 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 707aefe0fb..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceSwitchPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d5db2a9a3f2d9bec3d74b45892ee453c51afc3b3b41d6ec1624d72a8377176b4 -size 7095 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceTextPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceTextPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 2fd0494ca5..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components.preferences_null_DefaultGroup_PreferenceTextPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b9a36ce6978aa3182e519789a8ea7e1399ae63da630fa7f6727248ba8ba010f7 -size 4837 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_LabelledCheckboxPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_LabelledCheckboxPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 9aa044dfae..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_LabelledCheckboxPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f331a07e5b56c550023b9c4eff3afd71fece8dd4d649fd1e2aaa178c27557fda -size 5007 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 9c2e5c3087..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e302ba0695a7663e1abcb98d47cecf5b78968d76202841f9e251313d3dd8c579 -size 10232 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index 2a54849c8d..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.designsystem.components_null_DefaultGroup_ProgressDialogPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08918409e8daa9f2d3498fe9f463323e737e59ec8472a50b6bf5ec13a1abacfc -size 9576 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.changeserver_null_DefaultGroup_ChangeServerContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.changeserver_null_DefaultGroup_ChangeServerContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index f168f5fb81..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.changeserver_null_DefaultGroup_ChangeServerContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0689e18b72a961ecbea6011c73568703ba255375fdb9bbe34b2e94f08c379cc7 -size 27841 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.root_null_DefaultGroup_LoginContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.root_null_DefaultGroup_LoginContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 815940ac34..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.login.root_null_DefaultGroup_LoginContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc2f6c7463b55716720344a2e873774ea09d98717add30b748a54f1e0374ec04 -size 24751 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.logout_null_DefaultGroup_LogoutContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.logout_null_DefaultGroup_LogoutContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 89df9fb9e1..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.logout_null_DefaultGroup_LogoutContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:accc42a849df3c0d8a16de0e21842139558d8c68cdcf9efcccf6b58a7cb3b4b3 -size 4742 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,dark,en].png deleted file mode 100644 index 4676f3504b..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3d5fb95fb866a51e2dbc26239dc70e37a92bddc79d4edc027226948dfe323312 -size 30189 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,light,en].png deleted file mode 100644 index 54c51dda5c..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__0,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b7d3c2cf8d466f6e25404596079fb6254ad6e9fb3ba3f0f72ef1c0ba019dc60 -size 31165 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,dark,en].png deleted file mode 100644 index 6dfe58cbdc..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1be16bc1a73ef5bb7af740b8720c508dbc202d4748d60fb2e10fabcfdeacc75c -size 43668 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,light,en].png deleted file mode 100644 index 7b8a310f6f..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__1,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02c410850ed4b8658a21c4a60b62757baa9799d4c6dee4d53d2e6b2ca76f7b61 -size 41942 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,dark,en].png deleted file mode 100644 index 2c2a002ae5..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19bcd322392a4d27742a25989810e38d4ac6a38edfb5a228bc13364ed36e7101 -size 31691 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,light,en].png deleted file mode 100644 index 7344b3e35e..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__2,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a0ea920c88ab127513918055621a75528de35d69296727a8be7368df4c848e9 -size 33040 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,dark,en].png deleted file mode 100644 index b4dc232172..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ea0809dcddfc5df7aaba26f4ed74bebe404c86f5923c78541518fb7560e897e -size 55699 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,light,en].png deleted file mode 100644 index 89d55c25a3..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__3,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc36b26cbaab9ee19c898a27bc5bc0a04c77e4004933c47fc69608df103e08d9 -size 52964 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,dark,en].png deleted file mode 100644 index 9b684aa226..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e50733c48b4cb37fc82c228a7013c7aa74e263b13014cb57c7bb1ca0c2ea91c6 -size 28631 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,light,en].png deleted file mode 100644 index 1d930443fe..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__4,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0500e499fb319057b0ca5feb9db9e429266a2832521b429d502d1f62804ee23f -size 29222 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,dark,en].png deleted file mode 100644 index bf5d223a28..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab7cb0da1b64d2c6d87578debbc336feedbe203f6331726503a084101b9a10e6 -size 51186 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,light,en].png deleted file mode 100644 index 0a01c81f08..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.messages.timeline_null_DefaultGroup_TimelineItemsPreview__5,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5535df19747bdec380b79eec8b9d8e2d7e6ed765fe0bb4e4c1c2ffeb4de46854 -size 49115 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 738199e997..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a588e13eaa5fef1f93443445c15256037a70771260e24ca4ee6700e55519bf50 -size 27107 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index 9270e28bd0..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.preferences.root_null_DefaultGroup_PreferencesContentPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58f4e6a4bed5bb2fe4cf2556ee04984dc3efb78ccc4bc501f98f733d1d849289 -size 26636 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.bugreport_null_DefaultGroup_BugReportContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.bugreport_null_DefaultGroup_BugReportContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 91b32ac1a3..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.bugreport_null_DefaultGroup_BugReportContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cf66a0074d1d7842ee176eb6a5e655fe9ed734a95078731cdacd4d7d8f2a80c -size 49391 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 706c00952e..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e04b3a5a4db346d18666fc4df81fdbb1fa84dc526020fdc257c33190e122c11f -size 29757 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index a6318eea0e..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.crash.ui_null_DefaultGroup_CrashDetectionContentPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:af0d4d6e3dcda60a7aa4aa20df2b012359c21d51bc9b94e4ed04b19b1d8f38e4 -size 28409 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 20a47c41b4..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4c1e1b89f3692c1441ec502afe20c1b1d3746c996435ba7abfd624ee88995dc -size 34328 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index 1a442816eb..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.detection_null_DefaultGroup_RageshakeDialogContentPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c74aecba85977483d6415f6cacc2a45199f763773fde1a590a96d43d83b2de0e -size 32407 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferenceNotSupportedPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferenceNotSupportedPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index 003c8fc202..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferenceNotSupportedPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a0c3a23a06fa723cf6474fda8f8fb88f876b78d7293121ffb438eddacb834f8 -size 4895 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index e78a01a2ea..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.rageshake.preferences_null_DefaultGroup_RageshakePreferencesViewPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:685ec863756abd3036b9db5303684b7a347ae148973670bfbedca421b0d0c464 -size 15532 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,dark,en].png deleted file mode 100644 index d3499bc2fc..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b76198faaae0e5bdc4d7ace41cad029f48603c2ee5dcb8e246cfeb524c1d39ad -size 35856 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,light,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,light,en].png deleted file mode 100644 index fad4fef94a..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.features.roomlist_null_DefaultGroup_RoomListViewPreview_,NEXUS_5,1,light,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1aea2bc7f73fd2b3a7d11fcab917e61025dcd536bb912a4bfd7d0ceb33e726a -size 33553 diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.tests.uitests_null_Buttons_Showkasebutton_null,NEXUS_5,1,dark,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.tests.uitests_null_Buttons_Showkasebutton_null,NEXUS_5,1,dark,en].png deleted file mode 100644 index 687e51b32c..0000000000 --- a/tests/uitests/src/test/snapshots/images/io.element.android.x.tests.uitests_ScreenshotTest_preview_tests[io.element.android.x.tests.uitests_null_Buttons_Showkasebutton_null,NEXUS_5,1,dark,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:35d660e370ec4f7f4e0165418a2981f1afe057cac312ee9cad1c4a4dcc02f189 -size 10386 diff --git a/tools/detekt/detekt.yml b/tools/detekt/detekt.yml index 3634454339..9b95b0cc16 100644 --- a/tools/detekt/detekt.yml +++ b/tools/detekt/detekt.yml @@ -107,7 +107,7 @@ TwitterCompose: CompositionLocalAllowlist: active: true # You can optionally define a list of CompositionLocals that are allowed here - # allowedCompositionLocals: LocalSomething,LocalSomethingElse + allowedCompositionLocals: LocalColors CompositionLocalNaming: active: true ContentEmitterReturningValues: @@ -137,7 +137,7 @@ TwitterCompose: PreviewNaming: active: true PreviewPublic: - active: true + active: false # You can optionally disable that only previews with @PreviewParameter are flagged previewPublicOnlyIfParams: false RememberMissing: