fix(goals): header CTA + projection-chart required-line color

V6 — three "Record pledge" affordances on goals#show (header, empty
state, catch-up callout) all rendered as `t(@goal.pledge_action_
label_key)` + `icon: "arrow-up-right"`. That dropped the user into a
button labelled "I just transferred…" or "I just saved…" with a
trailing ellipsis — past-tense as a CTA reads as a status
declaration, the ellipsis suggests an unresolved action, and
`arrow-up-right` is the icon Sure reserves elsewhere for
external-link affordances.

Switch the on-page CTA to a single new locale key,
`goals.show.record_pledge_cta: "Record pledge"`, with `icon: "plus"`
matching the other "new resource" buttons across the app (new goal,
new account, new rule). The modal title keeps using
`pledge_action_label_key`, so the past-tense "I just transferred…"
framing still anchors the dialog's confirm step.

V8 — the projection chart's "required" dashed line was hardcoded to
`var(--color-green-600)`. When the goal status is `:on_track` the
projection line is also green-dashed, and the two stroked the same
hue and dash pattern — they overlapped visually. Re-stroke the
required line in `textSecondary` (the chart's neutral foreground)
so it reads as a reference path independent of status.
This commit is contained in:
Guillem Arias
2026-05-14 19:50:29 +02:00
parent 5530ff5f06
commit cfdd3c476f
3 changed files with 13 additions and 10 deletions

View File

@@ -251,17 +251,19 @@ export default class extends Controller {
.attr("d", line);
if (requiredSeries.length) {
// Light dashed line: the path needed to hit the target. Sits behind
// the projection so the user sees both the goal and the ask.
// Light dashed reference line: the path needed to hit the target.
// Neutral stroke (text-secondary) instead of green — both the
// projection and the required line are otherwise green when the
// goal is on track, and the two would visually merge.
svg
.append("path")
.datum(requiredSeries)
.attr("fill", "none")
.attr("stroke", "var(--color-green-600)")
.attr("stroke", textSecondary)
.attr("stroke-width", 1.2)
.attr("stroke-linecap", "round")
.attr("stroke-dasharray", "2 4")
.attr("opacity", 0.45)
.attr("opacity", 0.5)
.attr("d", line);
}