home: navegacion de semanas visible (flechas en circulo + hint en titulo)

Los chevrons finos coral sobre la barra ya coral eran invisibles en la
practica — un usuario premium no encontraba como planificar la semana
siguiente. Ahora son botones circulares blancos con chevron en negrita,
y el titulo lleva un chevron.down que delata que abre el selector de
semana. UI test de regresion: navegar a la semana siguiente debe
renderizar sus huecos sin paywall (la creacion del plan al navegar ya
funcionaba, verificado con captura).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013H6bXqGX1ygwib1Dm3n3UG
This commit is contained in:
alexandrev-tibco
2026-09-10 20:11:44 +02:00
parent e77d1c2f80
commit 22e65148a3
4 changed files with 56 additions and 4 deletions
+17 -2
View File
@@ -154,25 +154,36 @@ struct HomeView: View {
}
}
ToolbarItem(placement: .principal) {
HStack(spacing: 10) {
// Bold circled arrows: the previous thin chevrons were so
// subtle that users couldn't find how to change week.
HStack(spacing: 8) {
if let settings = settings {
Button {
viewModel.goToPreviousWeek()
showWeekLimitUpsell = false
} label: {
Image(systemName: "chevron.left")
.font(.system(size: 13, weight: .bold))
.foregroundColor(.mealMoodCoral)
.frame(width: 30, height: 30)
.background(Circle().fill(Color.white.opacity(0.75)))
}
.buttonStyle(.plain)
.accessibilityLabel(Text("home_previous"))
Button {
weekPickerDate = viewModel.currentWeekStart
showWeekPicker = true
} label: {
VStack(spacing: 2) {
HStack(spacing: 4) {
Text(viewModel.weekRangeText)
.font(.mealMoodH2)
.foregroundColor(.mealMoodTextPrimary)
.lineLimit(1)
.minimumScaleFactor(0.7)
Image(systemName: "chevron.down")
.font(.system(size: 10, weight: .bold))
.foregroundColor(.mealMoodTextSecondary)
}
}
.buttonStyle(.plain)
@@ -192,8 +203,12 @@ struct HomeView: View {
}
} label: {
Image(systemName: "chevron.right")
.font(.system(size: 13, weight: .bold))
.foregroundColor(.mealMoodCoral)
.frame(width: 30, height: 30)
.background(Circle().fill(Color.white.opacity(0.75)))
}
.buttonStyle(.plain)
.accessibilityLabel(Text("home_next"))
}
}
@@ -73,3 +73,40 @@ final class OnboardingFlowUITests: XCTestCase {
}
}
}
/// Regression: tapping "next week" must land on an editable week with slots
/// the plan for a not-yet-visited week has to be created on navigation.
final class NextWeekNavigationUITests: XCTestCase {
func testNextWeekShowsSlotsToPlan() throws {
let app = XCUIApplication()
app.launchArguments += ["-AppleLanguages", "(en)", "-AppleLocale", "en_US", "UITEST_DISABLE_ANALYTICS"]
app.launch()
// Reach the home, walking onboarding if this is a clean install.
if !app.otherElements["home_root"].waitForExistence(timeout: 5) {
for id in ["onboarding_cta_welcome", "onboarding_cta_meal_windows", "onboarding_cta_weekends",
"onboarding_cta_calendar", "onboarding_cta_first_dishes",
"onboarding_cta_week_ready_skip", "onboarding_cta_paywall_skip"] {
let button = app.buttons[id]
if button.waitForExistence(timeout: 10) { button.tap() }
}
XCTAssertTrue(app.otherElements["home_root"].waitForExistence(timeout: 15), "Home never appeared")
}
let next = app.buttons["Next"]
XCTAssertTrue(next.waitForExistence(timeout: 10), "Next-week chevron not found")
next.tap()
sleep(2)
let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "next-week"
attachment.lifetime = .keepAlways
add(attachment)
// The paywall must NOT appear (next week is free for everyone) and the
// home must still be there with content, not a blank screen.
XCTAssertFalse(app.staticTexts["premium_title"].exists, "Paywall appeared navigating to next week")
XCTAssertTrue(app.otherElements["home_root"].exists, "Home disappeared after navigating to next week")
}
}
+1 -1
View File
@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>82</string>
<string>83</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
+1 -1
View File
@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>82</string>
<string>83</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>