From 46bd5e043451a61c8c06df1551605e77912155bf Mon Sep 17 00:00:00 2001 From: Guillem Arias Date: Mon, 11 May 2026 21:09:13 +0200 Subject: [PATCH] ux(goals): color picker uses Sure's inline-disclosure pattern; drop em-dash in catch-up body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found the actual Sure pattern in app/views/accounts/_form.html.erb:27-47 ("Additional details" section in the account-creation flow):
<%= icon "chevron-right", class: "group-open:rotate-90 transition-transform" %> ...
...
It's an inline expand (no absolute popup), chevron rotates 90° on open, body indented with a vertical primary-color rule. My previous partial was an absolute-positioned popover lifted from categories/_form.html.erb — not what Sure uses for collapsible form sections. Rewrite _color_picker.html.erb to match: chevron + color-preview disc + "Color" label in the summary; swatches in an inline indented body. Catch-up body also drops the em-dash. Was: "You're saving $X/mo today — $Y/mo short of the pace to finish by $date." Now two sentences: "Your current pace is $X/mo. You need an extra $Y/mo to finish by $date." Two short clauses, no compound separator, each conveys a single number. Frames the gap as "extra" rather than "short", which behavioral-econ research suggests reads as more attainable. --- app/views/goals/_color_picker.html.erb | 13 +++++++------ config/locales/views/goals/en.yml | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/views/goals/_color_picker.html.erb b/app/views/goals/_color_picker.html.erb index 1d8fdb684..35d3d9481 100644 --- a/app/views/goals/_color_picker.html.erb +++ b/app/views/goals/_color_picker.html.erb @@ -1,11 +1,12 @@ <%# locals: (form:, colors:) %> -
- - - <%= t("goals.form_stepper.step1.fields.color") %> - <%= icon("chevron-down", size: "sm") %> +
+ + <%= icon "chevron-right", size: "sm", class: "group-open:rotate-90 transition-transform" %> + + <%= t("goals.form_stepper.step1.fields.color") %> -
+ +
<% colors.each do |c| %>