Settings: concise copy and tighter hierarchy
Rewrite the Settings screen in short British English and remove the duplicated paragraphs, keeping every control, binding and preference key as it was. - Fuel Savings: one-line descriptions for Best Value, average fuel economy, fill-up amount (worded for the unit in use) and minimum saving; one concise general explanation replaces the long footer; the orange "New comparison basis" notice is removed. - Units: "Station sign" becomes "Pence per litre"; the combined paragraph becomes two contextual descriptions. - Distances: "Accurate distances" becomes "Driving distances" with a short description; the route-request and search-radii paragraph is removed. - Tap action: "Open map"/"More info" become "Directions"/"Station details" with a short description. - Data checking: Standard and Smart summaries cut to one line each, one shared background-update note, duplicated footer removed. - Replay onboarding: shorter description. Support FuelBoard untouched. Copy and layout only: no calculations, ranking, refresh schedules, stored values or persistence changed. New and reworded literals live in FuelBoard/en.lproj/Localizable.strings.
This commit is contained in:
@@ -70,7 +70,7 @@ struct SettingsView: View {
|
||||
/// Hidden developer flag — the Debug section only appears when on. Toggled
|
||||
/// by tapping the About → Version row five times (NOT a user-facing switch).
|
||||
@State private var debugMode: Bool = FuelStore.loadDebugMode()
|
||||
/// "Accurate distances" — read once on appear and written straight through to
|
||||
/// "Driving distances" — read once on appear and written straight through to
|
||||
/// the shared store, which is what every display surface actually consults.
|
||||
@State private var accurateDistances: Bool = FuelStore.accurateDistancesEnabled
|
||||
/// Slider drafts — the value under the thumb while it is down. `nil` means
|
||||
@@ -92,7 +92,6 @@ struct SettingsView: View {
|
||||
/// Return key, so the keyboard's Done button clears this to dismiss AND
|
||||
/// commit the typed value. Both Fuel Savings controls are sliders now, so
|
||||
/// nothing sets it — it stays for any numeric field this screen takes again.
|
||||
@State private var settingsUnitChangeNotice: String?
|
||||
@FocusState private var focusedSavingsField: SavingsField?
|
||||
|
||||
private enum SavingsField: Hashable {
|
||||
@@ -124,6 +123,9 @@ struct SettingsView: View {
|
||||
List {
|
||||
Section {
|
||||
Toggle("Best Value", isOn: fuelSavingsEnabledBinding)
|
||||
Text("Find stations that could save you money, even after the cost of driving there.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
// The feature's own controls follow its toggle: switched
|
||||
// off they grey out but stay on screen (same rule as the
|
||||
// distance picker in Closest mode) and keep their values, so
|
||||
@@ -150,6 +152,9 @@ struct SettingsView: View {
|
||||
}
|
||||
.accessibilityLabel("Average fuel economy")
|
||||
.accessibilityValue(mpgText)
|
||||
Text("How many miles your car travels per gallon.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
Picker("Fill-up unit", selection: fuelSavingsUnitBinding) {
|
||||
ForEach(FuelSavingsFillUnit.allCases) { unit in
|
||||
Text(unit.displayName).tag(unit)
|
||||
@@ -157,7 +162,7 @@ struct SettingsView: View {
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
HStack {
|
||||
Text("Typical fill-up")
|
||||
Text("Fill-up amount")
|
||||
Spacer()
|
||||
Text(fillUpText)
|
||||
.monospacedDigit()
|
||||
@@ -168,8 +173,11 @@ struct SettingsView: View {
|
||||
step: FuelSavingsCalculator.fillAmountSliderStep(for: fuelSavingsSettings.preferredAmount.unit)) { editing in
|
||||
if !editing { commitFillUp() }
|
||||
}
|
||||
.accessibilityLabel("Typical fill-up")
|
||||
.accessibilityLabel("Fill-up amount")
|
||||
.accessibilityValue(fillUpText)
|
||||
Text(fillUpAmountDescription)
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
Picker("Minimum saving", selection: $bestValueThresholdGBP) {
|
||||
ForEach(FuelStore.bestValueAlertThresholdOptionsGBP, id: \.self) { value in
|
||||
Text(FuelSavingsFormat.money(value)).tag(value)
|
||||
@@ -181,17 +189,12 @@ struct SettingsView: View {
|
||||
// needs no handler of its own. The store snaps to the
|
||||
// nearest option, so the picker and the stored value
|
||||
// cannot disagree.
|
||||
Text("A saving worth driving for: the net saving left after the extra travel cost. Stations above it are labelled BEST VALUE in the station list, and Best Value alerts use the same figure.")
|
||||
.font(.caption)
|
||||
Text("The smallest saving you'd consider worth the extra drive.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
if let settingsUnitChangeNotice {
|
||||
Text(settingsUnitChangeNotice)
|
||||
.font(.caption2)
|
||||
.foregroundStyle(.orange)
|
||||
}
|
||||
if !fuelSavingsSettings.isConfigured && fuelSavingsSettings.enabled {
|
||||
Text("Set a realistic UK MPG and fill-up amount before Best Value appears in sorting.")
|
||||
.font(.caption)
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.orange)
|
||||
}
|
||||
}
|
||||
@@ -199,7 +202,7 @@ struct SettingsView: View {
|
||||
} header: {
|
||||
Text("Fuel Savings")
|
||||
} footer: {
|
||||
Text("Best Value estimates fuel cost only, using UK imperial MPG, your typical purchase amount, fuel prices and Apple Maps road distances. Real-world average MPG is better than manufacturer figures; the fill-up amount is your usual purchase, not tank capacity.")
|
||||
Text("FuelBoard compares fuel prices and travel costs to find stations that could save you money. Results are estimates based on your settings and driving distance.")
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -214,6 +217,9 @@ struct SettingsView: View {
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
WatchSyncManager.shared.pushSnapshot()
|
||||
}
|
||||
Text("Choose how distances are displayed throughout FuelBoard.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
Picker("Price display", selection: $priceDisplayStyle) {
|
||||
ForEach(PriceDisplayStyle.allCases) { style in
|
||||
Text(style.displayName).tag(style)
|
||||
@@ -225,24 +231,26 @@ struct SettingsView: View {
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
WatchSyncManager.shared.pushSnapshot()
|
||||
}
|
||||
Text("Show prices as 129.9p or £1.299 per litre.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
} header: {
|
||||
Text("Units")
|
||||
} footer: {
|
||||
Text("Distances and search radii across the app, widget and alerts are shown in this unit. Prices can be shown as on a station sign (129.9) or in pounds and pence (£1.29⁹/L).")
|
||||
}
|
||||
|
||||
Section {
|
||||
Toggle("Accurate distances", isOn: $accurateDistances)
|
||||
Toggle("Driving distances", isOn: $accurateDistances)
|
||||
.onChange(of: accurateDistances) { _, newValue in
|
||||
FuelStore.setAccurateDistancesEnabled(newValue)
|
||||
WidgetCenter.shared.reloadAllTimelines()
|
||||
NotificationCenter.default.post(name: .fuelBoardAccurateDistancesChanged,
|
||||
object: nil)
|
||||
}
|
||||
Text("Use actual driving distances instead of straight-line estimates. Routes are calculated while the app is open.")
|
||||
.font(.footnote)
|
||||
.foregroundStyle(.secondary)
|
||||
} header: {
|
||||
Text("Distances")
|
||||
} footer: {
|
||||
Text("Off (default): distances are straight-line estimates marked Approx. and the app makes no route requests. On: Apple Maps driving distances for every station in range, filled only while this app is open. Search radii then mean miles of driving.")
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -258,7 +266,7 @@ struct SettingsView: View {
|
||||
} header: {
|
||||
Text("Tap action")
|
||||
} footer: {
|
||||
Text("Tapping a station either opens directions straight away or shows its details first.")
|
||||
Text("Choose what happens when you tap a station: get directions or view its details.")
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -275,14 +283,12 @@ struct SettingsView: View {
|
||||
}
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(dataRefreshMode.summary)
|
||||
Text("Background checks are best-effort and happen only when iOS allows, so timing is not exact.")
|
||||
Text("Background updates depend on when your iPhone allows them.")
|
||||
.foregroundStyle(.secondary)
|
||||
}
|
||||
.font(.footnote)
|
||||
} header: {
|
||||
Text("Data checking")
|
||||
} footer: {
|
||||
Text("Standard saves battery and refreshes price data up to twice daily. Smart checks for newer data more often in the background and only refreshes full prices when an update is available.")
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -292,7 +298,7 @@ struct SettingsView: View {
|
||||
Label("Show introduction", systemImage: "arrow.clockwise.circle")
|
||||
}
|
||||
} footer: {
|
||||
Text("Replay the welcome screen, including the location and notification permission prompts.")
|
||||
Text("View the welcome screens and set up permissions again.")
|
||||
}
|
||||
|
||||
if debugMode {
|
||||
@@ -469,7 +475,7 @@ struct SettingsView: View {
|
||||
} header: {
|
||||
Text("Road distance fill")
|
||||
} footer: {
|
||||
Text("Shows whether Accurate distances is running or gated. Distances stay Approx. until Ready is yes for the current origin; gated reasons explain why no fill is happening.")
|
||||
Text("Shows whether Driving distances is running or gated. Distances stay Approx. until Ready is yes for the current origin; gated reasons explain why no fill is happening.")
|
||||
}
|
||||
|
||||
Section {
|
||||
@@ -782,7 +788,6 @@ struct SettingsView: View {
|
||||
guard newUnit != fuelSavingsSettings.preferredAmount.unit else { return }
|
||||
fuelSavingsSettings.preferredAmount = FuelSavingsCalculator.newComparisonAmount(
|
||||
afterSwitching: fuelSavingsSettings.preferredAmount, to: newUnit)
|
||||
settingsUnitChangeNotice = "New comparison basis — adjust the \(newUnit.displayName) amount to your intended fill-up."
|
||||
// The unit and the amount move together, so both keys are written.
|
||||
saveFuelSavingsField(.unit)
|
||||
saveFuelSavingsField(.amount)
|
||||
@@ -792,6 +797,15 @@ struct SettingsView: View {
|
||||
)
|
||||
}
|
||||
|
||||
/// Describes the fill-up amount in the unit the user picked, so the copy stays
|
||||
/// true whether the amount is a budget in pounds or a volume in litres.
|
||||
private var fillUpAmountDescription: String {
|
||||
switch fuelSavingsSettings.preferredAmount.unit {
|
||||
case .pounds: return "How much you plan to spend on fuel."
|
||||
case .litres: return "How many litres you usually buy."
|
||||
}
|
||||
}
|
||||
|
||||
/// "45 MPG" / "45.5 MPG". The slider is the only control, so this read-out
|
||||
/// is the one place the figure is stated. It follows the draft while the
|
||||
/// thumb is down.
|
||||
|
||||
Reference in New Issue
Block a user