Add mood-specific selectable chip answers to guided reflection flow
Reduces friction in the guided reflection by offering predefined tappable chip answers tailored to each mood category's therapeutic framework: - Positive (Behavioral Activation): savoring emotions + reinforcing actions - Neutral (ACT Cognitive Defusion): ambivalent feelings + defusion reframes + values - Negative (CBT Thought Record): automatic negative thoughts + compassionate reframes + grounding actions Chips appear between the question and text editor. Tapping toggles selection and auto-fills the text field. "More" expander reveals additional options. Free text always remains available alongside chips. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -185,6 +185,15 @@ struct GuidedReflectionView: View {
|
||||
.accessibilityIdentifier(AccessibilityID.GuidedReflection.questionLabel(step: currentStep))
|
||||
.id("question_\(currentStep)")
|
||||
|
||||
if let chips = QuestionChips.chips(for: reflection.moodCategory, questionIndex: currentStep) {
|
||||
ChipSelectionView(
|
||||
chips: chips,
|
||||
accentColor: moodTint.color(forMood: entry.mood),
|
||||
selectedChips: $reflection.responses[currentStep].selectedChips,
|
||||
textAnswer: $reflection.responses[currentStep].answer
|
||||
)
|
||||
}
|
||||
|
||||
TextEditor(text: $reflection.responses[currentStep].answer)
|
||||
.focused($isTextFieldFocused)
|
||||
.frame(minHeight: 120, maxHeight: 200)
|
||||
|
||||
Reference in New Issue
Block a user