formbricks / oss.gg

Gamify Open Source Contributions
https://oss.gg
MIT License
29 stars 18 forks source link

feat: Get LEVEL Creation to work #78

Closed manish-singh-bisht closed 1 month ago

manish-singh-bisht commented 2 months ago

What does this PR do?

fixes: #72

video1: showing visibility of levels Screencast from 15-05-24 02:25:33 AM IST.webm

video2: showing functionality
Screencast from 15-05-24 02:16:23 AM IST.webm

How should this be tested?

Checklist

Required

Appreciated

vercel[bot] commented 2 months ago

@manish-singh-bisht is attempting to deploy a commit to the formbricks Team on Vercel.

A member of the Team first needs to authorize it.

github-actions[bot] commented 2 months ago

Thank you for following the naming conventions for pull request titles! 🙏

jobenjada commented 2 months ago

Hey @manish-singh-bisht

Thanks a lot for shipping this and sorry for the delayed review.

Most of the comments are related to the levels not being visible to the users. Pls recall that the levels are derived from the current points a user has. This should make it fairly easy to display both the current score and corresponding level / progress bar.

Please make sure to build reusable components to which you can pass the levels object and the current point score. The component then decides what to display to each user. Does that make sense?

Here the different views we need to see levels:


  1. Add Level info to dashboard

from

image

to

image

See here

https://www.figma.com/file/usCYaOpv13zMpvjEVc5z0Z/oss.gg-web-app?type=design&node-id=1%3A208&mode=design&t=VtKKdyMS1yAZfiJu-1


  1. Add levels tabs and infos to the repository detail page:
image

https://www.figma.com/file/usCYaOpv13zMpvjEVc5z0Z/oss.gg-web-app?type=design&node-id=6%3A673&mode=design&t=VtKKdyMS1yAZfiJu-1


  1. Add levels info to the Leaderboard

If a repository has levels, we should display them in the leaderboard.

image

If there is no user yet in a specific level, display a placeholder text:

"No player levelled up here yet. Who's gonna be the first?"


  1. Open issues list: Add level info

We already pull all the labels from the issues. Find a good approach to compare the attached labels of issues with the label settings of all the levels a repository has. For each issue, display the badges of the levels which are eligible to work on this issue:

image image

While your own the issue component anyways, please update the styling to match the Figma layout.


  1. On the public profile page

Display the corresponding level emblem with the repo logo (in small) underneath the image:

image image

The above are the changes we need to make transparent who is on which level. Let's now get to the core functionality of levels: Giving specific players the right to work on some issues other dont.

The key for this lays in these settings:

image

For this first scope, we'll focus on this:

image

How is this supposed to work?

In this setting the maintainers can decide which level can work on issues with a specific label. For example this is level 1:

image

Now a player wants to work on an issue because it is labeled as oss.gg. They try to /assign it and then our app checks if this player with their current level is allowed to work on the issue. It checks the labels and sees that the issue does not have the "beginner". Instead of assigning the user, it shows this message:

"With your current level, you are not yet able to work on this issue."

This allows maintainers to restrict issues to maintainers who are up for the challenge.

manish-singh-bisht commented 1 month ago

@jobenjada ready for review.

have added video in the description

jobenjada commented 1 month ago

Hey @manish-singh-bisht

thanks a lot for following up, this looks really good :)

Noticed one thing:

  1. When you want to create a new level and hit "Save" without having added an image, it removes the form incl. all inputs. Instead, just highlight the field upload field with a red border and keep all values in the form :)

I'll go ahead and merge this regardless, as its a minor tweak which shouldn't block us :)

jobenjada commented 1 month ago

/award 500

oss-gg[bot] commented 1 month ago

Awarding manish-singh-bisht: 500 points!