Station detail: price above its age, and the verdict caption on its own line

- More info lists the fuel price first, with "Price updated" beneath it:
  the price is what the row is about, the age qualifies it.
- The detail sheet stacks "vs closest eligible station" under the verdict
  capsule, matching the listing rows, so the caption no longer shares a
  line with the verdict it describes.
This commit is contained in:
FuelBoard Contributor
2026-10-15 22:48:07 +01:00
parent ed3a5137cd
commit 5900a81473
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -149,14 +149,17 @@ struct FuelSavingsSummaryView: View {
// room for. The old shape led with a status word + headline that // room for. The old shape led with a status word + headline that
// matched neither the listing nor each other. // matched neither the listing nor each other.
VStack(alignment: .leading, spacing: 10) { VStack(alignment: .leading, spacing: 10) {
HStack(alignment: .firstTextBaseline, spacing: 6) { // Same shape as the listing rows: the capsule takes the line
// and the comparison caption sits directly beneath it, so the
// verdict never competes for width with its own caption.
VStack(alignment: .leading, spacing: 4) {
capsule(for: result, compact: false) capsule(for: result, compact: false)
.accessibilityLabel(accessibilityHeadline(for: result)) .accessibilityLabel(accessibilityHeadline(for: result))
Text(comparisonLabel(for: result)) Text(comparisonLabel(for: result))
.font(.subheadline) .font(.subheadline)
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
.lineLimit(1) .lineLimit(1)
.layoutPriority(1) .minimumScaleFactor(0.85)
.accessibilityLabel("Comparison: \(comparisonLabel(for: result))") .accessibilityLabel("Comparison: \(comparisonLabel(for: result))")
} }
LabeledContent("Your fill-up", value: amountText) LabeledContent("Your fill-up", value: amountText)
+2 -2
View File
@@ -213,10 +213,10 @@ struct StationDetailView: View {
LabeledContent("Distance", value: distance.labelWithReturn(unit: distanceUnit)) LabeledContent("Distance", value: distance.labelWithReturn(unit: distanceUnit))
.monospacedDigit() .monospacedDigit()
} }
LabeledContent("Price updated", value: priceFreshness.updateAgeLabel)
.monospacedDigit()
LabeledContent("\(selectedFuel.displayName) price", value: selectedFuelPriceText) LabeledContent("\(selectedFuel.displayName) price", value: selectedFuelPriceText)
.monospacedDigit() .monospacedDigit()
LabeledContent("Price updated", value: priceFreshness.updateAgeLabel)
.monospacedDigit()
ForEach(StationNotice.notices(for: station)) { notice in ForEach(StationNotice.notices(for: station)) { notice in
Label(notice.title, systemImage: notice.symbolName) Label(notice.title, systemImage: notice.symbolName)
.font(.subheadline.weight(.semibold)) .font(.subheadline.weight(.semibold))