mirror of
https://github.com/we-promise/sure.git
synced 2026-05-30 07:49:01 +00:00
fix(goals): clarify "last saved" + add pledge timestamp to banner
UX audit pair. Header "Last saved N days ago" was rendered from `Goal#last_matched_pledge_at` — date of the most recent *pledge-matched* entry — but the funding column on the same page shows "$X last 30d" computed off *all* entries. A user who deposited cash without recording a pledge saw "Funding · last 30d: $200" while the header still read "Last saved 47 days ago." Two adjacent figures contradicted each other. Rename the locale strings (used on both the index card and the show header) to reflect the actual data source: - footer_no_pledges: "No matched pledges yet" - footer_last_today: "Last pledge matched today" - footer_last_days: "Last pledge matched N days ago" Two open pledges into the same account previously rendered as two near-identical yellow banners with no way to tell which one the Cancel button targeted. Add a relative-time line below the body — "Pledged 2 hours ago" / "Pledged about a minute ago" — using `time_ago_in_words(pledge.created_at)`. Discriminator without changing the title or the action surface.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
%>
|
||||
<%= render DS::Alert.new(variant: "warning", title: title, live: :polite) do %>
|
||||
<p class="text-secondary"><%= t(body_key) %></p>
|
||||
<p class="text-xs text-subdued mt-1"><%= t("goals.show.pending_pledge.pledged_at", time_ago: time_ago_in_words(pledge.created_at)) %></p>
|
||||
<div class="mt-2 flex items-center gap-2 flex-wrap">
|
||||
<%= render DS::Button.new(
|
||||
text: t("goals.show.pending_pledge.extend"),
|
||||
|
||||
@@ -113,6 +113,7 @@ en:
|
||||
other: "Pending: %{amount} into %{account} · %{count} days left"
|
||||
body_transfer: Auto-confirms when Sure spots a matching deposit on the next sync.
|
||||
body_manual: Confirms on your next manual balance edit.
|
||||
pledged_at: "Pledged %{time_ago} ago"
|
||||
extend: Extend 7 days
|
||||
cancel: Cancel
|
||||
confirm_cancel_title: Cancel this pledge?
|
||||
@@ -218,11 +219,11 @@ en:
|
||||
footer_reached: Goal reached
|
||||
footer_catch_up: "Save %{amount}/mo to catch up"
|
||||
footer_no_deadline: Open
|
||||
footer_no_pledges: No pledges yet
|
||||
footer_last_today: Last saved today
|
||||
footer_no_pledges: No matched pledges yet
|
||||
footer_last_today: Last pledge matched today
|
||||
footer_last_days:
|
||||
one: Last saved 1 day ago
|
||||
other: "Last saved %{count} days ago"
|
||||
one: Last pledge matched 1 day ago
|
||||
other: "Last pledge matched %{count} days ago"
|
||||
form_stepper:
|
||||
cancel: Cancel
|
||||
continue: Continue
|
||||
|
||||
Reference in New Issue
Block a user