From 5614b2a4cf9688a9da8bf3519d4dda97fa256a2c Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Mon, 1 Jun 2026 12:49:31 -0300 Subject: [PATCH] IIRR-38: Collapse Rejected table by default, move to the bottom --- app/assets/stylesheets/application.scss | 9 +++++++++ app/views/puzzles/index.html.erb | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 64f7c57..29e154f 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -129,6 +129,15 @@ td pre { margin-bottom: 1rem; } +.rejected_table { + summary { + display: list-item; + text-align: start; + padding-inline-start: 1rem; + } + padding-block: 2rem; +} + /* Banner styles - using styleguide colors where possible */ .banner { position: fixed; diff --git a/app/views/puzzles/index.html.erb b/app/views/puzzles/index.html.erb index 958bbb6..7f0087a 100644 --- a/app/views/puzzles/index.html.erb +++ b/app/views/puzzles/index.html.erb @@ -11,9 +11,6 @@ <%= render partial: 'puzzles_table', locals: { puzzles: @approved_puzzles, actions: :approved } %> -

Rejected Puzzles

-<%= render partial: 'puzzles_table', locals: { puzzles: @rejected_puzzles, actions: :rejected } %> -

Archive Puzzles - Total: <%= @archived_puzzles.length %>

These puzzles have already been sent to the users.

@@ -24,3 +21,9 @@ <%= link_to "Hide cloned puzzles", url_for(hide_cloned_puzzles: true, low_success_rate: params[:low_success_rate]) %>
<%= render partial: 'puzzles_table', locals: { puzzles: @archived_puzzles, actions: :archived } %> + +
+ Click to expand/collapse "Rejected Puzzles" table +

Rejected Puzzles

+ <%= render partial: 'puzzles_table', locals: { puzzles: @rejected_puzzles, actions: :rejected } %> +