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" /> <uses-permission android:name="android.permission.INTERNET" />
<application <application
android:label="MyIceK" android:label="MyIce"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:supportsRtl="true" android:supportsRtl="true"
android:enableOnBackInvokedCallback="true" android:enableOnBackInvokedCallback="true"
@@ -17,11 +17,13 @@
package ch.parano.myicek.ui.components 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.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
@@ -63,10 +65,14 @@ fun EventCard(
elevation = CardDefaults.cardElevation(defaultElevation = 1.dp), elevation = CardDefaults.cardElevation(defaultElevation = 1.dp),
) { ) {
Row( Row(
modifier = Modifier modifier = Modifier.fillMaxWidth(),
.fillMaxWidth()
.border(width = 4.dp, color = stripeColor),
) { ) {
Box(
modifier = Modifier
.width(4.dp)
.fillMaxHeight()
.background(stripeColor),
)
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@@ -73,6 +73,7 @@ fun FilterAssistChip(
options: List<String>, options: List<String>,
onSelect: (String?) -> Unit, onSelect: (String?) -> Unit,
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
showAllOption: Boolean = true,
) { ) {
var expanded by remember { mutableStateOf(false) } var expanded by remember { mutableStateOf(false) }
val displayValue = selectedValue ?: "Tous" val displayValue = selectedValue ?: "Tous"
@@ -100,13 +101,15 @@ fun FilterAssistChip(
expanded = expanded, expanded = expanded,
onDismissRequest = { expanded = false }, onDismissRequest = { expanded = false },
) { ) {
DropdownMenuItem( if (showAllOption) {
text = { Text("Tous") }, DropdownMenuItem(
onClick = { text = { Text("Tous") },
onSelect(null) onClick = {
expanded = false onSelect(null)
}, expanded = false
) },
)
}
options.forEach { option -> options.forEach { option ->
DropdownMenuItem( DropdownMenuItem(
text = { Text(option) }, text = { Text(option) },
@@ -174,15 +174,11 @@ fun EventDetailScreen(
if (hasPlayers) { if (hasPlayers) {
item { item {
Row( BadgedBox(badge = { Badge { Text("${players.size}") } }) {
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(Dimens.sm),
) {
Text( Text(
text = "Joueurs", text = "Joueurs",
style = MaterialTheme.typography.titleMedium, style = MaterialTheme.typography.titleMedium,
) )
BadgedBox(badge = { Badge { Text("${players.size}") } }) {}
} }
} }
item { item {
@@ -143,6 +143,7 @@ fun ScheduleScreen(
if (account != null) scheduleViewModel.setAccount(account.name) if (account != null) scheduleViewModel.setAccount(account.name)
}, },
modifier = Modifier.weight(1f), modifier = Modifier.weight(1f),
showAllOption = false,
) )
FilterAssistChip( FilterAssistChip(
label = "Âge", label = "Âge",