ContriHUB / ContriHUB-24

ContriHub is an event under Avishkar-24 where we are expecting to get more and more people involved in Open Source activities.
https://sac.mnnit.ac.in/contrihub
MIT License
4 stars 26 forks source link

Implement feature where User can see how many Issues they have solved Level Wise #169

Closed meisabhishekpatel closed 2 weeks ago

meisabhishekpatel commented 4 weeks ago

Feature Request: Display Level-Wise Issues Solved by User on User's Profile

Description:

We want to implement a feature where users can view the number of issues they have solved, categorized by difficulty level. This should be similar to how LeetCode displays problems as Easy, Medium, and Hard, with counts for each.

Acceptance Criteria:

UI Requirements:

VishalMinj commented 3 weeks ago

Hello @meisabhishekpatel , I'd like to study your repo & build a solution around this issue. Can you please suggest which specific file/directory do I need to go through also how's it tracking the PR's the of the participants?

meisabhishekpatel commented 3 weeks ago

@VishalMinj for working on this issue you need to request through contrihub website

wenayy commented 3 weeks ago

i am not able to understand properly the code base like could you please help how should i do it it's a lot of .py file i am not able to comprehend i got that frontend thing but the functionality is all verbose to me

meisabhishekpatel commented 3 weeks ago

@wenayy if you didn't knew anything about the tech stack why did you straight away jumped into solving the issue

meisabhishekpatel commented 3 weeks ago

I can explain you some part of codebase which you are having any doubt with but if you don't know a tech stack then how can I explain you the whole tech stack

wenayy commented 3 weeks ago

the issue was simple but a lot of .py file overwhelmed me but in open source you need not know the stack fully you learn eventually by learnnign and open source is all about helping too for enriching the community and what is the tech stack can you tell of this codebase a lot of .py files it was very new to me so initally i got stuck

meisabhishekpatel commented 3 weeks ago

@wenayy i know that, but you should atleast know in what you are getting your hands into, Btw its Django with MySQL as database

VishalMinj commented 3 weeks ago

Please assign me this issue @meisabhishekpatel

meisabhishekpatel commented 3 weeks ago

@VishalMinj did you request through contrihub website ?

VishalMinj commented 3 weeks ago

Yes!

VishalMinj commented 3 weeks ago

hey @meisabhishekpatel what CSS lib. have you used in here?

meisabhishekpatel commented 3 weeks ago

@VishalMinj well it's mostly bootstrap only you see all the cdn link here https://github.com/ContriHUB/ContriHUB-24/blob/main/home/templates/base.html

VishalMinj commented 3 weeks ago

ok, I have one more doubt? are the tag info stored some where in the db or we need to get it through github?

VishalMinj commented 3 weeks ago

hey @meisabhishekpatel
I've kinda came up with a solution, please clear up my query so I can test out. I've created a new table to hold all the level info and setup a one to one relation with the user. I need to know if there is a html doc for the project author to accept or reject the pr or is it all through email?

meisabhishekpatel commented 3 weeks ago

@VishalMinj i don't fully understand what you are trying to ask but but yes we don't a html page fully, rather that card is an component of user profile page you can see that in userprofile/templates folder, for accepting the PR we have a route which can be hit by mentor to accept the request and an email will be sent to the other user

Also about the table creation it's fine to create a dedicated table for holding information but you, it would be much better if you will solve this issue without explicit creation because you will be storing redundant information.

VishalMinj commented 2 weeks ago

Thanks for responding @meisabhishekpatel , I Just noticed that once the pr is accepted and verified the contributor can check it from the pr's submit section. Just tell me this what kind of linkage is established between the accepted pr and the contributer?

I can use that info, iterate over it and populate the card on the profile. Btw here's the design I came up with image

meisabhishekpatel commented 2 weeks ago

@VishalMinj

you can see this https://github.com/ContriHUB/ContriHUB-24/blob/main/home/views.py for reference line number 275

VishalMinj commented 2 weeks ago

I think I'm done now! My solution to filter issue from Pullrequest is working, for the most part. The email service was not working so I did manual transection and pr acceptance from admin. And it worked as soon as i accepted the pr status.

image

If you will allow then i'd like to make pr. The only problem is, that i'm not assigned from contrihub website so how will i make the pr request over there?

meisabhishekpatel commented 2 weeks ago

, for the most part.

what do you mean by this.

The email service was not working so I did manual transection

why ??

VishalMinj commented 2 weeks ago

What i mean is i haven't tried it via email acceptance. That's how it works right? By sending email to the auther and then he accepts or reviews.

Well i tried my best to set up the email config. But it was throwing some error regarding thread. So I did the issue assignment and Pr acceptance from.the admin panel

meisabhishekpatel commented 2 weeks ago

@VishalMinj what's the error exactly this might break things so you need to test that and then make PR

VishalMinj commented 2 weeks ago

Well, Here's the error. Occurs when I try to access any of mail functionality from helper.py

image

Probably coming from somewhere around here

image

As far as thing go on breaking I haven't touched much only added an objects query in the profile view and the card component. Not a bother for me to test out data flow with email but idk how to config the email set up properly. I've done what was mentioned in the README like adding host user and password. I don't know what to do beyond that

meisabhishekpatel commented 2 weeks ago

@VishalMinj did you properly setup the env ?

meisabhishekpatel commented 2 weeks ago

Also show me complete error, also what are you filling in env to setup email service

VishalMinj commented 2 weeks ago

this is the full error

image

this is what I set up in env

image

this was the response on frontend

image

VishalMinj commented 2 weeks ago

Was there a need to give an email id while creating a super user?

meisabhishekpatel commented 2 weeks ago

no, you can use any temp mail for creating a super user

meisabhishekpatel commented 2 weeks ago

@VishalMinj are you using this on college proxy or not ?

VishalMinj commented 2 weeks ago

No, i shifted to cellular while testing

VishalMinj commented 2 weeks ago

hey @meisabhishekpatel, I manage to receive the email

image

Apparently this exception disappeared after I upgraded my django version. Now, how to accept the assignment request ?

meisabhishekpatel commented 2 weeks ago

You have to go to maintainers userprofile to accept

VishalMinj commented 2 weeks ago

I'M GLAD TO SHARE IT'S WORKING 😭 image

meisabhishekpatel commented 2 weeks ago

Ok I'll review it can you send PR through contriHUB website

VishalMinj commented 2 weeks ago

Done

meisabhishekpatel commented 2 weeks ago

@VishalMinj solve for very-easy tag as well

meisabhishekpatel commented 2 weeks ago

@VishalMinj create a new PR with requested changes and tag this issue as well in the PR

VishalMinj commented 2 weeks ago

hey I've added the very-easy issue list. Couldn't do much with ui, using external styling library is my weakness. Here's the preview, I'm making the pr image

meisabhishekpatel commented 2 weeks ago

@VishalMinj maintain consistency (very-easy Prob -> very-easy issue)

meisabhishekpatel commented 2 weeks ago

@VishalMinj also create a PR request