From 901f972a03d51f84fbf46f70878496aac5497c26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 04:53:30 +0000 Subject: [PATCH 01/15] Bump nokogiri in the bundler group across 1 directory Bumps the bundler group with 1 update in the / directory: [nokogiri](https://github.com/sparklemotion/nokogiri). Updates `nokogiri` from 1.18.4 to 1.18.8 - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.18.4...v1.18.8) --- updated-dependencies: - dependency-name: nokogiri dependency-version: 1.18.8 dependency-type: indirect dependency-group: bundler ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index af067243..c88c0ad5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -273,9 +273,9 @@ GEM net-protocol net-ssh (7.2.3) nio4r (2.7.3) - nokogiri (1.18.4-arm64-darwin) + nokogiri (1.18.8-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.4-x86_64-linux-gnu) + nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) omniauth (2.1.3) hashie (>= 3.4.6) From 28f4805142d45cdfff2326abde5a16919d6414c1 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 11:27:31 -0400 Subject: [PATCH 02/15] Add U-M logo SVG asset to application This commit introduces a new SVG asset for the U-M logo, enhancing the visual branding of the application. The addition of this logo supports ongoing improvements in the application's user interface and overall aesthetic appeal. --- app/assets/images/U-M_Logo.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 app/assets/images/U-M_Logo.svg diff --git a/app/assets/images/U-M_Logo.svg b/app/assets/images/U-M_Logo.svg new file mode 100644 index 00000000..23e07342 --- /dev/null +++ b/app/assets/images/U-M_Logo.svg @@ -0,0 +1 @@ + \ No newline at end of file From 7ac9bd713a82bd5ca6a3c565410bd8b78f717091 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 11:28:02 -0400 Subject: [PATCH 03/15] Enhance mailer layout with U-M branding and structured content This commit updates the mailer layout by adding the U-M logo with adjusted dimensions and a new header section. It introduces a structured layout that includes a footer with automated email disclaimers and copyright information. These changes improve the visual branding and user experience of email communications. --- app/views/layouts/mailer.html.erb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index b77e8118..fe526d4b 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -20,6 +20,9 @@ } .logo { max-width: 150px; + width: 100px; + height: auto; + margin-bottom: 15px; } h1, h2, h3 { color: #1a5a96; @@ -72,6 +75,19 @@ - <%= yield %> +
+
+

<%= image_tag attachments['U-M_Logo.svg'].url, alt: "University of Michigan Logo", class: "logo" %>LSA Evaluate

+
+ +
+ <%= yield %> +
+ + +
From afc12fce9109d5723a0f6408404e90a6172c67ca Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 11:28:16 -0400 Subject: [PATCH 04/15] Update ApplicationMailer to include U-M branding and inline logo attachment This commit modifies the ApplicationMailer to enhance email branding by updating the default sender format to include the University of Michigan - LSA Evaluate name. It also adds a before_action to attach the U-M logo as an inline image in emails, improving the visual identity of communications. These changes support ongoing efforts to strengthen the application's branding and user experience. --- app/mailers/application_mailer.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb index a0ef06f5..096baaa8 100644 --- a/app/mailers/application_mailer.rb +++ b/app/mailers/application_mailer.rb @@ -1,8 +1,16 @@ # frozen_string_literal: true class ApplicationMailer < ActionMailer::Base - prepend_view_path 'app/views/mailers' - default from: Rails.application.credentials.dig(:sendgrid, :mailer_sender), - reply_to: 'lsa-evaluate-support@umich.edu' + default from: "University of Michigan - LSA Evaluate <#{Rails.application.credentials.dig(:sendgrid, :mailer_sender)}>", + reply_to: 'LSA Evaluate Support ' + layout 'mailer' + + before_action :attach_logo + + private + + def attach_logo + attachments.inline['U-M_Logo.svg'] = File.read(Rails.root.join('app/assets/images/U-M_Logo.svg')) + end end From 316ce7d6c6272e9953b181cf0f70687e6bfea8e2 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 11:28:45 -0400 Subject: [PATCH 05/15] Add mailer previews for CustomDeviseMailer, ResultsMailer, and TestMailer This commit introduces new preview classes for CustomDeviseMailer, ResultsMailer, and TestMailer, enhancing the ability to visualize email content during development. The CustomDeviseMailerPreview includes a method for previewing password change emails, while the ResultsMailerPreview provides a comprehensive setup for entry evaluation notifications with sample data. Additionally, a simple TestMailerPreview is added for testing purposes. These changes improve the development workflow by allowing developers to easily preview email templates and ensure proper formatting and content before sending. --- .../previews/custom_devise_mailer_preview.rb | 11 ++++ .../previews/results_mailer_preview.rb | 60 +++++++++++++++++++ test/mailers/previews/test_mailer_preview.rb | 5 ++ 3 files changed, 76 insertions(+) create mode 100644 test/mailers/previews/custom_devise_mailer_preview.rb create mode 100644 test/mailers/previews/results_mailer_preview.rb create mode 100644 test/mailers/previews/test_mailer_preview.rb diff --git a/test/mailers/previews/custom_devise_mailer_preview.rb b/test/mailers/previews/custom_devise_mailer_preview.rb new file mode 100644 index 00000000..1789ecc0 --- /dev/null +++ b/test/mailers/previews/custom_devise_mailer_preview.rb @@ -0,0 +1,11 @@ +class CustomDeviseMailerPreview < ActionMailer::Preview + def password_change + user = User.first || User.create!( + email: 'test@example.com', + password: 'password123', + first_name: 'Test', + last_name: 'User' + ) + CustomDeviseMailer.password_change(user) + end +end diff --git a/test/mailers/previews/results_mailer_preview.rb b/test/mailers/previews/results_mailer_preview.rb new file mode 100644 index 00000000..754c3da6 --- /dev/null +++ b/test/mailers/previews/results_mailer_preview.rb @@ -0,0 +1,60 @@ +class ResultsMailerPreview < ActionMailer::Preview + def entry_evaluation_notification + # Create sample data for preview + entry = Entry.first || create_sample_entry + round = JudgingRound.first || create_sample_round + + ResultsMailer.entry_evaluation_notification(entry, round) + end + + private + + def create_sample_entry + Entry.create!( + title: "Sample Entry", + profile: Profile.first || create_sample_profile, + contest_instance: ContestInstance.first || create_sample_contest_instance + ) + end + + def create_sample_profile + Profile.create!( + user: User.first || create_sample_user + ) + end + + def create_sample_user + User.create!( + email: "sample@example.com", + password: "password123", + first_name: "Sample", + last_name: "User" + ) + end + + def create_sample_contest_instance + ContestInstance.create!( + contest_description: ContestDescription.first || create_sample_contest_description + ) + end + + def create_sample_contest_description + ContestDescription.create!( + name: "Sample Contest", + container: Container.first || create_sample_container + ) + end + + def create_sample_container + Container.create!( + name: "Sample Container", + contact_email: "contests@example.com" + ) + end + + def create_sample_round + JudgingRound.create!( + name: "Sample Round" + ) + end +end diff --git a/test/mailers/previews/test_mailer_preview.rb b/test/mailers/previews/test_mailer_preview.rb new file mode 100644 index 00000000..f3d26401 --- /dev/null +++ b/test/mailers/previews/test_mailer_preview.rb @@ -0,0 +1,5 @@ +class TestMailerPreview < ActionMailer::Preview + def test_email + TestMailer.test_email('test@example.com') + end +end From 5fc78724e3f503e8a7174b128d8d30d7b92c6a13 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 11:29:10 -0400 Subject: [PATCH 06/15] Update entry evaluation notification email template for improved contact information display This commit modifies the entry evaluation notification email template by replacing the plain contact email with a mailto link, enhancing user experience. Additionally, the footer section has been removed to streamline the email content, focusing on essential information. These changes contribute to a cleaner and more user-friendly email communication. --- .../entry_evaluation_notification.html.erb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/views/results_mailer/entry_evaluation_notification.html.erb b/app/views/results_mailer/entry_evaluation_notification.html.erb index b7b7eaaa..c636964c 100644 --- a/app/views/results_mailer/entry_evaluation_notification.html.erb +++ b/app/views/results_mailer/entry_evaluation_notification.html.erb @@ -1,4 +1,4 @@ -
+

<%= @contest_description.name %>

@@ -62,11 +62,6 @@

We value your creativity and hope you found this competition to be a rewarding experience. Your participation contributes to the vibrant artistic and academic community at our university.

<% if @contact_email.present? %> -

If you have any questions about the judging process or results, please contact <%= @contact_email %>.

+

If you have any questions about the judging process or results, please contact <%= mail_to @contact_email, @contact_email %>.

<% end %> - -
From 478d16fbab6e55d7a4276ad28d74add568e0ec19 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:24:15 -0400 Subject: [PATCH 07/15] Update container detail view to clarify action label This commit modifies the action label in the container detail view from "Edit" to "Edit Collection" for improved clarity. This change enhances user understanding of the action being performed, contributing to a better user experience. --- app/views/containers/_container_detail.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/containers/_container_detail.html.erb b/app/views/containers/_container_detail.html.erb index 952d0387..5698d7c3 100644 --- a/app/views/containers/_container_detail.html.erb +++ b/app/views/containers/_container_detail.html.erb @@ -9,7 +9,7 @@
<%= link_to edit_container_path(@container), class: "btn btn-sm btn-outline-primary me-2" do %> - Edit + Edit Collection <% end %>
<% end %> From 54c130a5d8f06dd051b53506ff3178cee51480c4 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:24:45 -0400 Subject: [PATCH 08/15] Refactor contest descriptions table layout for improved action link presentation This commit updates the layout of the contest descriptions table by changing the action link container from a vertical to a horizontal flexbox arrangement. Additionally, it enhances the icon styling for better visual consistency. These changes aim to improve the user interface and overall usability of the action links within the table. --- app/views/containers/_contest_descriptions_table.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/containers/_contest_descriptions_table.html.erb b/app/views/containers/_contest_descriptions_table.html.erb index 8e93b434..69cb9ca0 100644 --- a/app/views/containers/_contest_descriptions_table.html.erb +++ b/app/views/containers/_contest_descriptions_table.html.erb @@ -28,14 +28,14 @@ <%= boolean_to_yes_no(description.active) %> -
+
<% contest_description_action_links(container, description).each do |action, config| %> <%= link_to config[:path], class: 'd-block', data: config[:data]&.merge('bs-toggle': 'tooltip'), title: config[:title], aria: { label: config[:title] } do %> - + <%= config[:title] %> <% end %> <% end %> From 4f34339856056a5aa5fe3aea41c5546136018078 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:24:53 -0400 Subject: [PATCH 09/15] Update permission section header in container detail view for improved hierarchy This commit changes the header for the "Add New Permission" section from an `

` to an `

` tag in the container detail view. This adjustment enhances the visual hierarchy of the page, contributing to a clearer and more organized user interface. --- app/views/containers/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/containers/show.html.erb b/app/views/containers/show.html.erb index 49c06f62..fc499a13 100644 --- a/app/views/containers/show.html.erb +++ b/app/views/containers/show.html.erb @@ -25,7 +25,7 @@ <%= render partial: "containers/assignments_table", locals: { container: @container, assignments: @assignments } %> <% end %> -

Add New Permission

+

Add New Permission

<%= turbo_frame_tag "new_assignment" do %> <%= render partial: 'containers/assignment_form', locals: { container: @container, assignment: @assignment } %> <% end %> From 44c989195f2a03834070944625c8aec55a6af3dd Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:25:00 -0400 Subject: [PATCH 10/15] Update judging results view for improved button styling and email count display This commit modifies the judging results partial by changing the button class to a more visually distinct outline style and updating the email count display to use the pluralization helper for better readability. These enhancements contribute to a more polished user interface and improved user experience. --- app/views/contest_instances/_judging_results.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/contest_instances/_judging_results.html.erb b/app/views/contest_instances/_judging_results.html.erb index 28331c5d..61d17f0e 100644 --- a/app/views/contest_instances/_judging_results.html.erb +++ b/app/views/contest_instances/_judging_results.html.erb @@ -15,9 +15,9 @@ @contest_instance, round_id: round.id ), - class: "btn btn-sm btn-info me-3", + class: "btn btn-sm btn-outline-primary me-3", disabled: !round.complete? do %> - + Email round <%= round.round_number %> results <% end %>
@@ -28,7 +28,7 @@ data-bs-placement="top" title="Number of times emails have been sent for this round"> - Emails sent: <%= round.emails_sent_count %> time<%= 's' if round.emails_sent_count > 1 %> + Emails sent: <%= pluralize(round.emails_sent_count, 'time') %> <% end %>
From 4ccd247d597d366900aea6ad29b1b5bd2f250dd1 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:25:07 -0400 Subject: [PATCH 11/15] Refactor contest instances index view for improved button styling and layout This commit updates the contest instances index view by enhancing button styles to use outline variants and adding icons for better visual clarity. The layout of action links is also adjusted from a vertical to a horizontal flexbox arrangement, contributing to a more polished and user-friendly interface. --- app/views/contest_instances/index.html.erb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/contest_instances/index.html.erb b/app/views/contest_instances/index.html.erb index 7cf60b20..274efe7b 100644 --- a/app/views/contest_instances/index.html.erb +++ b/app/views/contest_instances/index.html.erb @@ -27,8 +27,9 @@ <%= @contest_description.notes %>
- <%= link_to "Edit", edit_container_contest_description_path(@container, @contest_description), class: "btn btn-sm btn-primary" %> - <%= link_to "Archive", container_contest_description_path(@container, @contest_description), data: { controller: 'confirm', confirm_message_value: 'Are you sure you want to archive this?' } %> + <%= link_to edit_container_contest_description_path(@container, @contest_description), class: "btn btn-sm btn-outline-primary me-2" do %> + Edit Contest + <% end %>

<%= "#{pluralize(@contest_instances.count, "instance")} of this contest" %>

@@ -110,13 +111,13 @@ <%= contest_instance.require_campus_employment_info %> <%= contest_instance.require_finaid_info %> -
+
<%= link_to container_contest_description_contest_instance_path(@container, @contest_description, contest_instance), class: 'd-block', data: { 'bs-toggle': 'tooltip' }, title: 'View instance', aria: { label: 'View instance' } do %> - + View instance <% end %> <%= link_to edit_container_contest_description_contest_instance_path(@container, @contest_description, contest_instance), @@ -124,7 +125,7 @@ data: { 'bs-toggle': 'tooltip' }, title: 'Edit instance', aria: { label: 'Edit instance' } do %> - + Edit instance <% end %> From 6ac5a48c8f554643ac3bc0265fd91e67adbe0d94 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:25:15 -0400 Subject: [PATCH 12/15] Update edit button label in contest instance view for improved clarity This commit changes the label of the edit button in the contest instance view from "Edit" to "Edit Instance." This adjustment enhances user understanding of the action being performed, contributing to a better user experience. --- app/views/contest_instances/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/contest_instances/show.html.erb b/app/views/contest_instances/show.html.erb index 8c9b7879..de8302ea 100644 --- a/app/views/contest_instances/show.html.erb +++ b/app/views/contest_instances/show.html.erb @@ -21,7 +21,7 @@
<%= link_to edit_container_contest_description_contest_instance_path(@container, @contest_description, @contest_instance), class: "btn btn-sm btn-outline-primary me-2" do %> - Edit + Edit Instance <% end %>
<% end %> From cf9073d2d551092b8efe0dbb8c30d964112163ee Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Tue, 22 Apr 2025 16:53:30 -0400 Subject: [PATCH 13/15] Add judge interface information to comment requirements in edit and new views This commit introduces a new informational section in both the edit and new views for judging rounds. The section provides judges with guidance on comment interface behavior, including the conditions under which comment fields appear and details about real-time word count validation. These enhancements aim to improve user understanding and experience during the evaluation process. --- app/views/judging_rounds/edit.html.erb | 29 ++++++++++++++++++++++++++ app/views/judging_rounds/new.html.erb | 29 ++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/app/views/judging_rounds/edit.html.erb b/app/views/judging_rounds/edit.html.erb index 55c602d0..4bb71764 100644 --- a/app/views/judging_rounds/edit.html.erb +++ b/app/views/judging_rounds/edit.html.erb @@ -70,6 +70,35 @@

Comment Requirements

+
+
Judge Interface Information
+

The following settings determine what judges will see and be required to do when evaluating entries:

+
+ +
+
+
Comment Interface Behavior
+
    +
  • + + Comment fields appear when an entry is moved to the "Ranked Entries" column +
  • +
  • + + Real-time word count validation with visual feedback: +
      +
    • Red border - Below minimum word count
    • +
    • Green border - Minimum word count met or exceeded
    • +
    +
  • +
  • + + Note: The word count validation is advisory only - judges can still submit comments below the minimum +
  • +
+
+
+
diff --git a/app/views/judging_rounds/new.html.erb b/app/views/judging_rounds/new.html.erb index 94ec7136..51ef1363 100644 --- a/app/views/judging_rounds/new.html.erb +++ b/app/views/judging_rounds/new.html.erb @@ -52,6 +52,35 @@

Comment Requirements

+
+
Judge Interface Information
+

The following settings determine what judges will see and be required to do when evaluating entries:

+
+ +
+
+
Comment Interface Behavior
+
    +
  • + + Comment fields appear when an entry is moved to the "Ranked Entries" column +
  • +
  • + + Real-time word count validation with visual feedback: +
      +
    • Red border - Below minimum word count
    • +
    • Green border - Minimum word count met or exceeded
    • +
    +
  • +
  • + + Note: The word count validation is advisory only - judges can still submit comments below the minimum +
  • +
+
+
+
From 4236d571a5866222fc46ca7750ab5bc3d3118edb Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Mon, 28 Apr 2025 11:23:37 -0400 Subject: [PATCH 14/15] Refactor comment requirements section in edit and new views to use renderable content This commit removes static informational content about comment interface behavior from the edit and new views for judging rounds, replacing it with a dynamic rendering method. This change enhances maintainability and allows for easier updates to the content displayed to judges, improving the overall user experience during the evaluation process. --- app/views/judging_rounds/edit.html.erb | 28 +++----------------------- app/views/judging_rounds/new.html.erb | 28 +++----------------------- 2 files changed, 6 insertions(+), 50 deletions(-) diff --git a/app/views/judging_rounds/edit.html.erb b/app/views/judging_rounds/edit.html.erb index 4bb71764..89ba2331 100644 --- a/app/views/judging_rounds/edit.html.erb +++ b/app/views/judging_rounds/edit.html.erb @@ -70,35 +70,13 @@

Comment Requirements

-
-
Judge Interface Information
-

The following settings determine what judges will see and be required to do when evaluating entries:

-
-
-
Comment Interface Behavior
-
    -
  • - - Comment fields appear when an entry is moved to the "Ranked Entries" column -
  • -
  • - - Real-time word count validation with visual feedback: -
      -
    • Red border - Below minimum word count
    • -
    • Green border - Minimum word count met or exceeded
    • -
    -
  • -
  • - - Note: The word count validation is advisory only - judges can still submit comments below the minimum -
  • -
+ <% if (content = render_editable_content('judging_rounds', 'comment_interface_behavior')) %> + <%= content %> + <% end %>
-
diff --git a/app/views/judging_rounds/new.html.erb b/app/views/judging_rounds/new.html.erb index 51ef1363..3aa32f13 100644 --- a/app/views/judging_rounds/new.html.erb +++ b/app/views/judging_rounds/new.html.erb @@ -52,35 +52,13 @@

Comment Requirements

-
-
Judge Interface Information
-

The following settings determine what judges will see and be required to do when evaluating entries:

-
-
-
Comment Interface Behavior
-
    -
  • - - Comment fields appear when an entry is moved to the "Ranked Entries" column -
  • -
  • - - Real-time word count validation with visual feedback: -
      -
    • Red border - Below minimum word count
    • -
    • Green border - Minimum word count met or exceeded
    • -
    -
  • -
  • - - Note: The word count validation is advisory only - judges can still submit comments below the minimum -
  • -
+ <% if (content = render_editable_content('judging_rounds', 'comment_interface_behavior')) %> + <%= content %> + <% end %>
-
From 992fdcd98f6220bd4379283409b9bb9b4219fd98 Mon Sep 17 00:00:00 2001 From: rsmokeUM Date: Mon, 28 Apr 2025 11:23:43 -0400 Subject: [PATCH 15/15] Add instructions for comment interface behavior in seed data This commit enhances the seed data by adding instructions for the comment interface behavior in the judging rounds section. This update aims to provide clearer guidance for users, improving the overall experience during the evaluation process. --- db/seeds.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index 9c189f99..4cd72164 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -61,7 +61,9 @@ { page: "round_judge_assignments", section: "instructions", content: ActionText::RichText.new(body: "Instructions for the round_judge_assignments") }, { page: "judging_assignments", section: "round_specific_instructions", - content: ActionText::RichText.new(body: "Instructions for the round_specific_instructions") } + content: ActionText::RichText.new(body: "Instructions for the round_specific_instructions") }, + { page: "judging_rounds", section: "comment_interface_behavior", + content: ActionText::RichText.new(body: "Instructions for the comment_interface_behavior") } ]) # Seed data for School