Replace TipKit with custom themed tips modal system

- Add TipModalView with gradient header, themed styling, and spring animations
- Create FeelsTipsManager with global toggle, session tracking, and persistence
- Define FeelsTip protocol and convert all 7 tips to new system
- Add convenience view modifiers (.customizeLayoutTip(), .aiInsightsTip(), etc.)
- Remove TipKit dependency from all views
- Add Tips Preview debug screen in Settings to test all tip modals
- Update documentation for new custom tips system

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-28 21:33:36 -06:00
parent e98142c72e
commit c59f215535
11 changed files with 809 additions and 222 deletions

View File

@@ -8,7 +8,6 @@
import SwiftUI
import UniformTypeIdentifiers
import StoreKit
import TipKit
// MARK: - Settings Content View (for use in SettingsTabView)
struct SettingsContentView: View {
@@ -55,6 +54,7 @@ struct SettingsContentView: View {
trialDateButton
animationLabButton
paywallPreviewButton
tipsPreviewButton
addTestDataButton
clearDataButton
#endif
@@ -87,7 +87,7 @@ struct SettingsContentView: View {
}
.onAppear(perform: {
EventLogger.log(event: "show_settings_view")
TipsManager.shared.onSettingsViewed()
FeelsTipsManager.shared.onSettingsViewed()
})
}
@@ -248,6 +248,7 @@ struct SettingsContentView: View {
@State private var showAnimationLab = false
@State private var showPaywallPreview = false
@State private var showTipsPreview = false
private var animationLabButton: some View {
ZStack {
@@ -333,6 +334,51 @@ struct SettingsContentView: View {
}
}
private var tipsPreviewButton: some View {
ZStack {
theme.currentTheme.secondaryBGColor
Button {
showTipsPreview = true
} label: {
HStack(spacing: 12) {
Image(systemName: "lightbulb.fill")
.font(.title2)
.foregroundStyle(
LinearGradient(
colors: [.yellow, .orange],
startPoint: .topLeading,
endPoint: .bottomTrailing
)
)
.frame(width: 32)
VStack(alignment: .leading, spacing: 2) {
Text("Tips Preview")
.foregroundColor(textColor)
Text("View all tip modals")
.font(.caption)
.foregroundStyle(.secondary)
}
Spacer()
Image(systemName: "chevron.right")
.font(.caption)
.foregroundStyle(.tertiary)
}
.padding()
}
}
.fixedSize(horizontal: false, vertical: true)
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
.sheet(isPresented: $showTipsPreview) {
NavigationStack {
TipsPreviewView()
}
}
}
private var addTestDataButton: some View {
ZStack {
theme.currentTheme.secondaryBGColor