Refine the station listing: muted verdict capsules, three-line names
The listing's verdict capsule now carries white text on muted semantic fills instead of the neutral secondary tint: Saves #45825E, Costs #A9635B, Break even #707070, Closest #58789D. Fixed tones, not translucent tints, because white text on a 15% tint over a white row measures ~1.8:1. Each tone sits at a relative luminance of ~0.18 — the band where white clears 4.5:1 AND the pill still separates ~3:1 from both a white row and the dark card fill — so one value each works in light and dark without a dynamic colour. The saturated palette colours cannot carry white text at all: systemGreen measures 2.2:1, systemRed 3.6:1. "Save" becomes "Saves", matching the detail sheet and reading as a statement of the outcome; amounts, symbols, padding, radius and the shape-follows-line-count rule are unchanged. Saves and Costs share an 84pt minimum width so their trailing edges line up down the list. The price and its capsule are now one vertically grouped element (5pt), with the badge keeping the column's full 12pt above, so the row no longer reads as three equal lines. Station names cap at three lines with a tail ellipsis: unbounded wrap let one very long forecourt name set the height of the whole row. 59 of the 8,073 names in the dump exceed three lines and now ellipsise; the full name is always in Station Details. Addresses still wrap freely. The baseline pill moves onto ListingFuelSavingsCapsule so the listing shows the same soft blue and white text as its siblings, leaving FuelSavingsCapsule to the detail sheet, which it now alone uses. Badges keep their tinted styling: they annotate a price rather than report an outcome. Verified: 261/261 swift test; Debug simulator and Release device builds; all four fills and their white text measured from simulator pixels in both appearances, and the detail sheet's .blue absent from the listing entirely.
This commit is contained in:
@@ -271,7 +271,7 @@ extension FuelSavingsResult {
|
||||
/// never straddle two lines, and a taller verdict grows the capsule downward
|
||||
/// instead of widening the row's fixed price column.
|
||||
struct ListingVerdict: Equatable {
|
||||
/// "Save", "Costs", "Break even" or "Closest station".
|
||||
/// "Saves", "Costs", "Break even" or "Closest station".
|
||||
let headline: String
|
||||
/// "£3.10" / "£1.20 more" — nil when there is no figure to show.
|
||||
let amount: String?
|
||||
@@ -293,7 +293,7 @@ extension FuelSavingsResult {
|
||||
switch status {
|
||||
case .worthTheDrive:
|
||||
return ListingVerdict(
|
||||
headline: String(localized: "Save"),
|
||||
headline: String(localized: "Saves"),
|
||||
amount: showsAmount ? FuelSavingsFormat.money(netSavingGBP) : nil,
|
||||
qualifier: qualifier
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user