mirror of
https://github.com/we-promise/sure.git
synced 2026-05-23 20:44:55 +00:00
Per the design review, the "Add another provider · Browse providers" card was a redirect to content one scroll-tick away. A search input plus kind chips lets users self-segment the catalog and is the right tool once it grows beyond the four to twelve providers we ship today. - New providers_filter Stimulus controller — case-insensitive free text search across name/region/kind, plus a chip group with All / Banks / Crypto / Investment that toggle visibility via Tailwind's `hidden` class. - _search_filters partial: search box (count-pluralized placeholder) + chip group, ARIA-labelled and aria-pressed for the chips. - ProviderCard exposes filter_data (target + name/region/kind data attrs) so the controller can match without re-rendering. - Lunchflow's `kind` was "Lunch" — switched to "Bank" so it falls under the Banks chip alongside its actual offering (it aggregates banks). - Drops the add_provider_cta partial and its locale entries; adds search_filters.* and an empty_filter message.
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
<%= link_to connect_path,
|
|
class: "bg-container shadow-border-xs rounded-xl p-4 flex flex-col gap-3 text-primary hover:bg-container-hover transition-colors",
|
|
data: { turbo_frame: "drawer", turbo_prefetch: "false" }.merge(filter_data) do %>
|
|
<div class="flex items-start gap-3">
|
|
<div class="w-9 h-9 rounded-lg flex items-center justify-center shrink-0 <%= logo_bg %>">
|
|
<span class="text-xs font-bold text-inverse"><%= logo_text %></span>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
<div class="flex items-center gap-2 flex-wrap">
|
|
<span class="font-medium text-primary"><%= name %></span>
|
|
<% if maturity_label %>
|
|
<span class="text-xs font-medium px-1.5 py-0.5 rounded-full bg-alpha-black-50 text-secondary"><%= maturity_label %></span>
|
|
<% end %>
|
|
</div>
|
|
<% if meta_line.present? %>
|
|
<p class="text-xs text-subdued mt-0.5"><%= meta_line %></p>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% if tagline.present? %>
|
|
<p class="text-sm text-secondary grow"><%= tagline %></p>
|
|
<% end %>
|
|
<div class="flex items-center justify-end gap-1.5 text-sm font-medium text-primary">
|
|
<%= t("settings.providers.connect") %>
|
|
<%= helpers.icon "arrow-right", class: "w-4 h-4" %>
|
|
</div>
|
|
<% end %>
|