mirror of
https://github.com/we-promise/sure.git
synced 2026-07-27 20:22:16 +00:00
* Fix N+1 queries on categories index by batching lookups and removing partial fallbacks * resolve Codex review suggestion about Guard subcategory against missing parents * resolve coderabbitai review suggestion - Guard against empty categories when computing category_ids_with_transactions * resolve coderabbitai review suggestion - Redundant pb-4 makes the conditional dead code * resolve coderabbitai caution on PR review * resolve sure-design review - DS Drift Patrol * fix conflicting hidden/flex classes * resolve jjmata review suggestion - schema.rb noise * fix conflict and adjust related parts * Ignore Brakeman EOLRails warning for Rails 7.2 Restore ignore entry lost during merge from main; documents upgrade tracking and matches brakeman 7.1.2 in Gemfile.lock. * db migration executed * Remove deprecated focus-ring override from goals color picker. The summary_class override was reintroduced during merge conflict resolution and clobbered DS::Disclosure's canonical focus styling. * fix merge conflict on disclosure.rb * Restore parent-based semantics while keeping the performance win for root categories * fix(ci): skip scheduled preview cleanup on forks Only run the hourly Cloudflare preview cleanup on we-promise/sure, where the required secrets exist. * Revert schema.rb dump noise unrelated to categories N+1 fix Restore db/schema.rb from main so PostgreSQL check-constraint and column-order churn does not obscure the real PR changes. Co-authored-by: Cursor <cursoragent@cursor.com> * Remove obsolete Rails 7.2 EOLRails Brakeman ignore Main is already on Rails 8.1, so the 7.2.3.1 ignore entry is no longer needed. Co-authored-by: Cursor <cursoragent@cursor.com> * Address review: bare disclosure docs, category picker aria label * fix(test): wait for async exchange rate updates in system test * fix(test): retry account edit submit around Turbo morph races --------- Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
875 B
Ruby
25 lines
875 B
Ruby
class DisclosureComponentPreview < ViewComponent::Preview
|
|
# @display container_classes max-w-[400px]
|
|
# @param align select ["left", "right"]
|
|
def default(align: "right")
|
|
render DS::Disclosure.new(title: "Title", align: align, open: true) do |disclosure|
|
|
disclosure.with_summary_content do
|
|
content_tag(:p, "$200.25", class: "text-xs font-mono font-medium")
|
|
end
|
|
|
|
content_tag(:p, "Sample disclosure content", class: "text-sm")
|
|
end
|
|
end
|
|
|
|
# @display container_classes max-w-[400px]
|
|
def bare
|
|
render DS::Disclosure.new(variant: :bare, open: true, summary_class: "cursor-pointer") do |disclosure|
|
|
disclosure.with_summary_content do
|
|
content_tag(:span, "Edit", class: "text-sm")
|
|
end
|
|
|
|
content_tag(:p, "Absolutely positioned panels should use the bare variant.", class: "text-sm absolute mt-2")
|
|
end
|
|
end
|
|
end
|