Compare commits

..
Author SHA1 Message Date
FuelBoard Contributor d2143d255f Settings: keep the Replay onboarding description inside its card
The Replay onboarding section rendered its description as a section footer, so
the text sat below the card while every other control card shows its description
inside the card above a hairline. Move the same copy into the section body as a
footnote/secondary row. Wording, the replay action and its behaviour are
unchanged; only the Fuel Savings general explanation and the Support tip note
remain section footers.
2026-10-17 11:33:13 +01:00
FuelBoard Contributor 31eb441d0e Settings: keep the Tap action description inside its card
The Tap action section rendered its description as a section footer, so the
text sat below the card while Units, Distances and Data checking show their
descriptions inside the card, separated from the control above by a hairline.
Move the same copy into the section body as a footnote/secondary row so the
card matches its neighbours. Wording is unchanged and no behavioural or
persistence code is touched.
2026-10-17 11:23:12 +01:00
FuelBoard Contributor e5a2b2ebdb 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.
2026-10-17 10:50:59 +01:00
6 changed files with 65 additions and 37 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ struct BestValueIntroContent: View {
.pickerStyle(.segmented) .pickerStyle(.segmented)
slider( slider(
title: String(localized: "Typical fill-up", comment: "Best Value fill-up slider label"), title: String(localized: "Fill-up amount", comment: "Best Value fill-up slider label"),
readOut: fillUpText, readOut: fillUpText,
value: amountBinding, value: amountBinding,
range: FuelSavingsCalculator.fillAmountSliderRange(for: settings.preferredAmount.unit), range: FuelSavingsCalculator.fillAmountSliderRange(for: settings.preferredAmount.unit),
+1 -1
View File
@@ -132,7 +132,7 @@ enum RoadDistanceService {
// visible to show for it: no pass, no requests, no widget reloads. // visible to show for it: no pass, no requests, no widget reloads.
guard FuelStore.accurateDistancesEnabled else { guard FuelStore.accurateDistancesEnabled else {
await updateDebug(baseDebugStatus(state: .gated, await updateDebug(baseDebugStatus(state: .gated,
reason: "Accurate distances off", reason: "Driving distances off",
stations: stations, stations: stations,
lat: lat, lat: lat,
lng: lng, lng: lng,
+43 -27
View File
@@ -70,7 +70,7 @@ struct SettingsView: View {
/// Hidden developer flag — the Debug section only appears when on. Toggled /// Hidden developer flag — the Debug section only appears when on. Toggled
/// by tapping the About → Version row five times (NOT a user-facing switch). /// by tapping the About → Version row five times (NOT a user-facing switch).
@State private var debugMode: Bool = FuelStore.loadDebugMode() @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. /// the shared store, which is what every display surface actually consults.
@State private var accurateDistances: Bool = FuelStore.accurateDistancesEnabled @State private var accurateDistances: Bool = FuelStore.accurateDistancesEnabled
/// Slider drafts — the value under the thumb while it is down. `nil` means /// 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 /// 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 /// 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. /// nothing sets it — it stays for any numeric field this screen takes again.
@State private var settingsUnitChangeNotice: String?
@FocusState private var focusedSavingsField: SavingsField? @FocusState private var focusedSavingsField: SavingsField?
private enum SavingsField: Hashable { private enum SavingsField: Hashable {
@@ -124,6 +123,9 @@ struct SettingsView: View {
List { List {
Section { Section {
Toggle("Best Value", isOn: fuelSavingsEnabledBinding) 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 // The feature's own controls follow its toggle: switched
// off they grey out but stay on screen (same rule as the // off they grey out but stay on screen (same rule as the
// distance picker in Closest mode) and keep their values, so // distance picker in Closest mode) and keep their values, so
@@ -150,6 +152,9 @@ struct SettingsView: View {
} }
.accessibilityLabel("Average fuel economy") .accessibilityLabel("Average fuel economy")
.accessibilityValue(mpgText) .accessibilityValue(mpgText)
Text("How many miles your car travels per gallon.")
.font(.footnote)
.foregroundStyle(.secondary)
Picker("Fill-up unit", selection: fuelSavingsUnitBinding) { Picker("Fill-up unit", selection: fuelSavingsUnitBinding) {
ForEach(FuelSavingsFillUnit.allCases) { unit in ForEach(FuelSavingsFillUnit.allCases) { unit in
Text(unit.displayName).tag(unit) Text(unit.displayName).tag(unit)
@@ -157,7 +162,7 @@ struct SettingsView: View {
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
HStack { HStack {
Text("Typical fill-up") Text("Fill-up amount")
Spacer() Spacer()
Text(fillUpText) Text(fillUpText)
.monospacedDigit() .monospacedDigit()
@@ -168,8 +173,11 @@ struct SettingsView: View {
step: FuelSavingsCalculator.fillAmountSliderStep(for: fuelSavingsSettings.preferredAmount.unit)) { editing in step: FuelSavingsCalculator.fillAmountSliderStep(for: fuelSavingsSettings.preferredAmount.unit)) { editing in
if !editing { commitFillUp() } if !editing { commitFillUp() }
} }
.accessibilityLabel("Typical fill-up") .accessibilityLabel("Fill-up amount")
.accessibilityValue(fillUpText) .accessibilityValue(fillUpText)
Text(fillUpAmountDescription)
.font(.footnote)
.foregroundStyle(.secondary)
Picker("Minimum saving", selection: $bestValueThresholdGBP) { Picker("Minimum saving", selection: $bestValueThresholdGBP) {
ForEach(FuelStore.bestValueAlertThresholdOptionsGBP, id: \.self) { value in ForEach(FuelStore.bestValueAlertThresholdOptionsGBP, id: \.self) { value in
Text(FuelSavingsFormat.money(value)).tag(value) Text(FuelSavingsFormat.money(value)).tag(value)
@@ -181,17 +189,12 @@ struct SettingsView: View {
// needs no handler of its own. The store snaps to the // needs no handler of its own. The store snaps to the
// nearest option, so the picker and the stored value // nearest option, so the picker and the stored value
// cannot disagree. // 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.") Text("The smallest saving you'd consider worth the extra drive.")
.font(.caption) .font(.footnote)
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
if let settingsUnitChangeNotice {
Text(settingsUnitChangeNotice)
.font(.caption2)
.foregroundStyle(.orange)
}
if !fuelSavingsSettings.isConfigured && fuelSavingsSettings.enabled { if !fuelSavingsSettings.isConfigured && fuelSavingsSettings.enabled {
Text("Set a realistic UK MPG and fill-up amount before Best Value appears in sorting.") Text("Set a realistic UK MPG and fill-up amount before Best Value appears in sorting.")
.font(.caption) .font(.footnote)
.foregroundStyle(.orange) .foregroundStyle(.orange)
} }
} }
@@ -199,7 +202,7 @@ struct SettingsView: View {
} header: { } header: {
Text("Fuel Savings") Text("Fuel Savings")
} footer: { } 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 { Section {
@@ -214,6 +217,9 @@ struct SettingsView: View {
WidgetCenter.shared.reloadAllTimelines() WidgetCenter.shared.reloadAllTimelines()
WatchSyncManager.shared.pushSnapshot() WatchSyncManager.shared.pushSnapshot()
} }
Text("Choose how distances are displayed throughout FuelBoard.")
.font(.footnote)
.foregroundStyle(.secondary)
Picker("Price display", selection: $priceDisplayStyle) { Picker("Price display", selection: $priceDisplayStyle) {
ForEach(PriceDisplayStyle.allCases) { style in ForEach(PriceDisplayStyle.allCases) { style in
Text(style.displayName).tag(style) Text(style.displayName).tag(style)
@@ -225,24 +231,26 @@ struct SettingsView: View {
WidgetCenter.shared.reloadAllTimelines() WidgetCenter.shared.reloadAllTimelines()
WatchSyncManager.shared.pushSnapshot() WatchSyncManager.shared.pushSnapshot()
} }
Text("Show prices as 129.9p or £1.299 per litre.")
.font(.footnote)
.foregroundStyle(.secondary)
} header: { } header: {
Text("Units") 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 { Section {
Toggle("Accurate distances", isOn: $accurateDistances) Toggle("Driving distances", isOn: $accurateDistances)
.onChange(of: accurateDistances) { _, newValue in .onChange(of: accurateDistances) { _, newValue in
FuelStore.setAccurateDistancesEnabled(newValue) FuelStore.setAccurateDistancesEnabled(newValue)
WidgetCenter.shared.reloadAllTimelines() WidgetCenter.shared.reloadAllTimelines()
NotificationCenter.default.post(name: .fuelBoardAccurateDistancesChanged, NotificationCenter.default.post(name: .fuelBoardAccurateDistancesChanged,
object: nil) 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: { } header: {
Text("Distances") 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 { Section {
@@ -255,10 +263,11 @@ struct SettingsView: View {
.onChange(of: stationTapAction) { _, newValue in .onChange(of: stationTapAction) { _, newValue in
FuelStore.saveStationTapAction(newValue) FuelStore.saveStationTapAction(newValue)
} }
Text("Choose what happens when you tap a station: get directions or view its details.")
.font(.footnote)
.foregroundStyle(.secondary)
} header: { } header: {
Text("Tap action") Text("Tap action")
} footer: {
Text("Tapping a station either opens directions straight away or shows its details first.")
} }
Section { Section {
@@ -275,14 +284,12 @@ struct SettingsView: View {
} }
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
Text(dataRefreshMode.summary) 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) .foregroundStyle(.secondary)
} }
.font(.footnote) .font(.footnote)
} header: { } header: {
Text("Data checking") 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 { Section {
@@ -291,8 +298,9 @@ struct SettingsView: View {
} label: { } label: {
Label("Show introduction", systemImage: "arrow.clockwise.circle") Label("Show introduction", systemImage: "arrow.clockwise.circle")
} }
} footer: { Text("View the welcome screens and set up permissions again.")
Text("Replay the welcome screen, including the location and notification permission prompts.") .font(.footnote)
.foregroundStyle(.secondary)
} }
if debugMode { if debugMode {
@@ -469,7 +477,7 @@ struct SettingsView: View {
} header: { } header: {
Text("Road distance fill") Text("Road distance fill")
} footer: { } 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 { Section {
@@ -782,7 +790,6 @@ struct SettingsView: View {
guard newUnit != fuelSavingsSettings.preferredAmount.unit else { return } guard newUnit != fuelSavingsSettings.preferredAmount.unit else { return }
fuelSavingsSettings.preferredAmount = FuelSavingsCalculator.newComparisonAmount( fuelSavingsSettings.preferredAmount = FuelSavingsCalculator.newComparisonAmount(
afterSwitching: fuelSavingsSettings.preferredAmount, to: newUnit) 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. // The unit and the amount move together, so both keys are written.
saveFuelSavingsField(.unit) saveFuelSavingsField(.unit)
saveFuelSavingsField(.amount) saveFuelSavingsField(.amount)
@@ -792,6 +799,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 /// "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 /// is the one place the figure is stated. It follows the draft while the
/// thumb is down. /// thumb is down.
+15 -3
View File
@@ -67,10 +67,11 @@
/* Settings tab */ /* Settings tab */
"Units" = "Units"; "Units" = "Units";
"Price display" = "Price display"; "Price display" = "Price display";
"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)." = "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)."; "Choose how distances are displayed throughout FuelBoard." = "Choose how distances are displayed throughout FuelBoard.";
"Show prices as 129.9p or £1.299 per litre." = "Show prices as 129.9p or £1.299 per litre.";
"Tap station" = "Tap station"; "Tap station" = "Tap station";
"Tap action" = "Tap action"; "Tap action" = "Tap action";
"Tapping a station either opens directions straight away or shows its details first." = "Tapping a station either opens directions straight away or shows its details first."; "Choose what happens when you tap a station: get directions or view its details." = "Choose what happens when you tap a station: get directions or view its details.";
"Open map" = "Open map"; "Open map" = "Open map";
"More info" = "More info"; "More info" = "More info";
"Name" = "Name"; "Name" = "Name";
@@ -81,7 +82,18 @@
"Directions to %@" = "Directions to %@"; "Directions to %@" = "Directions to %@";
"Opens Apple Maps with driving directions" = "Opens Apple Maps with driving directions"; "Opens Apple Maps with driving directions" = "Opens Apple Maps with driving directions";
"Show introduction" = "Replay onboarding"; "Show introduction" = "Replay onboarding";
"Replay the welcome screen, including the location and notification permission prompts." = "Replay the welcome screen, including the location and notification permission prompts."; "View the welcome screens and set up permissions again." = "View the welcome screens and set up permissions again.";
/* Settings — refined copy (Fuel Savings, Distances, Data checking) */
"Fill-up amount" = "Fill-up amount";
"Find stations that could save you money, even after the cost of driving there." = "Find stations that could save you money, even after the cost of driving there.";
"How many miles your car travels per gallon." = "How many miles your car travels per gallon.";
"How much you plan to spend on fuel." = "How much you plan to spend on fuel.";
"How many litres you usually buy." = "How many litres you usually buy.";
"The smallest saving you'd consider worth the extra drive." = "The smallest saving you'd consider worth the extra drive.";
"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." = "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.";
"Use actual driving distances instead of straight-line estimates. Routes are calculated while the app is open." = "Use actual driving distances instead of straight-line estimates. Routes are calculated while the app is open.";
"Background updates depend on when your iPhone allows them." = "Background updates depend on when your iPhone allows them.";
"Test alert notification (real data)" = "Test alert notification (real data)"; "Test alert notification (real data)" = "Test alert notification (real data)";
"Send plain test notification" = "Send plain test notification"; "Send plain test notification" = "Send plain test notification";
"Debug" = "Debug"; "Debug" = "Debug";
+2 -2
View File
@@ -16,9 +16,9 @@ enum DataRefreshMode: String, CaseIterable, Identifiable {
var summary: String { var summary: String {
switch self { switch self {
case .standard: case .standard:
return "Saves battery. Refreshes price data up to twice daily." return "Saves battery by checking for new prices up to twice a day."
case .smart: case .smart:
return "Checks for newer data more often in the background and refreshes full prices only when an update is available." return "Checks for new prices more often, keeping your data fresher."
} }
} }
} }
+3 -3
View File
@@ -236,7 +236,7 @@ enum PriceDisplayStyle: String, Codable, CaseIterable, Identifiable {
var displayName: String { var displayName: String {
switch self { switch self {
case .stationSign: return "Station sign" case .stationSign: return "Pence per litre"
case .poundsPence: return "Pounds & pence" case .poundsPence: return "Pounds & pence"
} }
} }
@@ -255,8 +255,8 @@ enum StationTapAction: String, Codable, CaseIterable, Identifiable {
var displayName: String { var displayName: String {
switch self { switch self {
case .openMap: return "Open map" case .openMap: return "Directions"
case .showDetails: return "More info" case .showDetails: return "Station details"
} }
} }
} }