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 695d3bfaa7..5197605a64 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
@@ -31,6 +31,7 @@ import com.bumble.appyx.core.node.ParentNode
import com.bumble.appyx.core.node.node
import com.bumble.appyx.navmodel.backstack.BackStack
import com.bumble.appyx.navmodel.backstack.operation.push
+import io.element.android.features.createroom.CreateRoomFlowNode
import io.element.android.features.preferences.PreferencesFlowNode
import io.element.android.features.roomlist.RoomListNode
import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler
@@ -86,6 +87,10 @@ class LoggedInFlowNode(
override fun onSettingsClicked() {
backstack.push(NavTarget.Settings)
}
+
+ override fun onCreateRoomClicked() {
+ backstack.push(NavTarget.CreateRoom)
+ }
}
sealed interface NavTarget : Parcelable {
@@ -97,6 +102,9 @@ class LoggedInFlowNode(
@Parcelize
object Settings : NavTarget
+
+ @Parcelize
+ object CreateRoom : NavTarget
}
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
@@ -120,6 +128,9 @@ class LoggedInFlowNode(
NavTarget.Settings -> {
PreferencesFlowNode(buildContext, onOpenBugReport)
}
+ NavTarget.CreateRoom -> {
+ CreateRoomFlowNode(buildContext)
+ }
}
}
diff --git a/changelog.d/94.wip b/changelog.d/94.wip
new file mode 100644
index 0000000000..c73ddd86cb
--- /dev/null
+++ b/changelog.d/94.wip
@@ -0,0 +1 @@
+[Create and join rooms] Start new chat screen (UI)
diff --git a/features/createroom/.gitignore b/features/createroom/.gitignore
new file mode 100644
index 0000000000..42afabfd2a
--- /dev/null
+++ b/features/createroom/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/features/createroom/build.gradle.kts b/features/createroom/build.gradle.kts
new file mode 100644
index 0000000000..0450de2c3d
--- /dev/null
+++ b/features/createroom/build.gradle.kts
@@ -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.
+ */
+
+// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed
+@Suppress("DSL_SCOPE_VIOLATION")
+plugins {
+ id("io.element.android-compose-library")
+ alias(libs.plugins.ksp)
+ alias(libs.plugins.anvil)
+ id("kotlin-parcelize")
+}
+
+android {
+ namespace = "io.element.android.features.createroom"
+}
+
+anvil {
+ generateDaggerFactories.set(true)
+}
+
+dependencies {
+ anvil(projects.anvilcodegen)
+ implementation(projects.anvilannotations)
+
+ implementation(projects.libraries.core)
+ implementation(projects.libraries.architecture)
+ implementation(projects.libraries.matrix.api)
+ implementation(projects.libraries.matrixui)
+ implementation(projects.libraries.designsystem)
+ implementation(projects.libraries.elementresources)
+ implementation(projects.libraries.uiStrings)
+
+ testImplementation(libs.test.junit)
+ testImplementation(libs.coroutines.test)
+ testImplementation(libs.molecule.runtime)
+ testImplementation(libs.test.truth)
+ testImplementation(libs.test.turbine)
+ testImplementation(projects.libraries.matrix.test)
+
+ androidTestImplementation(libs.test.junitext)
+
+ ksp(libs.showkase.processor)
+}
diff --git a/features/createroom/consumer-rules.pro b/features/createroom/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/features/createroom/proguard-rules.pro b/features/createroom/proguard-rules.pro
new file mode 100644
index 0000000000..481bb43481
--- /dev/null
+++ b/features/createroom/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/features/createroom/src/main/AndroidManifest.xml b/features/createroom/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..86d497f107
--- /dev/null
+++ b/features/createroom/src/main/AndroidManifest.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt
new file mode 100644
index 0000000000..408fe0cb44
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/CreateRoomFlowNode.kt
@@ -0,0 +1,62 @@
+/*
+ * 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.features.createroom
+
+import android.os.Parcelable
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import com.bumble.appyx.core.composable.Children
+import com.bumble.appyx.core.modality.BuildContext
+import com.bumble.appyx.core.node.Node
+import com.bumble.appyx.core.node.ParentNode
+import com.bumble.appyx.navmodel.backstack.BackStack
+import io.element.android.features.createroom.root.CreateRoomRootNode
+import io.element.android.libraries.architecture.animation.rememberDefaultTransitionHandler
+import io.element.android.libraries.architecture.createNode
+import kotlinx.parcelize.Parcelize
+
+class CreateRoomFlowNode(
+ buildContext: BuildContext,
+ private val backstack: BackStack = BackStack(
+ initialElement = NavTarget.Root,
+ savedStateMap = buildContext.savedStateMap,
+ ),
+) : ParentNode(
+ navModel = backstack,
+ buildContext = buildContext
+) {
+
+ sealed interface NavTarget : Parcelable {
+ @Parcelize
+ object Root : NavTarget
+ }
+
+ override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
+ return when (navTarget) {
+ NavTarget.Root -> createNode(buildContext)
+ }
+ }
+
+ @Composable
+ override fun View(modifier: Modifier) {
+ Children(
+ navModel = backstack,
+ modifier = modifier,
+ transitionHandler = rememberDefaultTransitionHandler()
+ )
+ }
+}
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt
new file mode 100644
index 0000000000..820d071866
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootEvents.kt
@@ -0,0 +1,22 @@
+/*
+ * 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.features.createroom.root
+
+sealed interface CreateRoomRootEvents {
+ object CreateRoom : CreateRoomRootEvents
+ object InvitePeople : CreateRoomRootEvents
+}
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.kt
new file mode 100644
index 0000000000..8d3d41b434
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootNode.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.features.createroom.root
+
+import android.os.Parcelable
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import com.bumble.appyx.core.modality.BuildContext
+import com.bumble.appyx.core.node.Node
+import com.bumble.appyx.core.plugin.Plugin
+import dagger.assisted.Assisted
+import dagger.assisted.AssistedInject
+import io.element.android.anvilannotations.ContributesNode
+import io.element.android.libraries.di.SessionScope
+import kotlinx.parcelize.Parcelize
+
+@ContributesNode(SessionScope::class)
+class CreateRoomRootNode @AssistedInject constructor(
+ @Assisted buildContext: BuildContext,
+ @Assisted plugins: List,
+ private val presenter: CreateRoomRootPresenter,
+) : Node(buildContext, plugins = plugins) {
+
+ sealed interface NavTarget : Parcelable {
+ @Parcelize
+ object Root : NavTarget
+ }
+
+ @Composable
+ override fun View(modifier: Modifier) {
+ val state = presenter.present()
+ CreateRoomRootScreen(
+ state = state,
+ modifier = modifier,
+ onClosePressed = this::navigateUp,
+ )
+ }
+}
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt
new file mode 100644
index 0000000000..ad93d9143d
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenter.kt
@@ -0,0 +1,39 @@
+/*
+ * 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.features.createroom.root
+
+import androidx.compose.runtime.Composable
+import io.element.android.libraries.architecture.Presenter
+import javax.inject.Inject
+
+class CreateRoomRootPresenter @Inject constructor() : Presenter {
+
+ @Composable
+ override fun present(): CreateRoomRootState {
+
+ fun handleEvents(event: CreateRoomRootEvents) {
+ when (event) {
+ CreateRoomRootEvents.CreateRoom -> Unit // Todo Handle create room action
+ CreateRoomRootEvents.InvitePeople -> Unit // Todo Handle invite people action
+ }
+ }
+
+ return CreateRoomRootState(
+ eventSink = ::handleEvents
+ )
+ }
+}
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt
new file mode 100644
index 0000000000..889207265e
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootScreen.kt
@@ -0,0 +1,236 @@
+/*
+ * 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.features.createroom.root
+
+import androidx.annotation.DrawableRes
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.heightIn
+import androidx.compose.foundation.layout.padding
+import androidx.compose.material.icons.Icons
+import androidx.compose.material.icons.filled.Close
+import androidx.compose.material.icons.filled.Search
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.SearchBarDefaults
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.saveable.rememberSaveable
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.alpha
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.platform.LocalFocusManager
+import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.tooling.preview.Preview
+import androidx.compose.ui.tooling.preview.PreviewParameter
+import androidx.compose.ui.unit.dp
+import androidx.compose.ui.unit.sp
+import io.element.android.libraries.designsystem.components.button.BackButton
+import io.element.android.libraries.designsystem.preview.ElementPreviewDark
+import io.element.android.libraries.designsystem.preview.ElementPreviewLight
+import io.element.android.libraries.designsystem.theme.components.CenterAlignedTopAppBar
+import io.element.android.libraries.designsystem.theme.components.DockedSearchBar
+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.R as DrawableR
+import io.element.android.libraries.ui.strings.R as StringR
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun CreateRoomRootScreen(
+ state: CreateRoomRootState,
+ modifier: Modifier = Modifier,
+ onClosePressed: () -> Unit = {},
+) {
+ var searchText by rememberSaveable { mutableStateOf("") }
+ var isSearchActive by rememberSaveable { mutableStateOf(false) }
+ Scaffold(
+ modifier = modifier.fillMaxWidth(),
+ topBar = {
+ if (!isSearchActive) {
+ CreateRoomRootViewTopBar(onClosePressed = onClosePressed)
+ }
+ }
+ ) { paddingValues ->
+ Column(
+ modifier = Modifier.padding(paddingValues),
+ verticalArrangement = Arrangement.spacedBy(8.dp),
+ ) {
+ CreateRoomSearchBar(
+ modifier = Modifier.fillMaxWidth(),
+ text = searchText,
+ placeHolderTitle = stringResource(StringR.string.search_for_someone),
+ active = isSearchActive,
+ onActiveChanged = { isSearchActive = it },
+ onTextChanged = { searchText = it },
+ )
+
+ if (!isSearchActive) {
+ CreateRoomActionButtonsList(
+ onNewRoomClicked = { state.eventSink(CreateRoomRootEvents.CreateRoom) },
+ onInvitePeopleClicked = { state.eventSink(CreateRoomRootEvents.InvitePeople) },
+ )
+ }
+ }
+ }
+}
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun CreateRoomRootViewTopBar(
+ modifier: Modifier = Modifier,
+ onClosePressed: () -> Unit = {},
+) {
+ CenterAlignedTopAppBar(
+ modifier = modifier,
+ title = {
+ Text(
+ text = stringResource(id = StringR.string.start_chat),
+ fontSize = 16.sp,
+ fontWeight = FontWeight.SemiBold,
+ )
+ },
+ actions = {
+ IconButton(onClick = onClosePressed) {
+ Icon(imageVector = Icons.Default.Close, contentDescription = stringResource(id = StringR.string.action_close))
+ }
+ }
+ )
+}
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun CreateRoomSearchBar(
+ text: String,
+ placeHolderTitle: String,
+ active: Boolean,
+ modifier: Modifier = Modifier,
+ onActiveChanged: (Boolean) -> Unit = {},
+ onTextChanged: (String) -> Unit = {},
+) {
+ val focusManager = LocalFocusManager.current
+
+ if (!active) {
+ onTextChanged("")
+ focusManager.clearFocus()
+ }
+
+ DockedSearchBar(
+ query = text,
+ onQueryChange = onTextChanged,
+ onSearch = { focusManager.clearFocus() },
+ active = active,
+ onActiveChange = onActiveChanged,
+ modifier = modifier
+ .padding(horizontal = if (!active) 16.dp else 0.dp),
+ placeholder = {
+ Text(
+ text = placeHolderTitle,
+ modifier = Modifier.alpha(0.4f), // FIXME align on Design system theme (removing alpha should be fine)
+ )
+ },
+ leadingIcon = if (active) {
+ { BackButton(onClick = { onActiveChanged(false) }) }
+ } else null,
+ trailingIcon = {
+ if (active) {
+ IconButton(onClick = { onTextChanged("") }) {
+ Icon(Icons.Default.Close, stringResource(StringR.string.a11y_clear))
+ }
+ } else {
+ Icon(
+ imageVector = Icons.Default.Search,
+ contentDescription = stringResource(StringR.string.search),
+ modifier = Modifier.alpha(0.4f), // FIXME align on Design system theme (removing alpha should be fine)
+ )
+ }
+ },
+ shape = if (!active) SearchBarDefaults.dockedShape else SearchBarDefaults.fullScreenShape,
+ colors = if (!active) SearchBarDefaults.colors() else SearchBarDefaults.colors(containerColor = Color.Transparent),
+ content = {},
+ )
+}
+
+@Composable
+fun CreateRoomActionButtonsList(
+ modifier: Modifier = Modifier,
+ onNewRoomClicked: () -> Unit = {},
+ onInvitePeopleClicked: () -> Unit = {},
+) {
+ Column(modifier = modifier) {
+ CreateRoomActionButton(
+ iconRes = DrawableR.drawable.ic_groups,
+ text = stringResource(id = StringR.string.new_room),
+ onClick = onNewRoomClicked,
+ )
+ CreateRoomActionButton(
+ iconRes = DrawableR.drawable.ic_share,
+ text = stringResource(id = StringR.string.invite_people_menu),
+ onClick = onInvitePeopleClicked,
+ )
+ }
+}
+
+@Composable
+fun CreateRoomActionButton(
+ @DrawableRes iconRes: Int,
+ text: String,
+ modifier: Modifier = Modifier,
+ onClick: () -> Unit = {},
+) {
+ Row(
+ modifier = modifier
+ .fillMaxWidth()
+ .heightIn(min = 56.dp)
+ .clickable { onClick() }
+ .padding(horizontal = 16.dp),
+ horizontalArrangement = Arrangement.spacedBy(16.dp),
+ verticalAlignment = Alignment.CenterVertically,
+ ) {
+ Icon(
+ modifier = Modifier.alpha(0.5f), // FIXME align on Design system theme (removing alpha should be fine)
+ resourceId = iconRes,
+ contentDescription = null,
+ )
+ Text(text = text)
+ }
+}
+
+@Preview
+@Composable
+fun CreateRoomRootViewLightPreview(@PreviewParameter(CreateRoomRootStateProvider::class) state: CreateRoomRootState) =
+ ElementPreviewLight { ContentToPreview(state) }
+
+@Preview
+@Composable
+fun CreateRoomRootViewDarkPreview(@PreviewParameter(CreateRoomRootStateProvider::class) state: CreateRoomRootState) =
+ ElementPreviewDark { ContentToPreview(state) }
+
+@Composable
+private fun ContentToPreview(state: CreateRoomRootState) {
+ CreateRoomRootScreen(
+ state = state,
+ )
+}
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt
new file mode 100644
index 0000000000..9793cd950e
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootState.kt
@@ -0,0 +1,23 @@
+/*
+ * 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.features.createroom.root
+
+// TODO add your ui models. Remove the eventSink if you don't have events.
+// Do not use default value, so no member get forgotten in the presenters.
+data class CreateRoomRootState(
+ val eventSink: (CreateRoomRootEvents) -> Unit
+)
diff --git a/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt
new file mode 100644
index 0000000000..b5ff38bcec
--- /dev/null
+++ b/features/createroom/src/main/kotlin/io/element/android/features/createroom/root/CreateRoomRootStateProvider.kt
@@ -0,0 +1,31 @@
+/*
+ * 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.features.createroom.root
+
+import androidx.compose.ui.tooling.preview.PreviewParameterProvider
+
+open class CreateRoomRootStateProvider : PreviewParameterProvider {
+ override val values: Sequence
+ get() = sequenceOf(
+ aCreateRoomRootState(),
+ // Add other state here
+ )
+}
+
+fun aCreateRoomRootState() = CreateRoomRootState(
+ eventSink = {}
+)
diff --git a/features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt b/features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt
new file mode 100644
index 0000000000..c03b48efa8
--- /dev/null
+++ b/features/createroom/src/test/kotlin/io/element/android/features/createroom/root/CreateRoomRootPresenterTests.kt
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+@file:OptIn(ExperimentalCoroutinesApi::class)
+
+package io.element.android.features.createroom.root
+
+import app.cash.molecule.RecompositionClock
+import app.cash.molecule.moleculeFlow
+import app.cash.turbine.test
+import com.google.common.truth.Truth.assertThat
+import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.test.runTest
+import org.junit.Test
+
+class CreateRoomRootPresenterTests {
+
+ @Test
+ fun `present - initial state`() = runTest {
+ val presenter = CreateRoomRootPresenter()
+ moleculeFlow(RecompositionClock.Immediate) {
+ presenter.present()
+ }.test {
+ val initialState = awaitItem()
+ assertThat(initialState)
+ }
+ }
+
+ @Test
+ fun `present - send event`() = runTest {
+ val presenter = CreateRoomRootPresenter()
+ moleculeFlow(RecompositionClock.Immediate) {
+ presenter.present()
+ }.test {
+ val initialState = awaitItem()
+ initialState.eventSink(CreateRoomRootEvents.CreateRoom) // Not implemented yet
+ initialState.eventSink(CreateRoomRootEvents.InvitePeople) // Not implemented yet
+ }
+ }
+}
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 ba9a754fd5..559eea4e4a 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
@@ -60,7 +60,7 @@ 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.LocalColors
-import io.element.android.libraries.designsystem.theme.components.BackButton
+import io.element.android.libraries.designsystem.components.button.BackButton
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
@@ -104,7 +104,7 @@ fun ChangeServerView(
topBar = {
TopAppBar(
title = {},
- navigationIcon = { BackButton(action = onBackPressed, enabled = interactionEnabled) }
+ navigationIcon = { BackButton(onClick = onBackPressed, enabled = interactionEnabled) }
)
}
) { padding ->
@@ -192,7 +192,7 @@ fun ChangeServerView(
IconButton(onClick = {
homeserverFieldState = ""
}, enabled = interactionEnabled) {
- Icon(imageVector = Icons.Filled.Close, contentDescription = stringResource(StringR.string.action_clear))
+ Icon(imageVector = Icons.Filled.Close, contentDescription = stringResource(StringR.string.a11y_clear))
}
}
} else null,
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 0b8a09b42d..2ee4700f94 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
@@ -68,7 +68,7 @@ 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.BackButton
+import io.element.android.libraries.designsystem.components.button.BackButton
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
@@ -101,7 +101,7 @@ fun LoginRootScreen(
topBar = {
TopAppBar(
title = {},
- navigationIcon = { BackButton(action = onBackPressed, enabled = interactionEnabled) },
+ navigationIcon = { BackButton(onClick = onBackPressed, enabled = interactionEnabled) },
)
}
) { padding ->
@@ -267,7 +267,7 @@ internal fun LoginForm(
IconButton(onClick = {
loginFieldState = ""
}) {
- Icon(imageVector = Icons.Filled.Close, contentDescription = stringResource(StringR.string.action_clear))
+ Icon(imageVector = Icons.Filled.Close, contentDescription = stringResource(StringR.string.a11y_clear))
}
}
} else null,
diff --git a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt
index cec107a412..579c7ae980 100644
--- a/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt
+++ b/features/roomlist/src/main/kotlin/io/element/android/features/roomlist/RoomListNode.kt
@@ -38,6 +38,7 @@ class RoomListNode @AssistedInject constructor(
interface Callback : Plugin {
fun onRoomClicked(roomId: RoomId)
fun onSettingsClicked()
+ fun onCreateRoomClicked()
}
private fun onRoomClicked(roomId: RoomId) {
@@ -48,6 +49,10 @@ class RoomListNode @AssistedInject constructor(
plugins().forEach { it.onSettingsClicked() }
}
+ private fun onCreateRoomClicked() {
+ plugins().forEach { it.onCreateRoomClicked() }
+ }
+
@Composable
override fun View(modifier: Modifier) {
val state = presenter.present()
@@ -55,7 +60,8 @@ class RoomListNode @AssistedInject constructor(
state = state,
modifier = modifier,
onRoomClicked = this::onRoomClicked,
- onOpenSettings = this::onOpenSettings
+ onOpenSettings = this::onOpenSettings,
+ onCreateRoomClicked = this::onCreateRoomClicked,
)
}
}
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 b7d1d122dc..77ab1adbc7 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
@@ -22,6 +22,7 @@ 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.MaterialTheme
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
@@ -31,6 +32,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.nestedScroll
+import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.Velocity
@@ -42,11 +44,15 @@ import io.element.android.features.roomlist.model.RoomListState
import io.element.android.features.roomlist.model.RoomListStateProvider
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
+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.Scaffold
import io.element.android.libraries.designsystem.utils.LogCompositions
import io.element.android.libraries.matrix.api.core.RoomId
import io.element.android.libraries.matrix.ui.model.MatrixUser
import kotlinx.collections.immutable.ImmutableList
+import io.element.android.libraries.designsystem.R as DrawableR
+import io.element.android.libraries.ui.strings.R as StringR
@Composable
fun RoomListView(
@@ -54,6 +60,7 @@ fun RoomListView(
modifier: Modifier = Modifier,
onRoomClicked: (RoomId) -> Unit = {},
onOpenSettings: () -> Unit = {},
+ onCreateRoomClicked: () -> Unit = {},
) {
fun onFilterChanged(filter: String) {
state.eventSink(RoomListEvents.UpdateFilter(filter))
@@ -72,6 +79,7 @@ fun RoomListView(
onFilterChanged = ::onFilterChanged,
onOpenSettings = onOpenSettings,
onScrollOver = ::onVisibleRangedChanged,
+ onCreateRoomClicked = onCreateRoomClicked,
)
}
@@ -86,6 +94,7 @@ fun RoomListContent(
onFilterChanged: (String) -> Unit = {},
onOpenSettings: () -> Unit = {},
onScrollOver: (IntRange) -> Unit = {},
+ onCreateRoomClicked: () -> Unit = {},
) {
fun onRoomClicked(room: RoomListRoomSummary) {
onRoomClicked(room.roomId)
@@ -148,7 +157,16 @@ fun RoomListContent(
}
}
}
- }
+ },
+ floatingActionButton = {
+ FloatingActionButton(
+ // FIXME align on Design system theme
+ containerColor = MaterialTheme.colorScheme.primary,
+ onClick = onCreateRoomClicked
+ ) {
+ Icon(resourceId = DrawableR.drawable.ic_edit_square, contentDescription = stringResource(id = StringR.string.a11y_create_message))
+ }
+ },
)
}
diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BackButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/button/BackButton.kt
similarity index 70%
rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BackButton.kt
rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/button/BackButton.kt
index 8fb3989bd9..957526567f 100644
--- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BackButton.kt
+++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/button/BackButton.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package io.element.android.libraries.designsystem.theme.components
+package io.element.android.libraries.designsystem.components.button
import androidx.compose.foundation.layout.Column
import androidx.compose.material.icons.Icons
@@ -26,22 +26,24 @@ import androidx.compose.ui.res.stringResource
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.ui.strings.R.string as StringR
+import io.element.android.libraries.designsystem.theme.components.Icon
+import io.element.android.libraries.designsystem.theme.components.IconButton
+import io.element.android.libraries.ui.strings.R as StringR
@Composable
fun BackButton(
- action: () -> Unit,
+ onClick: () -> Unit,
modifier: Modifier = Modifier,
- icon: ImageVector = Icons.Default.ArrowBack,
- contentDescription: String = stringResource(StringR.action_back),
+ imageVector: ImageVector = Icons.Default.ArrowBack,
+ contentDescription: String = stringResource(StringR.string.a11y_back),
enabled: Boolean = true
) {
IconButton(
modifier = modifier,
- onClick = action,
+ onClick = onClick,
enabled = enabled,
) {
- Icon(imageVector = icon, contentDescription = contentDescription)
+ Icon(imageVector = imageVector, contentDescription = contentDescription)
}
}
@@ -56,7 +58,7 @@ internal fun BackButtonPreviewDark() = ElementPreviewDark { ContentToPreview() }
@Composable
private fun ContentToPreview() {
Column {
- BackButton(action = { }, enabled = true, contentDescription = "Back")
- BackButton(action = { }, enabled = false, contentDescription = "Back")
+ BackButton(onClick = { }, enabled = true, contentDescription = "Back")
+ BackButton(onClick = { }, enabled = false, contentDescription = "Back")
}
}
diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CenterAlignedTopAppBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CenterAlignedTopAppBar.kt
new file mode 100644
index 0000000000..2d03d8312c
--- /dev/null
+++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CenterAlignedTopAppBar.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.
+ */
+
+@file:OptIn(ExperimentalMaterial3Api::class)
+
+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
+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 CenterAlignedTopAppBar(
+ title: @Composable () -> Unit,
+ modifier: Modifier = Modifier,
+ navigationIcon: @Composable () -> Unit = {},
+ actions: @Composable RowScope.() -> Unit = {},
+ windowInsets: WindowInsets = TopAppBarDefaults.windowInsets,
+ colors: TopAppBarColors = TopAppBarDefaults.centerAlignedTopAppBarColors(),
+ scrollBehavior: TopAppBarScrollBehavior? = null,
+) {
+ androidx.compose.material3.CenterAlignedTopAppBar(
+ title = title,
+ modifier = modifier,
+ navigationIcon = navigationIcon,
+ actions = actions,
+ windowInsets = windowInsets,
+ colors = colors,
+ scrollBehavior = scrollBehavior,
+ )
+}
+
+@Preview
+@Composable
+internal fun CenterAlignedTopAppBarLightPreview() =
+ ElementPreviewLight { ContentToPreview() }
+
+@Preview
+@Composable
+internal fun CenterAlignedTopAppBarDarkPreview() =
+ ElementPreviewDark { ContentToPreview() }
+
+@Composable
+private fun ContentToPreview() {
+ CenterAlignedTopAppBar(title = { Text(text = "Title") })
+}
diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DockedSearchBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DockedSearchBar.kt
new file mode 100644
index 0000000000..100ae259f8
--- /dev/null
+++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DockedSearchBar.kt
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+
+@file:OptIn(ExperimentalMaterial3Api::class)
+
+package io.element.android.libraries.designsystem.theme.components
+
+import androidx.compose.foundation.interaction.MutableInteractionSource
+import androidx.compose.foundation.layout.ColumnScope
+import androidx.compose.material3.ExperimentalMaterial3Api
+import androidx.compose.material3.SearchBarColors
+import androidx.compose.material3.SearchBarDefaults
+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 androidx.compose.ui.unit.Dp
+import io.element.android.libraries.designsystem.preview.ElementPreviewDark
+import io.element.android.libraries.designsystem.preview.ElementPreviewLight
+
+@OptIn(ExperimentalMaterial3Api::class)
+@Composable
+fun DockedSearchBar(
+ query: String,
+ onQueryChange: (String) -> Unit,
+ onSearch: (String) -> Unit,
+ active: Boolean,
+ onActiveChange: (Boolean) -> Unit,
+ modifier: Modifier = Modifier,
+ enabled: Boolean = true,
+ placeholder: @Composable (() -> Unit)? = null,
+ leadingIcon: @Composable (() -> Unit)? = null,
+ trailingIcon: @Composable (() -> Unit)? = null,
+ shape: Shape = SearchBarDefaults.dockedShape,
+ colors: SearchBarColors = SearchBarDefaults.colors(),
+ tonalElevation: Dp = SearchBarDefaults.Elevation,
+ interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ content: @Composable ColumnScope.() -> Unit,
+) {
+ androidx.compose.material3.DockedSearchBar(
+ query = query,
+ onQueryChange = onQueryChange,
+ onSearch = onSearch,
+ active = active,
+ onActiveChange = onActiveChange,
+ modifier = modifier,
+ enabled = enabled,
+ placeholder = placeholder,
+ leadingIcon = leadingIcon,
+ trailingIcon = trailingIcon,
+ shape = shape,
+ colors = colors,
+ tonalElevation = tonalElevation,
+ interactionSource = interactionSource,
+ content = content,
+ )
+}
+
+@Preview
+@Composable
+internal fun DockedSearchBarLightPreview() = ElementPreviewLight { ContentToPreview() }
+
+@Preview
+@Composable
+internal fun DockedSearchBarDarkPreview() = ElementPreviewDark { ContentToPreview() }
+
+@Composable
+private fun ContentToPreview() {
+ DockedSearchBar(
+ query = "Some text",
+ onQueryChange = {},
+ onSearch = {},
+ active = false,
+ onActiveChange = {},
+ content = {},
+ )
+}
diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextButton.kt
new file mode 100644
index 0000000000..abd895fa87
--- /dev/null
+++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextButton.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 TextButton(
+ onClick: () -> Unit,
+ modifier: Modifier = Modifier,
+ enabled: Boolean = true,
+ shape: Shape = ButtonDefaults.textShape,
+ colors: ButtonColors = ButtonDefaults.textButtonColors(),
+ elevation: ButtonElevation? = null,
+ border: BorderStroke? = null,
+ contentPadding: PaddingValues = ButtonDefaults.TextButtonContentPadding,
+ interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
+ content: @Composable RowScope.() -> Unit
+) {
+ androidx.compose.material3.TextButton(
+ onClick = onClick,
+ modifier = modifier,
+ enabled = enabled,
+ shape = shape,
+ colors = colors,
+ elevation = elevation,
+ border = border,
+ contentPadding = contentPadding,
+ interactionSource = interactionSource,
+ content = content,
+ )
+}
+
+@Preview
+@Composable
+internal fun TextButtonLightPreview() = ElementPreviewLight { ContentToPreview() }
+
+@Preview
+@Composable
+internal fun TextButtonDarkPreview() = ElementPreviewDark { ContentToPreview() }
+
+@Composable
+private fun ContentToPreview() {
+ Column {
+ TextButton(onClick = {}, enabled = true) {
+ Text(text = "Click me! - Enabled")
+ }
+ TextButton(onClick = {}, enabled = false) {
+ Text(text = "Click me! - Disabled")
+ }
+ }
+}
diff --git a/libraries/designsystem/src/main/res/drawable/ic_edit_square.xml b/libraries/designsystem/src/main/res/drawable/ic_edit_square.xml
new file mode 100644
index 0000000000..73b092ea47
--- /dev/null
+++ b/libraries/designsystem/src/main/res/drawable/ic_edit_square.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
diff --git a/libraries/designsystem/src/main/res/drawable/ic_groups.xml b/libraries/designsystem/src/main/res/drawable/ic_groups.xml
new file mode 100644
index 0000000000..9e87f1d533
--- /dev/null
+++ b/libraries/designsystem/src/main/res/drawable/ic_groups.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/libraries/designsystem/src/main/res/drawable/ic_share.xml b/libraries/designsystem/src/main/res/drawable/ic_share.xml
new file mode 100644
index 0000000000..d38f7ae5f7
--- /dev/null
+++ b/libraries/designsystem/src/main/res/drawable/ic_share.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/libraries/ui-strings/src/main/res/values/strings_eax.xml b/libraries/ui-strings/src/main/res/values/strings_eax.xml
index 0ed87ec9f0..68644ef59d 100644
--- a/libraries/ui-strings/src/main/res/values/strings_eax.xml
+++ b/libraries/ui-strings/src/main/res/values/strings_eax.xml
@@ -2,17 +2,20 @@
- Back
- Clear
-
+
+ Back
+ Clear
+
Enter your details
Email or username
Show password
Hide password
-
What is the address of your server?
You can only connect to an existing server that supports sliding sync. Your homeserver admin will need to configure it.
Server not supported
This server currently doesn\'t support sliding sync.
+
+ Search for someone
+ New room
diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt
index 87e6b41094..9cdc2bd032 100644
--- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt
+++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt
@@ -39,7 +39,9 @@ fun DependencyHandlerScope.composeDependencies(libs: LibrariesForLibs) {
androidTestImplementation(composeBom)
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.material:material")
- implementation("androidx.compose.material3:material3")
+ // Override BOM version, SearchBar is not available in the actual version
+ // do not use latest version because of clashes on androidx lifecycle dependency
+ implementation("androidx.compose.material3:material3:1.1.0-alpha04")
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.activity:activity-compose:1.6.1")
@@ -67,4 +69,5 @@ fun DependencyHandlerScope.allFeatures() {
implementation(project(":features:messages"))
implementation(project(":features:rageshake"))
implementation(project(":features:preferences"))
+ implementation(project(":features:createroom"))
}
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 77751aeda1..de1417131e 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -57,6 +57,7 @@ include(":features:roomlist")
include(":features:messages")
include(":features:rageshake")
include(":features:preferences")
+include(":features:createroom")
include(":libraries:designsystem")
include(":libraries:di")
include(":tests:uitests")
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..5ae6ae4eb8
--- /dev/null
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewDarkPreview_0_null_0,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:510c17406a13ce64a9b7578d70535dac7fe20e9c3a9a4ab3c8cab775bc46f568
+size 19718
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..deae75a4c1
--- /dev/null
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.createroom.root_null_DefaultGroup_CreateRoomRootViewLightPreview_0_null_0,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:611b1efa9cf46316f96738130f326061595d2648ac7fb059df299e7c95f4e2a8
+size 18480
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_0_null_2,NEXUS_5,1.0,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_0_null_2,NEXUS_5,1.0,en].png
index c10eb7ab34..bbd5f35001 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_2,NEXUS_5,1.0,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_0_null_2,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3460e8f37e746e0ae7a30c1a055a3b68cc013197c4f2567d19ad51c00f8d6385
-size 34814
+oid sha256:a339ab789eb6710aa5edba53acc46a61de373566089590940ab4c8233e97558b
+size 34721
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_0_null_3,NEXUS_5,1.0,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_0_null_3,NEXUS_5,1.0,en].png
index 2d90c42c43..c9812164be 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_3,NEXUS_5,1.0,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_0_null_3,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f86089af6c02e8eb4811ae0092150c2d5e439731ae970e7954a66fca7f98fd11
-size 34173
+oid sha256:675c1cbfc80acec11434153dacb1d69b0cf6122fb068db8a92ae86e039a54c71
+size 34091
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_0_null_4,NEXUS_5,1.0,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_0_null_4,NEXUS_5,1.0,en].png
index be36dc12f3..a9b5fb5ca8 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_4,NEXUS_5,1.0,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_0_null_4,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b21168d83ed8d7c116e72dd76292975530f1c898ef32502aa382f292aef4f8aa
-size 30951
+oid sha256:8137f8ed97a1a924fc76e16c8f0f0fc5a4a866d989460859b98edfcb5c7f98b7
+size 30996
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_0_null_5,NEXUS_5,1.0,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_0_null_5,NEXUS_5,1.0,en].png
index c10eb7ab34..bbd5f35001 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenDarkPreview_0_null_5,NEXUS_5,1.0,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_0_null_5,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3460e8f37e746e0ae7a30c1a055a3b68cc013197c4f2567d19ad51c00f8d6385
-size 34814
+oid sha256:a339ab789eb6710aa5edba53acc46a61de373566089590940ab4c8233e97558b
+size 34721
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_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,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_0_null_2,NEXUS_5,1.0,en].png
index 09d766510b..2ea09c2a08 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_2,NEXUS_5,1.0,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_0_null_2,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f81c7b793611e5f3f975245bf5ba52d59bf5725519292f05dd7840c2e38d3166
-size 33237
+oid sha256:04f73ec1830baa28808881f040f6bfc2b1ce0de1ca2d4b3e16a3b57513814a7f
+size 33173
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_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,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_0_null_3,NEXUS_5,1.0,en].png
index 5b28c7c462..98896a556b 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_3,NEXUS_5,1.0,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_0_null_3,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:04c34dbc9fe2df9af3133e1b7c444d58e7d8a35161a97155c384dceac28ee698
-size 32324
+oid sha256:da84d9195ed0cac06efff562156ed8abc161a6dbd3272727c1cb787b83c62558
+size 32253
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_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,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_0_null_4,NEXUS_5,1.0,en].png
index 06a59a90b8..f7e513c68a 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_4,NEXUS_5,1.0,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_0_null_4,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:922ee759a8e4b689ced8ade809c651464956395ffc0a2b3d9025f067a9807aa9
-size 30066
+oid sha256:ea2dce0fde5ff6563f283e643edadd5c95c29a4084c8f1d3902ec3c759cccea7
+size 30070
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_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,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_0_null_5,NEXUS_5,1.0,en].png
index 09d766510b..2ea09c2a08 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.login.root_null_DefaultGroup_LoginRootScreenLightPreview_0_null_5,NEXUS_5,1.0,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_0_null_5,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f81c7b793611e5f3f975245bf5ba52d59bf5725519292f05dd7840c2e38d3166
-size 33237
+oid sha256:04f73ec1830baa28808881f040f6bfc2b1ce0de1ca2d4b3e16a3b57513814a7f
+size 33173
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
index b5edb352b1..c8da465372 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:81905bde677949780ef6c850be8dde97c88895b82d83414589e07f0725064050
-size 13530
+oid sha256:ff04bf07f8c24b3b19d4926bb3c51b257166befe062fe8b8012d2e92dbfe3491
+size 13477
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
index 66c888556b..7efc250776 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_DefaultRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:edd3b0f29a3fbf9035cc8ba1d7a5a3a74be30d4e6ec8f654832f7ee916497453
-size 12457
+oid sha256:e50325c75193e47958862ea9cb515d7c84d2c47a00b01256fc244319780c107f
+size 12425
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
index 2f2ac0e0c0..7117d108dd 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3764d8bd7dc2783a8af43aad65a217d7e533ed17c4d4367b7994470bf35b62b0
-size 4462
+oid sha256:328963ebd74fbbe47fd4a4d1f0edce5bf014d88a266c114e50a5274e87a88fe8
+size 7154
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
index 2f2ac0e0c0..ae4bc09343 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist.components_null_DefaultGroup_SearchRoomListTopBarLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3764d8bd7dc2783a8af43aad65a217d7e533ed17c4d4367b7994470bf35b62b0
-size 4462
+oid sha256:007fd7051cb4b8059dc33ff1cd2b4be4cffaa5e1c129adb61dd4d9e8a561953f
+size 7096
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_0_null_0,NEXUS_5,1.0,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_0_null_0,NEXUS_5,1.0,en].png
index 210094f29d..6a5b653e7b 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewDarkPreview_0_null_0,NEXUS_5,1.0,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_0_null_0,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a50e661d6c3c45574fa3d6fc64b0d5f2a1c9dbba18a77be900df1dfce9df1f69
-size 35103
+oid sha256:3c8868d4974f23637afed9ecd062b88421e2b39ffe22f19742b946afc91caeb6
+size 37838
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_0_null_0,NEXUS_5,1.0,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_0_null_0,NEXUS_5,1.0,en].png
index 3bb09bb7f9..4a51d9cddc 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.roomlist_null_DefaultGroup_RoomListViewLightPreview_0_null_0,NEXUS_5,1.0,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_0_null_0,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:7d27f9fbe2b6d803198f0015cc391d6dfdd5d2708e837319c6eb0e82f8ab832c
-size 33488
+oid sha256:43b69859fa3ee38d2b7f7415b87738db65dc6dac3d2fabddc1f1346b0b64932b
+size 37329
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..bd230a9fea
--- /dev/null
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewDark_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17b110e460f4212927c46d593352dac88493bb7be9a5d2ae8b4e0b8e6c79d0bf
+size 5695
diff --git a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..56028abd8d
--- /dev/null
+++ b/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.components.button_null_DefaultGroup_BackButtonPreviewLight_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:29c30e97a5c1de9e855001c6f27322bce8795954ac5c134c34ea3c9de417acd2
+size 5250
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_CenterAlignedTopAppBarDarkPreview_0_null,NEXUS_5,1.0,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_CenterAlignedTopAppBarDarkPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..ca4e39a7d6
--- /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_CenterAlignedTopAppBarDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b662595580f6e0dd4ff6722fc0c8db63b0811a615a41356ba6b28d22285b6765
+size 5813
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_CenterAlignedTopAppBarLightPreview_0_null,NEXUS_5,1.0,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_CenterAlignedTopAppBarLightPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..79f70acbbd
--- /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_CenterAlignedTopAppBarLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b8a9745199ef10a4e0c8e101203ce51999449b7c43bf8b764f162ea975ebaefe
+size 5548
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_DockedSearchBarDarkPreview_0_null,NEXUS_5,1.0,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_DockedSearchBarDarkPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..638282389c
--- /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_DockedSearchBarDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e89807d72107f1f8337e8de803791249b56bde6c4961805520195ea55563749a
+size 8470
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_DockedSearchBarLightPreview_0_null,NEXUS_5,1.0,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_DockedSearchBarLightPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..2cc70fcb06
--- /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_DockedSearchBarLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6381c125b8eaf6b116218bc4b0efda4866f19514139f4b45604909e462931c1f
+size 8320
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_TextButtonDarkPreview_0_null,NEXUS_5,1.0,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_TextButtonDarkPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..3fb8762803
--- /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_TextButtonDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fde95a558052ae09123d459249e9b2d8ba3a3f6adb1bba4002ac0aca90d5b657
+size 11668
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_TextButtonLightPreview_0_null,NEXUS_5,1.0,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_TextButtonLightPreview_0_null,NEXUS_5,1.0,en].png
new file mode 100644
index 0000000000..c5f23652b9
--- /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_TextButtonLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81be7efc599fbe85a373aecfe85047f521ad609ce6b85b343386bb101aaddb68
+size 10611
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_TextFieldDarkPreview_0_null,NEXUS_5,1.0,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_TextFieldDarkPreview_0_null,NEXUS_5,1.0,en].png
index 0ef46f591b..79af10a99c 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextFieldDarkPreview_0_null,NEXUS_5,1.0,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_TextFieldDarkPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a796bba1f316b03793b415d109940940a6d81a924f55a745764bb6ec46cab40b
-size 39585
+oid sha256:03bfd855f6e010d2d4dc0cb9f3c13e76a4f2bbcda98b086dabcd33f201ebe10a
+size 39486
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_TextFieldLightPreview_0_null,NEXUS_5,1.0,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_TextFieldLightPreview_0_null,NEXUS_5,1.0,en].png
index 140a5324bd..4eb125e099 100644
--- a/tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.libraries.designsystem.theme.components_null_DefaultGroup_TextFieldLightPreview_0_null,NEXUS_5,1.0,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_TextFieldLightPreview_0_null,NEXUS_5,1.0,en].png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:5386114bbb3cbf6c8a3de0642f1efa7a3b5d7efa46168d70aeffc413e37ec803
-size 39014
+oid sha256:29bbaae8c846dfe05bb66e08debeb84422d45f88982f79faefb94f332843c26e
+size 39069