mirror of
https://github.com/we-promise/sure.git
synced 2026-08-12 11:10:20 +00:00
ux(goals/show): catch-up CTA pre-fills + secondary "Adjust your target" link
The "Add $1,531.25" CTA used to open the contribution modal with an empty amount field — label was a hint, not a default. Now passes the catch-up amount via ?amount= and the contributions controller seeds @contribution.amount from params. One click brings the user to the modal already populated. Adds a secondary text link below the primary CTA: "Or adjust your target" → opens the edit modal (Turbo frame). Behavioural-econ choice architecture: gives the rebaseline path explicitly so users who can't realistically catch up don't feel forced into the contribution. Trade-off: lets the alert respect autonomy — commit or recalibrate, both fine. Action paralysis kept low by visual hierarchy (primary button vs muted text link).
This commit is contained in:
@@ -7,7 +7,8 @@ class GoalContributionsController < ApplicationController
|
||||
@contribution = @goal.goal_contributions.new(
|
||||
contributed_at: Date.current,
|
||||
currency: @goal.currency,
|
||||
source: "manual"
|
||||
source: "manual",
|
||||
amount: params[:amount].presence
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user