Skip to content

UI layout tweaks and accessibility actions#315

Merged
rtk-rnjn merged 9 commits intomainfrom
UI-Consistency
Mar 28, 2026
Merged

UI layout tweaks and accessibility actions#315
rtk-rnjn merged 9 commits intomainfrom
UI-Consistency

Conversation

@write2nupu
Copy link
Copy Markdown
Collaborator

@write2nupu write2nupu commented Mar 27, 2026

Refactor various UI components, rename MoodNest to Mood across the app for consistency, and add comprehensive accessibility actions to all tappable views. Key changes:

  • PrivacyPolicyData & TermsOfService: updated wording replacing MoodNest with Mood and adjusted ProgressHub → Progress.
  • DashboardDietCardView: tightened text scaling, allowed tightening, increased layout priority, and made progress bar use flexible width.
  • DashboardEventCardView: adjusted Add Event label scaling and line limits.
  • DashboardInsightCardView: switched text alignment to leading, allowed multiline sizing and removed fixed height constraint.
  • DashboardWeekCardView: set fixed height to 160 for consistent layout.
  • FaceViews: made eye view respect aspect ratio and max dimensions.
  • MoodNestPlaylistsView: changed navigation title to "Mood" and limited background height.
  • MoodNestView: major layout cleanup — adjusted fonts, spacing, max heights, added safeAreaInset bottom button for "Set Mood" (safer placement), moved navigationDestination, and improved accessibility/spacing.
  • Xcode scheme: removed askForAppToLaunch flag.
  • Accessibility actions: added .accessibilityAction(.default) to all tappable views (views using .onTapGesture) across the app so VoiceOver and other assistive technologies can invoke them. Covers Dashboard cards, TriTrack list rows and detail views, My Plan diet/exercise/water components, onboarding screens, and profile screen. Extracted shared popup and toggle logic into private helper methods to avoid duplication.

These changes improve responsiveness, accessibility, and visual consistency across different device sizes.

Pull Request Template

Description


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Refactor various UI components and rename MoodNest to Mood across the app for consistency. Key changes:

- PrivacyPolicyData & TermsOfService: updated wording replacing MoodNest with Mood and adjusted ProgressHub → Progress.
- DashboardDietCardView: tightened text scaling, allowed tightening, increased layout priority, and made progress bar use flexible width.
- DashboardEventCardView: adjusted Add Event label scaling and line limits.
- DashboardInsightCardView: switched text alignment to leading, allowed multiline sizing and removed fixed height constraint.
- DashboardWeekCardView: set fixed height to 160 for consistent layout.
- FaceViews: made eye view respect aspect ratio and max dimensions.
- MoodNestPlaylistsView: changed navigation title to "Mood" and limited background height.
- MoodNestView: major layout cleanup — adjusted fonts, spacing, max heights, added safeAreaInset bottom button for "Set Mood" (safer placement), moved navigationDestination, and improved accessibility/spacing.
- Xcode scheme: removed askForAppToLaunch flag.

These changes improve responsiveness, accessibility, and visual consistency across different device sizes.
@github-actions github-actions bot added swiftformat-fail Swiftformat Fail - Should only be auto assigned swiftlint-pass Swiftlint Pass - Should only be auto assigned build-pass labels Mar 27, 2026
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
@github-actions github-actions bot added swiftformat-pass Swiftformat Pass - Should only be auto assigned and removed swiftformat-fail Swiftformat Fail - Should only be auto assigned labels Mar 27, 2026
@rtk-rnjn rtk-rnjn marked this pull request as draft March 27, 2026 16:42
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
@github-actions github-actions bot added the mergeable If all checks pass - Should only be auto assigned label Mar 28, 2026
Arayauchiha and others added 3 commits March 28, 2026 13:36
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
@rtk-rnjn
Copy link
Copy Markdown
Owner

@copilot Add/Fix accessibility action to the all possible view (buttons, tapable view). Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

@copilot Add/Fix accessibility action to the all possible view (buttons, tapable view). Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action

Added .accessibilityAction(.default) to all tappable views across the app in commit 80f650a. Changes span 17 files including:

  • Dashboard: WeekCard, DietCard, ExerciseCard, EventCard tap handlers
  • TriTrack: Reminder rows, symptom rows, calendar event rows (both in list views and detail views), CompactInfoCards (with extracted helper methods to avoid duplication)
  • My Plan: Diet meal timeline toggles, calorie ring, percentage text toggles (with extracted togglePercentageDisplay() helper), WalkingCard, food search rows, water log entries
  • Profile: "Connect with Us" tappable text
  • Onboarding: "Forget Password?" text, OTP input area

For views that already use proper SwiftUI Button, NavigationLink, Link, or Toggle components, no changes were needed since those handle the default accessibility action automatically.

Copilot AI changed the title UI layout tweaks and rename MoodNest → Mood UI layout tweaks, rename MoodNest → Mood, and accessibility actions Mar 28, 2026
Copilot AI requested a review from rtk-rnjn March 28, 2026 08:45
@rtk-rnjn rtk-rnjn changed the title UI layout tweaks, rename MoodNest → Mood, and accessibility actions UI layout tweaks and accessibility actions Mar 28, 2026
Arayauchiha and others added 2 commits March 28, 2026 14:18
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
Co-Authored-By: Ritik Ranjan <37435729+rtk-rnjn@users.noreply.github.com>
@rtk-rnjn rtk-rnjn requested a review from Copilot March 28, 2026 08:49
@rtk-rnjn rtk-rnjn marked this pull request as ready for review March 28, 2026 08:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on improving UI responsiveness and accessibility across multiple SwiftUI screens, while also refactoring networking/auth/content layers (renames + stronger concurrency annotations) and updating some product text/metadata (e.g., MoodNest → Mood, HTTPS endpoint).

Changes:

  • Added .accessibilityAction(.default) to many tappable SwiftUI views and refactored repeated tap logic into helpers.
  • Performed broad service/repository renames (AuthenticationServiceMCAuthenticationService, NetworkManagerMCNetworkManager, ContentRepositoryMCContentRepository) and adjusted concurrency-related types.
  • Tweaked several layouts (Dashboard/Mood views), updated wording (MoodNest → Mood), and updated project metadata (scheme, version, regions).

Reviewed changes

Copilot reviewed 76 out of 76 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
MomCare+/MomCare.xcodeproj/xcshareddata/xcschemes/TriTrack GlanceExtension.xcscheme Scheme flag tweak (launch behavior).
MomCare+/MomCare.xcodeproj/project.pbxproj Add hi region, bump marketing version.
MomCare+/MomCare+/Views/TriTrackScreens/TriTrackView.swift Auth service rename; popup helpers + accessibility actions.
MomCare+/MomCare+/Views/TriTrackScreens/TriTrackSymptomsContentView.swift Updated VO hint + default accessibility action.
MomCare+/MomCare+/Views/TriTrackScreens/TriTrackCalendarItemContentView.swift Added accessibility default action to row selection.
MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackReminderRow.swift Added accessibility element metadata + default action.
MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllSymptomsView.swift Added accessibility default action to row selection.
MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllRemindersView.swift Added accessibility default action to row selection.
MomCare+/MomCare+/Views/TriTrackScreens/Components/TriTrackAllCalendarItemView.swift Added accessibility default action to row selection.
MomCare+/MomCare+/Views/ProfileScreens/ProfileView.swift Auth service rename; added accessibility action for support email.
MomCare+/MomCare+/Views/ProfileScreens/ProfilePersonalInfoView.swift Auth service rename.
MomCare+/MomCare+/Views/ProfileScreens/ProfileHealthInfoView.swift Auth service rename.
MomCare+/MomCare+/Views/ProfileScreens/ProfileAccountSecurityView.swift Auth service rename.
MomCare+/MomCare+/Views/ProfileScreens/ProfileAccountManagementView.swift Auth service rename.
MomCare+/MomCare+/Views/ProfileScreens/Legal&Compliance/TermsOfServiceView.swift MoodNest → Mood copy update.
MomCare+/MomCare+/Views/OnboardingScreens/SignUp/PreferencesSignUpView.swift Auth service rename.
MomCare+/MomCare+/Views/OnboardingScreens/SignUp/HealthMetricsSignUpView.swift Auth service rename.
MomCare+/MomCare+/Views/OnboardingScreens/SignUp/BaseSignUpView.swift Remove mobile number field/validation; auth rename; adjust focus flow.
MomCare+/MomCare+/Views/OnboardingScreens/SignInView.swift Auth rename; added default accessibility action.
MomCare+/MomCare+/Views/OnboardingScreens/OnboardingView.swift Auth service rename.
MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift Auth rename; keyboard toolbar submit; accessibility action.
MomCare+/MomCare+/Views/OnboardingScreens/ForgetPasswordView.swift Auth service rename in OTP/reset flows.
MomCare+/MomCare+/Views/MyPlanScreens/MyPlanFoodItemSearchView.swift Default accessibility action; switch to MCNetworkManager.
MomCare+/MomCare+/Views/MyPlanScreens/MyPlanExercisePlanView.swift Added default accessibility action.
MomCare+/MomCare+/Views/MyPlanScreens/Components/WaterIntake/WaterLogListView.swift Added default accessibility action (edit).
MomCare+/MomCare+/Views/MyPlanScreens/Components/ExercisePlan/ExerciseHistory.swift Switch to MCContentRepository.
MomCare+/MomCare+/Views/MyPlanScreens/Components/ExercisePlan/ExerciseCardView.swift Removed dismiss environment usage.
MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanProgressCardView.swift Added default accessibility actions; refactored toggle helper.
MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanMealTimelineCardView.swift Added default accessibility actions; switch to MCContentRepository.
MomCare+/MomCare+/Views/MyPlanScreens/Components/DietPlan/MyPlanDietPlanHistory.swift Switch to MCContentRepository.
MomCare+/MomCare+/Views/MoodNestScreens/MoodNestView.swift Layout cleanup; safeAreaInset bottom button; navigationDestination moved.
MomCare+/MomCare+/Views/MoodNestScreens/MoodNestPlaylistsView.swift Mood title; background height flexibility.
MomCare+/MomCare+/Views/MoodNestScreens/MoodAnimation/FaceViews.swift Eye view aspect ratio + max sizing.
MomCare+/MomCare+/Views/DebugScreens/OSLogView.swift Refactor log fetching; make subviews private; list styling updates.
MomCare+/MomCare+/Views/DebugScreens/JSONTreeRow.swift Removed JSON tree debug UI.
MomCare+/MomCare+/Views/DashboardScreens/DashboardView.swift Added default accessibility actions; auth rename.
MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardWeekCardView.swift Fixed card height to 160.
MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardInsightCardView.swift Leading alignment; multiline sizing; remove fixed height.
MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardEventCardView.swift Add Event label scaling/line limit; accessibility action.
MomCare+/MomCare+/Views/DashboardScreens/DashboardSnippets/DashboardDietCardView.swift Tighten scaling/priority; flexible progress bar width.
MomCare+/MomCare+/Views/AppCore/MomCareRootView.swift Auth service rename.
MomCare+/MomCare+/Views/AppCore/MomCareMainTabView.swift Auth rename; switch to MCContentRepository.
MomCare+/MomCare+/Views/AppCore/MomCareApp.swift Instantiate MCAuthenticationService.
MomCare+/MomCare+/Views/AppCore/Components/ReAuthenticationSheetView.swift Auth service rename.
MomCare+/MomCare+/View+UIKit/AppDelegate.swift Switch to MCAuthenticationService + MCNetworkManager.
MomCare+/MomCare+/View+UIKit/AppDelegate+MetricKit.swift Switch to MCNetworkManager.
MomCare+/MomCare+/Info.plist Removed background mode processing.
MomCare+/MomCare+/Handlers/ContentServiceHandler/ContentServiceHandler+MealPlan.swift Switch to MCContentRepository.
MomCare+/MomCare+/Handlers/ContentServiceHandler/ContentServiceHandler+Exercises.swift Switch to MCContentRepository.
MomCare+/MomCare+/Extensions/UserExerciseModel+ContentService.swift Switch to MCContentRepository.
MomCare+/MomCare+/Extensions/SongModel+ContentService.swift Switch to MCContentRepository.
MomCare+/MomCare+/Extensions/FoodReferenceModel+ContentService.swift Switch to MCContentRepository.
MomCare+/MomCare+/DataHandlers/NetworkManager.swift Rename + Sendable constraints + concurrency annotation changes.
MomCare+/MomCare+/DataHandlers/NetworkLocalizedError.swift Add server message plumbing to API errors.
MomCare+/MomCare+/DataHandlers/HTTPErrorResponse.swift Add CodableValue(any:) initializer.
MomCare+/MomCare+/DataHandlers/FunctionField.swift Tighten generic constraints; remove conditional Sendable extension.
MomCare+/MomCare+/DataHandlers/Endpoint.swift Switch base URL to HTTPS domain.
MomCare+/MomCare+/DataHandlers/DataTransferObject.swift Make DTOs immutable; add concurrency annotations.
MomCare+/MomCare+/DataHandlers/ContentRepository.swift Convert to actor MCContentRepository; update cache/db access.
MomCare+/MomCare+/DataHandlers/ContentRepository+Update.swift Update extension target type + network manager calls.
MomCare+/MomCare+/DataHandlers/AuthenticationService.swift Rename to MCAuthenticationService; concurrency annotations + main-thread updates.
MomCare+/MomCare+/Components/MoodNest/MoodResultViewModel.swift Switch to MCContentRepository.
MomCare+/MomCare+/Components/LocationManager.swift Formatting tweak in delegate method signature.
MomCare+/Common/hi.lproj/Localizable.strings Added (currently empty) Hindi localization file.
MomCare+/Common/en.lproj/Localizable.strings Added (currently empty) English localization file.
MomCare+/Common/Utils.swift Added concurrency annotations to utility functions/constants.
MomCare+/Common/Static/PrivacyPolicyData.swift MoodNest → Mood and ProgressHub → Progress copy update.
MomCare+/Common/Static/LicenseData.swift License metadata and dependency name/url update.
MomCare+/Common/Models/UserModel.swift Remove enum; add concurrency annotation to model.
MomCare+/Common/Models/SongModel.swift Add concurrency annotation to models.
MomCare+/Common/Models/MealPlanModel.swift Add concurrency annotation to model.
MomCare+/Common/Models/FoodItemModel.swift Add concurrency annotation to model.
MomCare+/Common/Models/ExerciseModel.swift Add concurrency annotation to models.
MomCare+/Common/KeychainHelper.swift Added concurrency annotations to keychain APIs.
MomCare+/Common/Extensions/Date+Utils.swift Added concurrency annotations to computed properties.
MomCare+/Common/Extensions/Data+Decoding.swift Added concurrency annotation to decode helper.
Comments suppressed due to low confidence (2)

MomCare+/MomCare+/Views/OnboardingScreens/OTPScreenView.swift:1

  • This Button(role:action:) is missing a label, which will not compile. Add a label closure (e.g., Text(\"Done\")) or use a Button(\"Done\", role: .confirm) { ... } initializer so the keyboard toolbar renders a tappable control.
    MomCare+/MomCare+/Views/DebugScreens/OSLogView.swift:1
  • The Task.detached { ... } body is not throws, but it uses try calls (OSLogStore(...), store.getEntries(...)) without a do/catch or try?, which should not compile. Wrap the body in do/catch (and consider surfacing the error rather than silently ignoring it). Also, inserting into entries on the main queue for every log entry is potentially expensive; it would be more efficient to build an array off-main and then apply a single main-actor update.

}

struct LoginCredentials: Codable, Sendable {
nonisolated struct LoginCredentials: Codable, Sendable {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).

Copilot uses AI. Check for mistakes.
}

struct DailyInsightModel: Codable, Sendable {
nonisolated struct DailyInsightModel: Codable, Sendable {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).

Copilot uses AI. Check for mistakes.
}

struct RegistrationResponse: Codable, Sendable, TokenContaining {
nonisolated struct RegistrationResponse: Codable, Sendable, TokenContaining {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).

Copilot uses AI. Check for mistakes.
}

struct TokenPair: Codable, Sendable, TokenContaining {
nonisolated struct TokenPair: Codable, Sendable, TokenContaining {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).

Copilot uses AI. Check for mistakes.
}

struct ServerMessage: Codable, Sendable {
nonisolated struct ServerMessage: Codable, Sendable {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nonisolated cannot be applied to struct (or class) type declarations; it is intended for actor members. These should be plain struct ... declarations (keeping Sendable as needed).

Copilot uses AI. Check for mistakes.
import Foundation

enum FieldType<Value: Codable> {
enum FieldType<Value: Codable & Sendable> {
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FieldType previously had an explicit Sendable conditional conformance, but that conformance was removed. Even with Value: Sendable, FieldType will not automatically be Sendable unless it declares conformance. If FieldType is passed across concurrency domains (likely, given the new Sendable constraints), declare enum FieldType<...>: Sendable to make the intent explicit.

Suggested change
enum FieldType<Value: Codable & Sendable> {
enum FieldType<Value: Codable & Sendable>: Sendable {

Copilot uses AI. Check for mistakes.
Comment on lines 13 to +15
name: "MomCare+",
license: "GNU General Public License v2.0",
urlString: "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html"
license: "CC BY-NC-ND 4.0 License",
urlString: "https://creativecommons.org/licenses/by-nc-nd/4.0/deed.en"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR updates the app's license metadata and changes the referenced third-party library name/URL, but the PR description doesn’t mention any licensing/dependency metadata changes. If this is intentional, it should be called out explicitly in the PR description (and ideally validated against the actual dependency used) because license metadata changes can have legal/release implications.

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +31
name: "LNPopupUI",
license: "MIT License",
urlString: "https://github.com/LeoNatan/LNPopupController"
urlString: "https://github.com/LeoNatan/LNPopupUI"
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR updates the app's license metadata and changes the referenced third-party library name/URL, but the PR description doesn’t mention any licensing/dependency metadata changes. If this is intentional, it should be called out explicitly in the PR description (and ideally validated against the actual dependency used) because license metadata changes can have legal/release implications.

Copilot uses AI. Check for mistakes.
@rtk-rnjn rtk-rnjn merged commit 7964008 into main Mar 28, 2026
15 of 17 checks passed
@rtk-rnjn rtk-rnjn deleted the UI-Consistency branch March 28, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-pass mergeable If all checks pass - Should only be auto assigned swiftformat-pass Swiftformat Pass - Should only be auto assigned swiftlint-pass Swiftlint Pass - Should only be auto assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants