Skip to content

Commit 1976c83

Browse files
dadachiclaude
andauthored
ItemTag state UI: rename Idling → Idled across the board (#54)
Aligns the user-visible "Idling" string with the underlying enum case `Idled` and the Idled ↔ Completed parallel-tense pair (already used for the Completed display string). Eliminates the tense mismatch where the state badge read "IDLING" while its enum was `Idled` and its sibling state was "COMPLETED". Changes: - ItemTagState.Idled.title returns "Idled" (was "Idling") - IdlingTag composable renamed to IdledTag (file, function, preview) - TagView text literal "IDLING" → "IDLED" (uppercase chip text matching the existing convention used by CompletedTag) - Three call sites updated (ItemTagListCardView, ItemTagDetailView, ShopDetailCardView): import + composable invocation The test method name `stateIsLoading_whenIdlingItemTag_becomesFalse` is intentionally left as-is — it's a verb form ("the action of idling an ItemTag") referring to the operation, not the state label. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 265695c commit 1976c83

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

app/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/ui/common/tags/IdlingTag.kt renamed to app/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/ui/common/tags/IdledTag.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ import androidx.compose.ui.tooling.preview.Preview
66
import com.nativeapptemplate.nativeapptemplatefree.designsystem.theme.NativeAppTemplateTheme
77

88
@Composable
9-
fun IdlingTag() {
9+
fun IdledTag() {
1010
TagView(
11-
text = "IDLING",
11+
text = "IDLED",
1212
textColor = MaterialTheme.colorScheme.onSurfaceVariant,
1313
backgroundColor = MaterialTheme.colorScheme.surfaceVariant,
1414
)
1515
}
1616

1717
@Preview
1818
@Composable
19-
private fun IdlingTagPreview() {
19+
private fun IdledTagPreview() {
2020
NativeAppTemplateTheme {
21-
IdlingTag()
21+
IdledTag()
2222
}
2323
}

app/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/ui/shop_detail/ShopDetailCardView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import androidx.compose.ui.unit.dp
1313
import com.nativeapptemplate.nativeapptemplatefree.model.Data
1414
import com.nativeapptemplate.nativeapptemplatefree.model.ItemTagState
1515
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.CompletedTag
16-
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdlingTag
16+
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdledTag
1717
import com.nativeapptemplate.nativeapptemplatefree.utils.DateUtility.cardDateTimeString
1818

1919
@Composable
@@ -54,7 +54,7 @@ fun ShopDetailCardView(
5454
)
5555
}
5656
else -> {
57-
IdlingTag()
57+
IdledTag()
5858
}
5959
}
6060
}

app/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/ui/shop_settings/item_tag_detail/ItemTagDetailView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import com.nativeapptemplate.nativeapptemplatefree.ui.common.MainButtonView
4646
import com.nativeapptemplate.nativeapptemplatefree.ui.common.NativeAppTemplateAlertDialog
4747
import com.nativeapptemplate.nativeapptemplatefree.ui.common.SnackbarMessageEffect
4848
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.CompletedTag
49-
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdlingTag
49+
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdledTag
5050
import com.nativeapptemplate.nativeapptemplatefree.utils.DateUtility.cardDateTimeString
5151

5252
@Composable
@@ -194,7 +194,7 @@ private fun HeaderRow(itemTag: ItemTag) {
194194

195195
when (itemTag.getData()?.getItemTagState()) {
196196
ItemTagState.Completed -> CompletedTag()
197-
ItemTagState.Idled -> IdlingTag()
197+
ItemTagState.Idled -> IdledTag()
198198
null -> Unit
199199
}
200200
}

app/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/ui/shop_settings/item_tag_list/ItemTagListCardView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import androidx.compose.ui.unit.dp
1616
import com.nativeapptemplate.nativeapptemplatefree.model.Data
1717
import com.nativeapptemplate.nativeapptemplatefree.model.ItemTagState
1818
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.CompletedTag
19-
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdlingTag
19+
import com.nativeapptemplate.nativeapptemplatefree.ui.common.tags.IdledTag
2020
import com.nativeapptemplate.nativeapptemplatefree.utils.DateUtility.cardDateTimeString
2121

2222
@Composable
@@ -69,7 +69,7 @@ fun ItemTagListCardView(
6969
)
7070
}
7171
}
72-
ItemTagState.Idled -> IdlingTag()
72+
ItemTagState.Idled -> IdledTag()
7373
null -> Unit
7474
}
7575
}

model/src/main/kotlin/com/nativeapptemplate/nativeapptemplatefree/model/ItemTagState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.nativeapptemplate.nativeapptemplatefree.model
22

33
enum class ItemTagState(val param: String, val title: String) {
4-
Idled("idled", "Idling"),
4+
Idled("idled", "Idled"),
55

66
Completed("completed", "Completed"),
77
;

0 commit comments

Comments
 (0)