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

Display Review Score on User Profiles #167

Merged
merged 11 commits into from
Nov 21, 2024

Conversation

GODrums
Copy link
Collaborator

@GODrums GODrums commented Nov 18, 2024

Motivation

To provide a better insight into the score calculation, we want to display the score of individual reviews on a user's profile.
Solves task 2 of #159.

Description

This PR adapts the scoring logic:

  • Refactor scoring into a ScoringService
  • Support for evaluating scores for single PullRequestReview or IssueComment entities
  • Display the score of single reviews on user profiles

Tasks

  • Extract the scoring logic
    • Create new ScoringService
    • Add scoring method for PullRequestReview
    • Add scoring method for IssueComment
      • To solve: when no PR is available
    • Use ScoringService in LeaderboardService
  • Score element in ReviewActivityCard
    • Design with Storybook
    • Add score to DTO
    • Implement logic in Angular
  • Calculate scorefor profile data

Testing Instructions

TODO

Screenshots (if applicable)

image
image

Checklist

General

  • PR title is clear and descriptive
  • PR description explains the purpose and changes
  • Code follows project coding standards
  • Self-review of the code has been done
  • Changes have been tested locally
  • Screenshots have been attached (if applicable)
  • Documentation has been updated (if applicable)

Client (if applicable)

  • UI changes look good on all screen sizes and browsers
  • No console errors or warnings
  • User experience and accessibility have been tested
  • Added Storybook stories for new components
  • Components follow design system guidelines (if applicable)

Server (if applicable)

  • Code is performant and follows best practices
  • No security vulnerabilities introduced
  • Proper error handling has been implemented
  • Added tests for new functionality
  • Changes have been tested in different environments (if applicable)

@GODrums GODrums added enhancement New feature or request client application-server needs work PRs that need more work labels Nov 18, 2024
@GODrums GODrums self-assigned this Nov 18, 2024
@github-actions github-actions bot added feature size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 18, 2024
@GODrums GODrums marked this pull request as ready for review November 20, 2024 21:38
Copy link
Collaborator

@FelixTJDietrich FelixTJDietrich left a comment

Choose a reason for hiding this comment

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

I have a few minor remarks. Regarding the static ScoringService idk if this will be problematic. I understand why you did it but maybe this is where we'd need a DTO conversion service so we can dependency inject the service 🤔

Copy link
Collaborator

@FelixTJDietrich FelixTJDietrich left a comment

Choose a reason for hiding this comment

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

Code looks good to me now, thanks for implementing the requested changes so quickly!

It also looks really good, I really like this addition 😄

@FelixTJDietrich FelixTJDietrich merged commit f95852c into develop Nov 21, 2024
6 of 7 checks passed
@FelixTJDietrich FelixTJDietrich deleted the feature/#159-review-score-on-profile branch November 21, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-server client enhancement New feature or request feature needs work PRs that need more work size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants