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

feat: Add PeerReviewer model for improved peer review support #748

Merged
merged 28 commits into from
Oct 29, 2024

Conversation

Karthik99999
Copy link
Contributor

see comses/planning#256

This PR currently does not include the functionality of users being able to request to become peer reviewers.

Copy link
Contributor

@sgfost sgfost left a comment

Choose a reason for hiding this comment

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

Thanks Karthik, all of the basic functionality seems to be working. See the inline comments for remaining stuff

django/library/views.py Outdated Show resolved Hide resolved
django/library/views.py Show resolved Hide resolved
django/library/views.py Outdated Show resolved Hide resolved
frontend/src/components/ReviewerAddModal.vue Outdated Show resolved Hide resolved
frontend/src/components/ReviewersPage.vue Outdated Show resolved Hide resolved
frontend/src/components/ReviewersPage.vue Show resolved Hide resolved
frontend/src/components/ReviewersPage.vue Outdated Show resolved Hide resolved
django/library/views.py Outdated Show resolved Hide resolved
@Karthik99999 Karthik99999 force-pushed the peer-reviewers branch 2 times, most recently from 66b67b1 to b20b9a8 Compare August 8, 2024 19:37
@sgfost sgfost mentioned this pull request Aug 16, 2024
sgfost and others added 18 commits September 30, 2024 11:22
Co-authored-by: Karthik Bandagonda <Karthik99999@users.noreply.github.com>
Co-authored-by: sgfost <sgfost@users.noreply.github.com>
- use get_or_create to update a reviewer when trying to create
  while one already exists

- allow users to create or update their own reviewer record. this allows
  anyone to insert themselves into the reviewer pool at any time, should
  consider whether this is desirable or we should add a pending status

Co-authored-by: Karthik Bandagonda <Karthik99999@users.noreply.github.com>
This prevents the reviewer object on the parent component from being mutated before the form is submitted
@alee alee marked this pull request as ready for review October 10, 2024 22:33
Copy link
Contributor

@sgfost sgfost left a comment

Choose a reason for hiding this comment

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

Nice job, everything seems to work well, besides a small issue with the reviewers data migration. I have a comment below about this along with a few other things

django/library/views.py Outdated Show resolved Hide resolved
frontend/src/components/ReviewersListSidebar.vue Outdated Show resolved Hide resolved
const { updateReviewer: update } = useReviewEditorAPI();

async function changeActiveState(reviewer: Reviewer, isActive: boolean) {
// FIXME: Make server accept partial reviewer object without defining memberProfileId
Copy link
Contributor

Choose a reason for hiding this comment

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

does this still need to happen?

frontend/src/components/ReviewerEditForm.vue Outdated Show resolved Hide resolved
django/library/migrations/0030_peerreviewinvitation.py Outdated Show resolved Hide resolved
frontend/src/components/ReviewerCard.vue Outdated Show resolved Hide resolved
permission class was not set up properly, now correctly drops through
to has_object_permission for retrieve, update, etc.

* add a profile link to reviewer card
@sgfost
Copy link
Contributor

sgfost commented Oct 28, 2024

The pagination issue and not being able to retrieve/update your own reviewer record on an unprivileged account are fixed and on staging

provide string representation of PeerReviewer
Copy link
Member

@alee alee left a comment

Choose a reason for hiding this comment

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

Thanks Karthik & Scott! LGTM with some minor comments

django/library/models.py Show resolved Hide resolved
frontend/src/components/form/TextListField.vue Outdated Show resolved Hide resolved
@sgfost
Copy link
Contributor

sgfost commented Oct 29, 2024

I'll fix these up to get it moving. There's also a small oversight in the browser tests with dates which is causing that to fail today

@alee
Copy link
Member

alee commented Oct 29, 2024

thanks @sgfost ! I was wondering about the e2e tests referring to dates with scalar integers,

"application-deadline": "29"

@sgfost
Copy link
Contributor

sgfost commented Oct 29, 2024

the least fragile way I can think of doing it (i.e. not relying on this specific datepicker too much) is to keep the scalar day-of-the-month input but always using the following month. It'd probably be ideal if there was a way to input a string date with the keyboard but I'll just fix the test for now rather than hack at the datepicker

* order peer review invitations by date sent (most recent first)
* fix an issue with invalid dates in the e2e tests
@alee alee merged commit 9af90c9 into comses:main Oct 29, 2024
7 checks passed
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.

3 participants