Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[200] Build Manage Evaluators List #243

Merged
merged 56 commits into from
Nov 20, 2024
Merged

[200] Build Manage Evaluators List #243

merged 56 commits into from
Nov 20, 2024

Conversation

emmabjj
Copy link
Contributor

@emmabjj emmabjj commented Oct 29, 2024

#200 - Build Manage Evaluators List
#112 - Delete Evaluators
#74 - Enter Evaluators

Build the frontend for the manage evaluators list and the functionality.
This allows a challenge manager to add an existing evaluator to a specific challenge/phase, invite a new evaluator, delete an evaluator or an invitation, resend an invitation to a pending evaluator, or resend an invitation if the challenge manager tries to add an existing evaluator invitation again.

Added tests to cover changes.

Add/delete/resend functionality

manage_evaluators

Build Manage Evaluator List, form, and delete modal

Screenshot 2024-10-29 at 11 07 18 AM Screenshot 2024-10-29 at 11 07 32 AM Screenshot 2024-10-29 at 11 07 40 AM Screenshot 2024-10-29 at 11 07 50 AM

Update header and challenge status

Screenshot 2024-10-29 at 11 02 24 AM

WAVE

Screenshot 2024-10-29 at 11 08 11 AM Screenshot 2024-10-29 at 11 08 32 AM

Form fields are required to add evaluator

Screenshot 2024-10-29 at 11 42 34 AM

Using evaluator_submission_assignments for evaluator submission count

Screenshot 2024-10-29 at 11 17 03 AM

Mobile

Screenshot 2024-10-29 at 11 52 53 AM Screenshot 2024-10-29 at 11 53 05 AM Screenshot 2024-10-29 at 1 28 09 PM

@emmabjj emmabjj requested a review from stepchud October 29, 2024 17:00
@emmabjj emmabjj self-assigned this Oct 29, 2024
@r-bartlett-gsa r-bartlett-gsa added this to the Sprint 11/05/24 milestone Oct 29, 2024
@emmabjj emmabjj changed the title [200 & 112] Build Manage Evaluators List [200] Build Manage Evaluators List Oct 29, 2024
.circleci/config.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some feedback, I will finish up the review after that's resolved

config/routes.rb Outdated Show resolved Hide resolved
config/routes.rb Outdated Show resolved Hide resolved
app/assets/stylesheets/application.sass.scss Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/controllers/manage_evaluators_controller.rb Outdated Show resolved Hide resolved
app/javascript/delete_evaluator_modal.js Outdated Show resolved Hide resolved
@emmabjj emmabjj requested a review from stepchud November 1, 2024 20:57
@emmabjj emmabjj requested a review from stepchud November 13, 2024 15:44
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to make some code suggestions on the PR but it's a little more extensive than I thought and will be easier to create a separate PR that you can review and merge into this one if it makes sense. Trying to make these routes a bit more RESTful.

Comment on lines 34 to 37
def set_phase
phase_id = params.dig(:evaluator_invitation, :phase_id) || params[:phase_id]
@phase = phase_id ? @challenge.phases.find(phase_id) : @challenge.phases.order(:start_date).first
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this before_action is overloaded with several routes and conditionals. I'm not sure how each route will work. before_actions should be simple logic and either check for error conditions in the request or load data in a predictable way, if they're used at all. I'm not sure what kinds of bugs might be caused by an incorrect param. why does it default to the first phase by start_date? which route(s) does that apply to? it gets pretty confusing.

@emmabjj emmabjj requested a review from stepchud November 19, 2024 18:05
Comment on lines 67 to 69
this.modalDescriptionTarget.textContent = 'Deleting an evaluator from the challenge will remove the evaluator from any submissions of this ' +
'challenge that the evaluator is assigned to. It will also delete any of their completed or in progress evaluations for those submissions.'
this.confirmButtonTarget.textContent = 'Yes'
Copy link
Contributor

@stepchud stepchud Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this textContent is being reset, does it ever change?

Copy link
Contributor

@stepchud stepchud Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested deleting the resetModal()function and it seems fine without it, let's remove it for now along with those targets on the divs

@@ -1,5 +1,7 @@
# frozen_string_literal: true

require_relative '../services/evaluator_management_service'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this line needed? I was under the impression that Rails handles requiring all the code under app/?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still works without it 👍

def eligible_for_evaluation?(submission)
submission.judging_status.in?(%w[selected winner])
end

def selected_to_advance?(submission)
submission.judging_status.in?(%w[winner])
end

def phase_has_recused_evaluator?(phase)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this already existed on the PhasesHelper so I removed it here

@stepchud stepchud force-pushed the 200_manage_evaluators_list branch from 0b1c5f0 to e41dd2b Compare November 19, 2024 23:55
Copy link
Contributor

@stepchud stepchud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it! :shipit:
I made a few minor tweaks just to wrap up some loose ends. Nice work! 👏

@emmabjj emmabjj merged commit 65f6437 into dev Nov 20, 2024
11 checks passed
@emmabjj emmabjj deleted the 200_manage_evaluators_list branch November 20, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enter Evaluators Build Manage Evaluators list page Delete Evaluators
3 participants