fix: address final review findings

- Suppress 'Tous' option for Compte chip (account is required)
- Fix BadgedBox: wrap Joueurs text inside content lambda
- EventCard: left-only color stripe instead of full border
- AndroidManifest: 'MyIceK' -> 'MyIce'
This commit is contained in:
2026-08-06 17:44:30 +02:00
parent 85e2391833
commit 77c8e65be7
5 changed files with 23 additions and 17 deletions
@@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
android:label="MyIceK"
android:label="MyIce"
android:icon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:enableOnBackInvokedCallback="true"
@@ -17,11 +17,13 @@
package ch.parano.myicek.ui.components
import androidx.compose.foundation.border
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
@@ -63,10 +65,14 @@ fun EventCard(
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
) {
Row(
modifier = Modifier
.fillMaxWidth()
.border(width = 4.dp, color = stripeColor),
modifier = Modifier.fillMaxWidth(),
) {
Box(
modifier = Modifier
.width(4.dp)
.fillMaxHeight()
.background(stripeColor),
)
Column(
modifier = Modifier
.fillMaxWidth()
@@ -73,6 +73,7 @@ fun FilterAssistChip(
options: List<String>,
onSelect: (String?) -> Unit,
modifier: Modifier = Modifier,
showAllOption: Boolean = true,
) {
var expanded by remember { mutableStateOf(false) }
val displayValue = selectedValue ?: "Tous"
@@ -100,13 +101,15 @@ fun FilterAssistChip(
expanded = expanded,
onDismissRequest = { expanded = false },
) {
DropdownMenuItem(
text = { Text("Tous") },
onClick = {
onSelect(null)
expanded = false
},
)
if (showAllOption) {
DropdownMenuItem(
text = { Text("Tous") },
onClick = {
onSelect(null)
expanded = false
},
)
}
options.forEach { option ->
DropdownMenuItem(
text = { Text(option) },
@@ -174,15 +174,11 @@ fun EventDetailScreen(
if (hasPlayers) {
item {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(Dimens.sm),
) {
BadgedBox(badge = { Badge { Text("${players.size}") } }) {
Text(
text = "Joueurs",
style = MaterialTheme.typography.titleMedium,
)
BadgedBox(badge = { Badge { Text("${players.size}") } }) {}
}
}
item {
@@ -143,6 +143,7 @@ fun ScheduleScreen(
if (account != null) scheduleViewModel.setAccount(account.name)
},
modifier = Modifier.weight(1f),
showAllOption = false,
)
FilterAssistChip(
label = "Âge",