From 90885f74933d2bbab409fbe9f819298d1bf27e97 Mon Sep 17 00:00:00 2001 From: Rafael Augusto Date: Thu, 5 Nov 2026 14:07:20 -0300 Subject: [PATCH] Allow reopening the thank-you letter from Help --- apps/macos/README.md | 3 ++ .../Sources/RoveApp/DedicationView.swift | 32 +++++++++++++++++-- .../Resources/en.lproj/Localizable.strings | 3 ++ .../Resources/pt-BR.lproj/Localizable.strings | 3 ++ apps/macos/Sources/RoveApp/RoveApp.swift | 10 ++++++ .../RoveAppTests/LaunchPreviewTests.swift | 6 ++++ docs/es/guide/macos-preview.md | 4 +++ docs/guide/macos-preview.md | 4 +++ docs/pt-BR/guide/macos-preview.md | 4 +++ docs/zh-CN/guide/macos-preview.md | 3 ++ 10 files changed, 70 insertions(+), 2 deletions(-) diff --git a/apps/macos/README.md b/apps/macos/README.md index 8a65db7..56897c9 100644 --- a/apps/macos/README.md +++ b/apps/macos/README.md @@ -90,6 +90,9 @@ UserDefaults, independently of onboarding and release notes. The letter appears once per Mac user profile; signing out or updating does not reset it. Existing users see it once without repeating their completed tour. Closing before Continue leaves it unread, and an active analysis keeps its controls. +**Help → A thank-you to Thiago** reopens the letter in its own window, including +while an analysis runs. **Close**, Escape or the window close control dismisses +only that window; rereading does not reset the tour or acknowledge unseen updates. A skippable first-run tour introduces the app and can open the example or file picker without starting an analysis. Help reopens the tour and versioned release diff --git a/apps/macos/Sources/RoveApp/DedicationView.swift b/apps/macos/Sources/RoveApp/DedicationView.swift index 1579234..af084cc 100644 --- a/apps/macos/Sources/RoveApp/DedicationView.swift +++ b/apps/macos/Sources/RoveApp/DedicationView.swift @@ -3,6 +3,7 @@ import SwiftUI struct DedicationView: View { @Bindable var preferences: AppPreferences var onContinue: () -> Void + var isReopened = false @Environment(\.visualComfort) private var comfort @State private var appeared = false private var strings: AppStrings { preferences.strings } @@ -14,7 +15,8 @@ struct DedicationView: View { var body: some View { VStack(spacing: 0) { - ArrivalHeader(preferences: preferences, caption: "BEFORE WE BEGIN") + ArrivalHeader( + preferences: preferences, caption: isReopened ? "A NOTE OF THANKS" : "BEFORE WE BEGIN") VStack(spacing: 0) { ScrollView { VStack(alignment: .leading, spacing: 20) { @@ -58,7 +60,9 @@ struct DedicationView: View { .accessibilityHidden(true) Spacer() Button(action: onContinue) { - Label(strings("Continue"), systemImage: "arrow.right") + Label( + strings(isReopened ? "Close" : "Continue"), + systemImage: isReopened ? "xmark" : "arrow.right") } .buttonStyle(LabButtonStyle(prominent: true, compact: true)) .keyboardShortcut(.defaultAction) @@ -90,3 +94,27 @@ struct DedicationView: View { .rotationEffect(.degrees(-9)).accessibilityHidden(true) } } + +struct DedicationWindow: View { + @Bindable var preferences: AppPreferences + @Environment(\.dismissWindow) private var dismissWindow + @Environment(\.accessibilityReduceMotion) private var reduceMotion + @Environment(\.accessibilityReduceTransparency) private var reduceTransparency + + var body: some View { + DedicationView( + preferences: preferences, onContinue: { dismissWindow(id: "dedication") }, isReopened: true + ) + .frame(minWidth: 1080, minHeight: 700) + .background { WorkspaceBackdrop() }.foregroundStyle(Lab.ink) + .preferredColorScheme(.dark).tint(Lab.accent) + .environment(\.locale, preferences.strings.locale) + .environment( + \.visualComfort, + VisualComfort( + reduceMotion: reduceMotion || preferences.reduceMotion, + reduceTransparency: reduceTransparency || preferences.reduceTransparency) + ) + .onExitCommand { dismissWindow(id: "dedication") } + } +} diff --git a/apps/macos/Sources/RoveApp/Resources/en.lproj/Localizable.strings b/apps/macos/Sources/RoveApp/Resources/en.lproj/Localizable.strings index 10e47b2..69ac407 100644 --- a/apps/macos/Sources/RoveApp/Resources/en.lproj/Localizable.strings +++ b/apps/macos/Sources/RoveApp/Resources/en.lproj/Localizable.strings @@ -1,5 +1,8 @@ /* Rove interface strings. Keep keys and format arguments aligned across languages. */ +"A thank-you to Thiago" = "A thank-you to Thiago"; +"A NOTE OF THANKS" = "A NOTE OF THANKS"; + "Settings" = "Settings"; "Settings…" = "Settings…"; "Make yourself at home." = "Make yourself at home."; diff --git a/apps/macos/Sources/RoveApp/Resources/pt-BR.lproj/Localizable.strings b/apps/macos/Sources/RoveApp/Resources/pt-BR.lproj/Localizable.strings index 6e564bc..fbbcf6d 100644 --- a/apps/macos/Sources/RoveApp/Resources/pt-BR.lproj/Localizable.strings +++ b/apps/macos/Sources/RoveApp/Resources/pt-BR.lproj/Localizable.strings @@ -1,5 +1,8 @@ /* Rove interface strings. Keep keys and format arguments aligned across languages. */ +"A thank-you to Thiago" = "Agradecimento ao Thiago"; +"A NOTE OF THANKS" = "UMA NOTA DE AGRADECIMENTO"; + "Settings" = "Configurações"; "Settings…" = "Configurações…"; "Make yourself at home." = "Fique à vontade."; diff --git a/apps/macos/Sources/RoveApp/RoveApp.swift b/apps/macos/Sources/RoveApp/RoveApp.swift index 3aaee94..6e55941 100644 --- a/apps/macos/Sources/RoveApp/RoveApp.swift +++ b/apps/macos/Sources/RoveApp/RoveApp.swift @@ -106,6 +106,8 @@ struct RoveApp: App { .disabled( !access.canUse || !experience.ready || workspace.isRunning || workspace.loading || workspace.treeSummary != nil || experience.availableReleases.isEmpty) + Button(strings("A thank-you to Thiago")) { openWindow(id: "dedication") } + .disabled(!access.canUse || !experience.ready) Divider() Button(strings("Rove Field Guide")) { NSWorkspace.shared.open(strings.guideURL) @@ -126,6 +128,14 @@ struct RoveApp: App { .defaultPosition(.center) .commandsRemoved() + Window(strings("A thank-you to Thiago"), id: "dedication") { + DedicationWindow(preferences: workspace.preferences) + } + .windowStyle(.hiddenTitleBar) + .defaultSize(width: 1240, height: 850) + .windowResizability(.contentMinSize) + .commandsRemoved() + Window(strings("Benchmark this Mac"), id: "benchmark") { BenchmarkView(workspace: workspace, access: access) } diff --git a/apps/macos/Tests/RoveAppTests/LaunchPreviewTests.swift b/apps/macos/Tests/RoveAppTests/LaunchPreviewTests.swift index b3b823c..92e186c 100644 --- a/apps/macos/Tests/RoveAppTests/LaunchPreviewTests.swift +++ b/apps/macos/Tests/RoveAppTests/LaunchPreviewTests.swift @@ -19,6 +19,8 @@ struct LaunchPreviewTests { let defaults = try #require(UserDefaults(suiteName: suite)) defer { defaults.removePersistentDomain(forName: suite) } let preferences = AppPreferences(defaults: defaults) + preferences.reduceMotion = true + preferences.reduceTransparency = true for language in [AppLanguage.english, .portuguese] { preferences.language = language let access = BetaAccess( @@ -30,6 +32,10 @@ struct LaunchPreviewTests { DedicationView(preferences: preferences, onContinue: {}), size: size, to: directory.appendingPathComponent( "\(language.rawValue)-dedication-\(Int(size.height)).png")) + try await capture( + DedicationWindow(preferences: preferences), size: size, + to: directory.appendingPathComponent( + "\(language.rawValue)-dedication-reopened-\(Int(size.height)).png")) } for name in ["invitation", "waitlist", "code", "confirmed"] { if name == "waitlist" { access.begin(.waitlist) } diff --git a/docs/es/guide/macos-preview.md b/docs/es/guide/macos-preview.md index a428773..fa430f5 100644 --- a/docs/es/guide/macos-preview.md +++ b/docs/es/guide/macos-preview.md @@ -60,6 +60,10 @@ Después de confirmar el acceso, una carta de Rafael agradece a Thiago J. Silva antes de la introducción. **Continue** la marca como leída en este Mac; cerrar sesión o actualizar no vuelve a mostrarla. La carta sigue el idioma de la app. Quienes ya usan Rove también la ven una vez, sin repetir el recorrido completado. +Después de la introducción, puedes abrirla de nuevo en **Help → A thank-you to Thiago**. +La carta tiene su propia ventana, incluso durante un análisis. **Close**, Escape +o el control de cierre devuelve al trabajo sin cambiar la matriz, los registros +de la primera visita ni las novedades pendientes de leer. Después, una introducción de cuatro pasos presenta el espacio de trabajo, las matrices, los grupos externos y los resultados. Puedes omitirla, diff --git a/docs/guide/macos-preview.md b/docs/guide/macos-preview.md index d0b27b8..7b5736c 100644 --- a/docs/guide/macos-preview.md +++ b/docs/guide/macos-preview.md @@ -60,6 +60,10 @@ After access is confirmed, a letter from Rafael thanks Thiago J. Silva before the introduction. Choosing **Continue** marks it as read on this Mac; signing out or updating will not show it again. It follows the app language. Existing users see the letter once without repeating their completed tour. +Reopen it anytime after the introduction with **Help → A thank-you to Thiago**. +The separate window can stay open during an analysis. **Close**, Escape or the +window close control returns to your work without changing the matrix, first-run +acknowledgements or unread release notes. A four-part introduction then covers the workspace, matrices, outgroups and results. Skip it, explore the example, or choose your own matrix; diff --git a/docs/pt-BR/guide/macos-preview.md b/docs/pt-BR/guide/macos-preview.md index e5f2a15..021da59 100644 --- a/docs/pt-BR/guide/macos-preview.md +++ b/docs/pt-BR/guide/macos-preview.md @@ -63,6 +63,10 @@ antes da apresentação. Ao clicar em **Continuar**, ela fica marcada como lida neste Mac e não reaparece ao sair da conta ou atualizar o app. A carta acompanha o idioma do aplicativo. Quem já usa o Rove também a vê uma vez, sem repetir a apresentação que já concluiu. +Depois da apresentação, reabra quando quiser em **Ajuda → Agradecimento ao Thiago**. +A carta abre em uma janela própria, inclusive durante uma análise. **Fechar**, Esc +ou o controle de fechar a janela devolve você ao trabalho sem alterar a matriz, +os registros da primeira visita ou as novidades ainda não lidas. Em seguida, uma apresentação em quatro partes mostra o aplicativo, as matrizes, os grupos externos e os resultados. Você pode pular, testar o exemplo ou diff --git a/docs/zh-CN/guide/macos-preview.md b/docs/zh-CN/guide/macos-preview.md index 7fb7a44..0cb17e2 100644 --- a/docs/zh-CN/guide/macos-preview.md +++ b/docs/zh-CN/guide/macos-preview.md @@ -48,6 +48,9 @@ burn-in 和种子均可编辑;已完成的运行提供相同控件。由于模 确认访问权限后,应用会在介绍之前展示 Rafael 写给 Thiago J. Silva 的感谢信。 点击 **Continue** 后,本机将其标记为已读;退出登录或更新应用都不会再次显示。 感谢信使用应用当前的界面语言。现有用户也会看到一次,但无需重复已完成的介绍。 +完成介绍后,可随时通过 **Help → A thank-you to Thiago** 再次查看。 +感谢信在独立窗口中打开,分析运行时也可阅读。点击 **Close**、按 Escape 或关闭窗口, +即可返回工作,不会更改矩阵、首次使用记录或尚未阅读的更新说明。 随后,四步介绍会展示工作区、矩阵、外群和结果。可以跳过介绍、尝试示例,或打开 自己的矩阵;这些操作不会自动启动分析。通过 **Help → Take the Rove tour** 可再次