Skip to content

CompletionView: make Save Note button a full-width green capsule#43

Merged
auerbachb merged 2 commits into
mainfrom
issue-32-save-note-button
Mar 27, 2026
Merged

CompletionView: make Save Note button a full-width green capsule#43
auerbachb merged 2 commits into
mainfrom
issue-32-save-note-button

Conversation

@auerbachb
Copy link
Copy Markdown
Owner

@auerbachb auerbachb commented Mar 27, 2026

Summary

  • Replace the small green text link "Save note" with a full-width green capsule button matching the app's design language
  • Add isSaveDisabled computed property for clean conditional logic
  • Add .onChange(of: endNote) to reset saved state when user edits text, enabling re-saving

Button States

  • Empty text field: Disabled, muted appearance (surface2 bg, fg3 text, subtle border)
  • Text entered: Active green capsule (SPColor.green bg, dark SPColor.bg text)
  • After saving: Shows "Saved", returns to disabled muted appearance
  • Edited after save: Resets to active state, allowing re-save

Test plan

  • Save Note button is full-width with green background when text is entered
  • Button has pill/capsule shape matching other CTAs in the app
  • Button is visually prominent and easy to tap
  • Disabled state when text field is empty (muted appearance)
  • After saving, button shows "Saved" in disabled state
  • Editing text after saving re-enables the button
  • Builds successfully on iPhone 17 Pro simulator (iOS 26.4)

Closes #32

Summary by CodeRabbit

  • Improvements
    • Enhanced the note-saving experience with improved button feedback that clearly displays save status ("Save note" vs. "Saved")
    • The save button now provides better visual indication of when saving is available or disabled
    • Edited notes automatically reset their saved status, allowing users to save changes after initial completion

Replace the small green text link with a prominent full-width capsule
button matching the app's design language. The button has three states:
- Disabled/muted when text field is empty (surface2 bg, fg3 text)
- Active green capsule when text is entered (SPColor.green bg, dark text)
- Disabled Saved state after saving (returns to muted appearance)

Uses the same serifItalic(18), Capsule(), and spacing as the Return
button for visual consistency.

Closes #32
- Add isSaveDisabled computed property to replace repeated condition
- Add .onChange(of: endNote) to clear noteSaved when user edits text,
  allowing re-saving after editing
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
still-point Ignored Ignored Mar 27, 2026 10:05pm

Request Review

@auerbachb
Copy link
Copy Markdown
Owner Author

@greptileai

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6bfe03bb-962f-4ad3-bc75-7fb0d35b7766

📥 Commits

Reviewing files that changed from the base of the PR and between 623626b and eb8c082.

📒 Files selected for processing (1)
  • ios/StillPointApp/Views/CompletionView.swift

📝 Walkthrough

Walkthrough

The Save Note button in CompletionView was refactored to use centralized state management. A new isSaveDisabled computed property now determines button disabled state based on note emptiness and save status. The button always displays with a label that toggles between "Save note" and "Saved" states, and an onChange handler resets the saved flag when the note is edited again.

Changes

Cohort / File(s) Summary
Save Button State Management
ios/StillPointApp/Views/CompletionView.swift
Added isSaveDisabled computed property to centralize disabled state logic. Consolidated button rendering into a single always-present button with dynamic label and styling. Introduced onChange(of: endNote) handler to reset noteSaved when note content changes after saving.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A button that glows, both proud and so green,
Now toggles its message—the best you have seen!
"Saved!" it declares with a gleeful delight,
When notes find their home in the still of the night. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: converting the Save Note button into a full-width green capsule button, which is the primary objective of the PR.
Linked Issues check ✅ Passed All acceptance criteria from issue #32 are met: full-width green button implemented [#32], capsule shape added [#32], visual prominence achieved through button styling [#32], disabled state when text empty [#32].
Out of Scope Changes check ✅ Passed All changes are scoped to CompletionView button styling and state management directly related to issue #32 requirements. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-32-save-note-button

Comment @coderabbitai help to get the list of available commands and usage tips.

@auerbachb auerbachb merged commit 7ad672b into main Mar 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CompletionView: make Save Note button a full-width green button

1 participant