mirror of
https://github.com/we-promise/sure.git
synced 2026-05-29 23:39:03 +00:00
refactor(goals): migrate archived <details> to DS::Disclosure :inline
#1858's :inline variant landed (commit 8de14ed2), so the goals index
archived-section toggle can move off the raw <details> and onto the
shared primitive.
Behaviour and look unchanged — the custom summary content (chevron +
uppercase heading + tabular count) passes through the `summary_content`
slot; the `:inline` variant adds nothing on top besides the
focus-visible ring shared with the other DS::Disclosure variants.
Addresses the third sure-design DS Drift finding on #1798 (the other
two — DS::SearchInput + ring-gray-500 — already landed earlier).
This commit is contained in:
@@ -170,19 +170,21 @@
|
||||
|
||||
<% if @archived_goals.any? %>
|
||||
<section>
|
||||
<details class="group">
|
||||
<summary class="inline-flex items-center gap-1.5 mb-4 text-[11px] font-medium uppercase tracking-wide text-secondary cursor-pointer list-none">
|
||||
<span class="text-subdued group-open:rotate-90 transition-transform"><%= icon("chevron-right", size: "sm") %></span>
|
||||
<span><%= t(".archived_section.heading") %></span>
|
||||
<span class="text-subdued">·</span>
|
||||
<span class="tabular-nums"><%= @archived_goals.size %></span>
|
||||
</summary>
|
||||
<%= render DS::Disclosure.new(variant: :inline) do |disclosure| %>
|
||||
<% disclosure.with_summary_content do %>
|
||||
<span class="inline-flex items-center gap-1.5 mb-4 text-[11px] font-medium uppercase tracking-wide text-secondary">
|
||||
<span class="text-subdued group-open:rotate-90 motion-safe:transition-transform"><%= icon("chevron-right", size: "sm") %></span>
|
||||
<span><%= t(".archived_section.heading") %></span>
|
||||
<span class="text-subdued">·</span>
|
||||
<span class="tabular-nums"><%= @archived_goals.size %></span>
|
||||
</span>
|
||||
<% end %>
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3.5">
|
||||
<% @archived_goals.each do |goal| %>
|
||||
<%= render Goals::CardComponent.new(goal: goal, filterable: false) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</details>
|
||||
<% end %>
|
||||
</section>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user