Iterate design on several screens: update icons, replace PreferenceTexts (#1771)
- Batch import new icons from the design team. - Rename _september icons since they're just extra icons that need to be integrated in Compound in the future, and it should be ok if we don't distinguish between ic_september_*, ic_november_* etc., so all icons are now simply ic_* in the designsystem module. - Create a new CompoundIconListPreviewProvider to add chunked lists of icons for previews. Add an exception for it to Konsist. - Move some icons to use Compound icons. - Remove most PreferenceText usages, use ListItem instead. --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
99783a6eed
commit
a5bad53c62
194 changed files with 945 additions and 519 deletions
|
|
@ -105,7 +105,7 @@ fun AttachmentThumbnail(
|
|||
}
|
||||
AttachmentThumbnailType.File -> {
|
||||
Icon(
|
||||
resourceId = CommonDrawables.ic_september_attachment,
|
||||
resourceId = CommonDrawables.ic_attachment,
|
||||
contentDescription = info.textContent,
|
||||
modifier = Modifier.rotate(-45f)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,16 +28,18 @@ import androidx.compose.foundation.lazy.items
|
|||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.ModalBottomSheetState
|
||||
import androidx.compose.material.ModalBottomSheetValue
|
||||
import androidx.compose.material3.ListItem
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
import io.element.android.libraries.designsystem.components.list.ListItemContent
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||
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.ModalBottomSheetLayout
|
||||
import io.element.android.libraries.designsystem.theme.components.Text
|
||||
import io.element.android.libraries.matrix.ui.media.AvatarAction
|
||||
|
|
@ -98,12 +100,10 @@ private fun AvatarActionBottomSheetContent(
|
|||
color = if (action.destructive) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.primary,
|
||||
)
|
||||
},
|
||||
leadingContent = {
|
||||
Icon(
|
||||
resourceId = action.iconResourceId,
|
||||
contentDescription = stringResource(action.titleResId),
|
||||
tint = if (action.destructive) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.secondary,
|
||||
)
|
||||
leadingContent = ListItemContent.Icon(IconSource.Resource(action.iconResourceId)),
|
||||
style = when {
|
||||
action.destructive -> ListItemStyle.Destructive
|
||||
else -> ListItemStyle.Primary
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.outlined.AddAPhoto
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -40,6 +38,7 @@ import io.element.android.libraries.designsystem.components.avatar.Avatar
|
|||
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
||||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||
|
||||
@Composable
|
||||
fun EditableAvatarView(
|
||||
|
|
@ -87,7 +86,7 @@ fun EditableAvatarView(
|
|||
) {
|
||||
Icon(
|
||||
modifier = Modifier.size(16.dp),
|
||||
imageVector = Icons.Outlined.AddAPhoto,
|
||||
resourceId = CommonDrawables.ic_edit,
|
||||
contentDescription = "",
|
||||
tint = MaterialTheme.colorScheme.onPrimary,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ sealed class AvatarAction(
|
|||
) {
|
||||
data object TakePhoto : AvatarAction(
|
||||
titleResId = CommonStrings.action_take_photo,
|
||||
iconResourceId = CommonDrawables.ic_september_take_photo_camera,
|
||||
iconResourceId = CommonDrawables.ic_take_photo_camera,
|
||||
)
|
||||
|
||||
data object ChoosePhoto : AvatarAction(
|
||||
titleResId = CommonStrings.action_choose_photo,
|
||||
iconResourceId = CommonDrawables.ic_september_photo_video_library,
|
||||
iconResourceId = CommonDrawables.ic_image,
|
||||
)
|
||||
|
||||
data object Remove : AvatarAction(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue