Skip to content

Commit 31c7d4f

Browse files
dadachiclaude
andauthored
ItemTag state UI: rename Idling → Idled across the board (#68)
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.displayString for `.idled` returns "Idled" (was "Idling") - IdlingTag SwiftUI component renamed to IdledTag (file, struct, previews) - TagView text literal "idling" → "idled" (lowercase chip text matching the existing convention used by CompletedTag) - Color tokens idlingTag{Background,Border,Foreground} renamed to idledTag* across both static-let definitions and the Color extensions - Three call sites updated (ItemTagListCardView, ItemTagDetailView, ShopDetailCardView) - Xcode project file references updated Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 96c6afb commit 31c7d4f

8 files changed

Lines changed: 50 additions & 50 deletions

File tree

NativeAppTemplate.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
0172787B2D7D903500CE424F /* ItemTagAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172787A2D7D903500CE424F /* ItemTagAdapter.swift */; };
8585
0172787F2D7D933000CE424F /* ShopDetailCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0172787E2D7D933000CE424F /* ShopDetailCardView.swift */; };
8686
0172788B2D7D936E00CE424F /* CompletedTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278842D7D936E00CE424F /* CompletedTag.swift */; };
87-
0172788C2D7D936E00CE424F /* IdlingTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278872D7D936E00CE424F /* IdlingTagView.swift */; };
87+
0172788C2D7D936E00CE424F /* IdledTagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278872D7D936E00CE424F /* IdledTagView.swift */; };
8888
017278902D7D936E00CE424F /* TagView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278892D7D936E00CE424F /* TagView.swift */; };
8989
0172789A2D7D99D100CE424F /* ItemTagListCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278972D7D99D100CE424F /* ItemTagListCardView.swift */; };
9090
0172789B2D7D99D100CE424F /* ItemTagListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017278982D7D99D100CE424F /* ItemTagListView.swift */; };
@@ -241,7 +241,7 @@
241241
0172787A2D7D903500CE424F /* ItemTagAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemTagAdapter.swift; sourceTree = "<group>"; };
242242
0172787E2D7D933000CE424F /* ShopDetailCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShopDetailCardView.swift; sourceTree = "<group>"; };
243243
017278842D7D936E00CE424F /* CompletedTag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompletedTag.swift; sourceTree = "<group>"; };
244-
017278872D7D936E00CE424F /* IdlingTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdlingTagView.swift; sourceTree = "<group>"; };
244+
017278872D7D936E00CE424F /* IdledTagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IdledTagView.swift; sourceTree = "<group>"; };
245245
017278892D7D936E00CE424F /* TagView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagView.swift; sourceTree = "<group>"; };
246246
017278932D7D99D100CE424F /* ItemTagDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemTagDetailView.swift; sourceTree = "<group>"; };
247247
017278942D7D99D100CE424F /* ItemTagEditView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemTagEditView.swift; sourceTree = "<group>"; };
@@ -685,7 +685,7 @@
685685
isa = PBXGroup;
686686
children = (
687687
017278842D7D936E00CE424F /* CompletedTag.swift */,
688-
017278872D7D936E00CE424F /* IdlingTagView.swift */,
688+
017278872D7D936E00CE424F /* IdledTagView.swift */,
689689
017278892D7D936E00CE424F /* TagView.swift */,
690690
);
691691
path = Tags;
@@ -970,7 +970,7 @@
970970
0106413C29A9EDFF00B46FED /* AccountPasswordRequest.swift in Sources */,
971971
0172035625A9642E008FD63B /* ShopAdapter.swift in Sources */,
972972
0172788B2D7D936E00CE424F /* CompletedTag.swift in Sources */,
973-
0172788C2D7D936E00CE424F /* IdlingTagView.swift in Sources */,
973+
0172788C2D7D936E00CE424F /* IdledTagView.swift in Sources */,
974974
01A1339F2E08B2FD000AD24A /* AcceptTermsViewModel.swift in Sources */,
975975
017278902D7D936E00CE424F /* TagView.swift in Sources */,
976976
0106414429AA061100B46FED /* PasswordEditView.swift in Sources */,

NativeAppTemplate/Models/ItemTagState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum ItemTagState: String, CaseIterable, Identifiable, Codable {
2525
var displayString: String {
2626
switch self {
2727
case .idled:
28-
"Idling"
28+
"Idled"
2929
case .completed:
3030
"Completed"
3131
}

NativeAppTemplate/Styleguide/Color+Extensions.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ extension Color {
135135
static let snackWarning = coolGrey1 // #1F2933
136136
static let snackSuccess = coolGrey1 // #1F2933
137137

138-
// MARK: Tags - Idling
138+
// MARK: Tags - Idled
139139

140-
static let idlingTagBackground = coolGrey8 // #CBD2D9
141-
static let idlingTagBorder = coolGrey10 // #F5F7FA
142-
static let idlingTagForeground = coolGrey2 // #323F4B
140+
static let idledTagBackground = coolGrey8 // #CBD2D9
141+
static let idledTagBorder = coolGrey10 // #F5F7FA
142+
static let idledTagForeground = coolGrey2 // #323F4B
143143

144144
// MARK: Tags - Completed
145145

@@ -307,16 +307,16 @@ extension ShapeStyle where Self == Color {
307307
}
308308

309309
/// Tags
310-
static var idlingTagBackground: Color {
311-
Color.idlingTagBackground
310+
static var idledTagBackground: Color {
311+
Color.idledTagBackground
312312
}
313313

314-
static var idlingTagBorder: Color {
315-
Color.idlingTagBorder
314+
static var idledTagBorder: Color {
315+
Color.idledTagBorder
316316
}
317317

318-
static var idlingTagForeground: Color {
319-
Color.idlingTagForeground
318+
static var idledTagForeground: Color {
319+
Color.idledTagForeground
320320
}
321321

322322
static var completedTagBackground: Color {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// IdledTagView.swift
3+
// NativeAppTemplate
4+
//
5+
6+
import SwiftUI
7+
8+
struct IdledTag: View {
9+
var body: some View {
10+
TagView(
11+
text: "idled",
12+
textColor: .idledTagForeground,
13+
backgroundColor: .idledTagBackground,
14+
borderColor: .idledTagBorder
15+
)
16+
}
17+
}
18+
19+
struct IdledTag_Previews: PreviewProvider {
20+
static var previews: some View {
21+
VStack(spacing: NativeAppTemplateConstants.Spacing.xs) {
22+
idledTag.colorScheme(.light)
23+
idledTag.colorScheme(.dark)
24+
}
25+
}
26+
27+
static var idledTag: some View {
28+
IdledTag()
29+
.padding()
30+
.background(Color.backgroundColor)
31+
}
32+
}

NativeAppTemplate/UI/Shared/Tags/IdlingTagView.swift

Lines changed: 0 additions & 32 deletions
This file was deleted.

NativeAppTemplate/UI/Shop Detail/ShopDetailCardView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct ShopDetailCardView: View {
2929
.foregroundStyle(.contentText)
3030
}
3131
} else {
32-
IdlingTag()
32+
IdledTag()
3333
}
3434
}
3535
.frame(minWidth: 82, alignment: .trailing)

NativeAppTemplate/UI/Shop Settings/ItemTag Detail/ItemTagDetailView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private extension ItemTagDetailView {
9393
if itemTag.state == .completed {
9494
CompletedTag()
9595
} else {
96-
IdlingTag()
96+
IdledTag()
9797
}
9898
}
9999
}

NativeAppTemplate/UI/Shop Settings/ItemTag List/ItemTagListCardView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct ItemTagListCardView: View {
3434
.foregroundStyle(.contentText)
3535
}
3636
} else {
37-
IdlingTag()
37+
IdledTag()
3838
}
3939
}
4040
.frame(minWidth: 82, alignment: .trailing)

0 commit comments

Comments
 (0)