From 74e5bf18fc2c27719650c71e66fda41e9eb4c15d Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Wed, 8 Nov 2023 11:31:17 +0100 Subject: [PATCH] Iterate design on Settings screen (#1763) * Iterate design on Settings screen: - Set new icons provided by design. - Replace `PreferenceText` usages with `ListItem`. - Add missing icons, and a new way to group them for previews. --------- Co-authored-by: ElementBot --- .../event/TimelineItemUnknownView.kt | 2 +- .../TimelineEncryptedHistoryBannerView.kt | 2 +- .../impl/root/PreferencesRootView.kt | 85 ++++++++++--------- .../impl/setup/views/RecoveryKeyView.kt | 2 +- .../atomic/molecules/InfoListItemMolecule.kt | 8 +- .../components/list/ListItemContent.kt | 17 ++-- .../libraries/designsystem/icons/IconsList.kt | 7 +- .../designsystem/icons/IconsPreview.kt | 35 +++++--- .../res/drawable/ic_compound_check_circle.xml | 22 +---- .../ic_compound_check_circle_solid.xml | 9 ++ .../main/res/drawable/ic_compound_info.xml | 29 +++---- .../res/drawable/ic_compound_info_solid.xml | 25 ++++++ .../main/res/drawable/ic_compound_user.xml | 11 +++ .../main/res/drawable/ic_developer_mode.xml | 10 --- .../res/drawable/ic_developer_options.xml | 9 ++ .../src/main/res/drawable/ic_devices.xml | 9 ++ .../src/main/res/drawable/ic_sign_out.xml | 9 ++ .../src/main/res/values/localazy.xml | 2 + ...otViewDark--1_3_null_0,NEXUS_5,1.0,en].png | 4 +- ...otViewDark--1_3_null_1,NEXUS_5,1.0,en].png | 4 +- ...tViewLight--0_2_null_0,NEXUS_5,1.0,en].png | 4 +- ...tViewLight--0_2_null_1,NEXUS_5,1.0,en].png | 4 +- ...mpoundPart1-Day_0_null,NEXUS_5,1.0,en].png | 3 - ...oundPart1-Night_1_null,NEXUS_5,1.0,en].png | 3 - ...mpoundPart2-Day_0_null,NEXUS_5,1.0,en].png | 3 - ...oundPart2-Night_1_null,NEXUS_5,1.0,en].png | 3 - ...sCompound-Day_0_null_0,NEXUS_5,1.0,en].png | 3 + ...sCompound-Day_0_null_1,NEXUS_5,1.0,en].png | 3 + ...sCompound-Day_0_null_2,NEXUS_5,1.0,en].png | 3 + ...ompound-Night_1_null_0,NEXUS_5,1.0,en].png | 3 + ...ompound-Night_1_null_1,NEXUS_5,1.0,en].png | 3 + ...ompound-Night_1_null_2,NEXUS_5,1.0,en].png | 3 + ..._IconsOther-Day_0_null,NEXUS_5,1.0,en].png | 4 +- ...consOther-Night_1_null,NEXUS_5,1.0,en].png | 4 +- 34 files changed, 208 insertions(+), 139 deletions(-) create mode 100644 libraries/designsystem/src/main/res/drawable/ic_compound_check_circle_solid.xml create mode 100644 libraries/designsystem/src/main/res/drawable/ic_compound_info_solid.xml create mode 100644 libraries/designsystem/src/main/res/drawable/ic_compound_user.xml delete mode 100644 libraries/designsystem/src/main/res/drawable/ic_developer_mode.xml create mode 100644 libraries/designsystem/src/main/res/drawable/ic_developer_options.xml create mode 100644 libraries/designsystem/src/main/res/drawable/ic_devices.xml create mode 100644 libraries/designsystem/src/main/res/drawable/ic_sign_out.xml delete mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Day_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Night_1_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Day_0_null,NEXUS_5,1.0,en].png delete mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Night_1_null,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_0,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_2,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_0,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_2,NEXUS_5,1.0,en].png diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt index b381f2ef4c..182f90b23b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt @@ -34,7 +34,7 @@ fun TimelineItemUnknownView( TimelineItemInformativeView( text = stringResource(id = CommonStrings.common_unsupported_event), iconDescription = stringResource(id = CommonStrings.dialog_title_warning), - iconResourceId = CommonDrawables.ic_compound_info, + iconResourceId = CommonDrawables.ic_compound_info_solid, extraPadding = extraPadding, modifier = modifier ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineEncryptedHistoryBannerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineEncryptedHistoryBannerView.kt index 72e924f72d..241f98c141 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineEncryptedHistoryBannerView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineEncryptedHistoryBannerView.kt @@ -56,7 +56,7 @@ fun TimelineEncryptedHistoryBannerView( ) { Icon( modifier = Modifier.size(20.dp), - resourceId = CommonDrawables.ic_compound_info, + resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = "Info", tint = ElementTheme.colors.iconInfoPrimary ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index e25428f724..801a7f6895 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -22,7 +22,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Lock import androidx.compose.material.icons.outlined.InsertChart -import androidx.compose.material.icons.outlined.VerifiedUser import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -30,12 +29,15 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.features.preferences.impl.user.UserPreferences +import io.element.android.libraries.designsystem.components.list.ListItemContent import io.element.android.libraries.designsystem.components.preferences.PreferencePage -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.designsystem.preview.PreviewWithLargeHeight import io.element.android.libraries.designsystem.theme.components.HorizontalDivider +import io.element.android.libraries.designsystem.theme.components.IconSource +import io.element.android.libraries.designsystem.theme.components.ListItem +import io.element.android.libraries.designsystem.theme.components.ListItemStyle import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.designsystem.utils.snackbar.SnackbarHost @@ -79,17 +81,17 @@ fun PreferencesRootView( user = state.myUser, ) if (state.showCompleteVerification) { - PreferenceText( - title = stringResource(id = CommonStrings.action_complete_verification), - icon = Icons.Outlined.VerifiedUser, - onClick = onVerifyClicked, + ListItem( + headlineContent = { Text(text = stringResource(CommonStrings.common_verify_device)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_check_circle)), + onClick = onVerifyClicked ) } if (state.showSecureBackup) { - PreferenceText( - title = stringResource(id = CommonStrings.common_chat_backup), - iconResourceId = CommonDrawables.ic_key_filled, - showEndBadge = state.showSecureBackupBadge, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_chat_backup)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_key_filled),), + trailingContent = ListItemContent.Badge.takeIf { state.showSecureBackupBadge }, onClick = onSecureBackupClicked, ) } @@ -97,65 +99,68 @@ fun PreferencesRootView( HorizontalDivider() } if (state.accountManagementUrl != null) { - PreferenceText( - title = stringResource(id = CommonStrings.action_manage_account), - iconResourceId = CommonDrawables.ic_compound_pop_out, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.action_manage_account)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_user)), + trailingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_pop_out)), onClick = { onManageAccountClicked(state.accountManagementUrl) }, ) HorizontalDivider() } if (state.showAnalyticsSettings) { - PreferenceText( - title = stringResource(id = CommonStrings.common_analytics), - icon = Icons.Outlined.InsertChart, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_analytics)) }, + leadingContent = ListItemContent.Icon(IconSource.Vector(Icons.Outlined.InsertChart)), onClick = onOpenAnalytics, ) } if (state.showNotificationSettings) { - PreferenceText( - title = stringResource(id = CommonStrings.screen_notification_settings_title), - iconResourceId = CommonDrawables.ic_compound_notifications, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.screen_notification_settings_title)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_notifications)), onClick = onOpenNotificationSettings, ) } - PreferenceText( - title = stringResource(id = CommonStrings.action_report_bug), - iconResourceId = CommonDrawables.ic_compound_chat_problem, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_report_a_problem)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_chat_problem)), onClick = onOpenRageShake ) - PreferenceText( - title = stringResource(id = CommonStrings.common_about), - iconResourceId = CommonDrawables.ic_compound_info, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_about)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_info)), onClick = onOpenAbout, ) if (state.showLockScreenSettings) { - PreferenceText( - title = stringResource(id = CommonStrings.common_screen_lock), - icon = Icons.Default.Lock, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_screen_lock)) }, + leadingContent = ListItemContent.Icon(IconSource.Vector(Icons.Default.Lock)), onClick = onOpenLockScreenSettings, ) } HorizontalDivider() if (state.devicesManagementUrl != null) { - PreferenceText( - title = stringResource(id = CommonStrings.action_manage_devices), - iconResourceId = CommonDrawables.ic_compound_pop_out, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.action_manage_devices)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_devices)), + trailingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_pop_out)), onClick = { onManageAccountClicked(state.devicesManagementUrl) }, ) HorizontalDivider() } - PreferenceText( - title = stringResource(id = CommonStrings.common_advanced_settings), - iconResourceId = CommonDrawables.ic_compound_settings, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_advanced_settings)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_settings)), onClick = onOpenAdvancedSettings, ) if (state.showDeveloperSettings) { DeveloperPreferencesView(onOpenDeveloperSettings) } HorizontalDivider() - PreferenceText( - title = stringResource(id = CommonStrings.action_signout), - iconResourceId = CommonDrawables.ic_compound_leave, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.action_signout)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_sign_out)), + style = ListItemStyle.Destructive, onClick = onSignOutClicked, ) Text( @@ -172,9 +177,9 @@ fun PreferencesRootView( @Composable private fun DeveloperPreferencesView(onOpenDeveloperSettings: () -> Unit) { - PreferenceText( - title = stringResource(id = CommonStrings.common_developer_options), - iconResourceId = CommonDrawables.ic_developer_mode, + ListItem( + headlineContent = { Text(stringResource(id = CommonStrings.common_developer_options)) }, + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_developer_options)), onClick = onOpenDeveloperSettings ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt index e243889c90..9b3ea25ebe 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt @@ -185,7 +185,7 @@ private fun RecoveryKeyFooter(state: RecoveryKeyViewState) { verticalAlignment = Alignment.CenterVertically, ) { Icon( - resourceId = CommonDrawables.ic_compound_info, + resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = null, tint = ElementTheme.colors.iconSecondary, modifier = Modifier diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/InfoListItemMolecule.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/InfoListItemMolecule.kt index c5c328a610..23ed6a1af6 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/InfoListItemMolecule.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/InfoListItemMolecule.kt @@ -78,25 +78,25 @@ internal fun InfoListItemMoleculePreview() { ) { InfoListItemMolecule( message = { Text("A single item") }, - icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) }, + icon = { Icon(resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = null) }, position = InfoListItemPosition.Single, backgroundColor = color, ) InfoListItemMolecule( message = { Text("A top item") }, - icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) }, + icon = { Icon(resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = null) }, position = InfoListItemPosition.Top, backgroundColor = color, ) InfoListItemMolecule( message = { Text("A middle item") }, - icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) }, + icon = { Icon(resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = null) }, position = InfoListItemPosition.Middle, backgroundColor = color, ) InfoListItemMolecule( message = { Text("A bottom item") }, - icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) }, + icon = { Icon(resourceId = CommonDrawables.ic_compound_info_solid, contentDescription = null) }, position = InfoListItemPosition.Bottom, backgroundColor = color, ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/ListItemContent.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/ListItemContent.kt index a229aba378..8074d42056 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/ListItemContent.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/ListItemContent.kt @@ -24,6 +24,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.atomic.atoms.RedIndicatorAtom import io.element.android.libraries.designsystem.theme.components.IconSource import io.element.android.libraries.designsystem.theme.components.ListItem import io.element.android.libraries.designsystem.theme.components.Checkbox as CheckboxComponent @@ -94,6 +95,9 @@ sealed interface ListItemContent { /** Displays any custom content. */ data class Custom(val content: @Composable () -> Unit) : ListItemContent + /** Displays a badge. */ + data object Badge : ListItemContent + @Composable fun View() { when (this) { @@ -114,12 +118,15 @@ sealed interface ListItemContent { onClick = onClick, enabled = enabled ) - is Icon -> IconComponent( - modifier = Modifier.size(maxCompactSize), - painter = iconSource.getPainter(), - contentDescription = iconSource.contentDescription - ) + is Icon -> { + IconComponent( + modifier = Modifier.size(maxCompactSize), + painter = iconSource.getPainter(), + contentDescription = iconSource.contentDescription + ) + } is Text -> TextComponent(modifier = Modifier.widthIn(max = 128.dp), text = text, maxLines = 1, overflow = TextOverflow.Ellipsis) + is Badge -> RedIndicatorAtom() is Custom -> content() } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt index 52773dc0ab..3faa030daf 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt @@ -28,6 +28,7 @@ internal val iconsCompound = listOf( R.drawable.ic_compound_chat_problem, R.drawable.ic_compound_check, R.drawable.ic_compound_check_circle, + R.drawable.ic_compound_check_circle_solid, R.drawable.ic_compound_chevron_down, R.drawable.ic_compound_chevron_left, R.drawable.ic_compound_chevron_right, @@ -48,6 +49,7 @@ internal val iconsCompound = listOf( R.drawable.ic_compound_filter, R.drawable.ic_compound_grid_view, R.drawable.ic_compound_info, + R.drawable.ic_compound_info_solid, R.drawable.ic_compound_leave, R.drawable.ic_compound_link, R.drawable.ic_compound_lock, @@ -79,6 +81,7 @@ internal val iconsCompound = listOf( R.drawable.ic_compound_spotlight_view, R.drawable.ic_compound_threads, R.drawable.ic_compound_threads_solid, + R.drawable.ic_compound_user, R.drawable.ic_compound_user_add, R.drawable.ic_compound_user_add_solid, R.drawable.ic_compound_user_profile, @@ -116,7 +119,8 @@ internal val iconsSeptember = listOf( // This list and all the drawable it contains should be removed at some point. // All the icons should be defined in Compound. internal val iconsOther = listOf( - R.drawable.ic_developer_mode, + R.drawable.ic_developer_options, + R.drawable.ic_devices, R.drawable.ic_groups, R.drawable.ic_indent_decrease, R.drawable.ic_indent_increase, @@ -130,4 +134,5 @@ internal val iconsOther = listOf( R.drawable.ic_strikethrough, R.drawable.ic_thread_decoration, R.drawable.ic_underline, + R.drawable.ic_sign_out, ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt index 446b62bc9c..1963e8e994 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt @@ -27,33 +27,40 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.tooling.preview.PreviewParameterProvider import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toPersistentList -@PreviewsDayNight -@Composable -internal fun IconsCompoundPart1Preview() = ElementPreview { - IconsPreview( - title = "R.drawable.ic_compound_* 1 / 2", - iconsList = iconsCompound.take(36).toPersistentList(), - iconNameTransform = { name -> - name.removePrefix("ic_compound_") - .replace("_", " ") - }) +internal class IconChunkPreviewProvider : PreviewParameterProvider { + override val values: Sequence + get() { + val chunks = iconsCompound.chunked(36) + return chunks.mapIndexed { index, chunk -> + IconChunk(index = index+1, total = chunks.size, icons = chunk.toPersistentList()) + } + .asSequence() + } } +internal data class IconChunk( + val index: Int, + val total: Int, + val icons: ImmutableList, +) + @PreviewsDayNight @Composable -internal fun IconsCompoundPart2Preview() = ElementPreview { +internal fun IconsCompoundPreview(@PreviewParameter(IconChunkPreviewProvider::class) chunk: IconChunk) = ElementPreview { IconsPreview( - title = "R.drawable.ic_compound_* 2 / 2", - iconsList = iconsCompound.drop(36).toPersistentList(), + title = "R.drawable.ic_compound_* ${chunk.index}/${chunk.total}", + iconsList = chunk.icons, iconNameTransform = { name -> name.removePrefix("ic_compound_") .replace("_", " ") diff --git a/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle.xml b/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle.xml index 652e4458ea..e0b95e183b 100644 --- a/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle.xml +++ b/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle.xml @@ -1,25 +1,9 @@ - - - + diff --git a/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle_solid.xml b/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle_solid.xml new file mode 100644 index 0000000000..79c856d35a --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_compound_check_circle_solid.xml @@ -0,0 +1,9 @@ + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_compound_info.xml b/libraries/designsystem/src/main/res/drawable/ic_compound_info.xml index fdb53d2db9..171edb5c9b 100644 --- a/libraries/designsystem/src/main/res/drawable/ic_compound_info.xml +++ b/libraries/designsystem/src/main/res/drawable/ic_compound_info.xml @@ -1,25 +1,16 @@ - - - + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_compound_info_solid.xml b/libraries/designsystem/src/main/res/drawable/ic_compound_info_solid.xml new file mode 100644 index 0000000000..fdb53d2db9 --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_compound_info_solid.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_compound_user.xml b/libraries/designsystem/src/main/res/drawable/ic_compound_user.xml new file mode 100644 index 0000000000..5f61985ce4 --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_compound_user.xml @@ -0,0 +1,11 @@ + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_developer_mode.xml b/libraries/designsystem/src/main/res/drawable/ic_developer_mode.xml deleted file mode 100644 index 282937850b..0000000000 --- a/libraries/designsystem/src/main/res/drawable/ic_developer_mode.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/libraries/designsystem/src/main/res/drawable/ic_developer_options.xml b/libraries/designsystem/src/main/res/drawable/ic_developer_options.xml new file mode 100644 index 0000000000..a55953010c --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_developer_options.xml @@ -0,0 +1,9 @@ + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_devices.xml b/libraries/designsystem/src/main/res/drawable/ic_devices.xml new file mode 100644 index 0000000000..be7814d4ed --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_devices.xml @@ -0,0 +1,9 @@ + + + diff --git a/libraries/designsystem/src/main/res/drawable/ic_sign_out.xml b/libraries/designsystem/src/main/res/drawable/ic_sign_out.xml new file mode 100644 index 0000000000..6f9c08cf50 --- /dev/null +++ b/libraries/designsystem/src/main/res/drawable/ic_sign_out.xml @@ -0,0 +1,9 @@ + + + diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index ea14ab9ddf..0aaeeb2b7b 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -172,8 +172,10 @@ "Voice message" "Waiting…" "Waiting for this message" + "Report a problem" "Are you sure you want to end this poll?" "Poll: %1$s" + "Verify device" "Confirmation" "Warning" "Activities" diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png index 38c7bbb003..ea97c688f9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c79d4722b2cba273d2ce6c71a533c338810adf2919ac163de27f4c49a132981 -size 43962 +oid sha256:79759b51c1a16981d2643030596d48788bc7028b7f52fb1d2fdda31992841b9a +size 45193 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png index 9115ed0420..3ffc426ab4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:48dbab6995ee03ccb67678229e804d96b471dbc7db48d0e7dce0b61f69d53dfb -size 43285 +oid sha256:0bee3d838df124a7668b93f06e5bfc10d71705c1e5d76790d1e72cd18ad54d45 +size 44522 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png index 94bd1a0a72..25d94f5f67 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6f75db2d6b6fe5e655fef4c74781e9c9bc00408c569a679837f4fb5529b4508 -size 46866 +oid sha256:12fbb25e7316b85696813eb598458f0b5617bc87a1277535928693082dbe17da +size 48253 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png index 18e7ca8615..2e5985ef52 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b34af47ea56faa01a23c9bd12620153d1d79a522bbcab42ad4051bdf19270ae -size 46758 +oid sha256:93431e06263c26c11c2bdaf0fb977b558b419190144f007f5bb91de2d0e921cb +size 48154 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Day_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Day_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index ce8e61a07f..0000000000 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Day_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f01e4a5aa80ebd835acd0db64c7cdd5a85401a18bec329d7c72e76d3d3162c6e -size 70477 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Night_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Night_1_null,NEXUS_5,1.0,en].png deleted file mode 100644 index e6d7e99f37..0000000000 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart1_null_IconsCompoundPart1-Night_1_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a21c942689c26517e6f11075cf57899dafff43c9e66ae5b1f1aaa78caf7f6f9 -size 67641 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Day_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Day_0_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 45a128bb67..0000000000 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Day_0_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6c26892b083fb99f5fceaaf8a2d8e394845923909e6b42d9edaaeaec3a67b68c -size 84056 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Night_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Night_1_null,NEXUS_5,1.0,en].png deleted file mode 100644 index 0c5dacc25a..0000000000 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompoundPart2_null_IconsCompoundPart2-Night_1_null,NEXUS_5,1.0,en].png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6a609735752829eb320c52cc07fa9e9beae50046b36555c5043d603805f5f435 -size 80929 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_0,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..ed55bd5463 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_0,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:281766702461ba2844185d1a59c7ebfeed1acc1b216e3708340b963514848b11 +size 71438 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..ed785a85c5 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66ce02b19066a21d1ebf1b2963872df484cdce5f4eac16ec0d7d215ba7276b9a +size 84144 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_2,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..55fc22a44e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_2,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15429b5c37ef7ebb125fc4c00741d5fb8a123ce6764d5eccf1697b6821bf6238 +size 18823 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_0,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..08b6c7c8a3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_0,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db09bdb47175a88a79a2166b030dfe682a18a631e3b78a7875e684326c4be9ef +size 68266 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..e45d929e14 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcc61f1337b615ca05d0b6da76a0f434936a9b6bc14ba464ec8c3c8f2d20fe7d +size 80887 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_2,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..ffef97470f --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_2,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62d7f0187da9d4e5d33a63b8f1057bcfed5c63d7175969e37ab1b742d5a2d05a +size 17669 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null,NEXUS_5,1.0,en].png index 3ff2f3e4a2..f835b1d930 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69c2af16154cecb849b9af865583e4150edf4105f8ec10b78dbb4aab082fb51e -size 33648 +oid sha256:7e80db390d11cdd8984d82d9130bfef29ccb1605feb04e435da9a082ace181b3 +size 37009 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null,NEXUS_5,1.0,en].png index d6390cfb0f..e86209df1e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec7c6add0edda4898d3c03623c12c7e72de17bf3a8fade410aa2da39b5a4fa42 -size 32056 +oid sha256:a0b8d7d8016ec2100670f155376a11b2e17be181be9cfbcb0ee8209bfcb1f739 +size 35147