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: Get LEVEL Creation to work #78

Merged
merged 17 commits into from
May 15, 2024
Merged

Conversation

manish-singh-bisht
Copy link
Contributor

@manish-singh-bisht manish-singh-bisht commented Apr 20, 2024

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?

  • Test A
  • Test B

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at oss.gg
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary

Copy link

vercel bot commented Apr 20, 2024

@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.

Copy link

github-actions bot commented Apr 20, 2024

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

@manish-singh-bisht manish-singh-bisht marked this pull request as draft April 20, 2024 21:28
@manish-singh-bisht manish-singh-bisht changed the title feat: Get LEVEL Creation to work #72 feat: Get LEVEL Creation to work Apr 20, 2024
@manish-singh-bisht manish-singh-bisht marked this pull request as ready for review May 2, 2024 08:25
@jobenjada
Copy link
Member

jobenjada commented May 8, 2024

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
Copy link
Contributor Author

@jobenjada ready for review.

have added video in the description

@jobenjada
Copy link
Member

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 jobenjada added this pull request to the merge queue May 15, 2024
Merged via the queue into formbricks:main with commit 4df6031 May 15, 2024
2 of 3 checks passed
@jobenjada
Copy link
Member

/award 500

Copy link

oss-gg bot commented May 15, 2024

Awarding manish-singh-bisht: 500 points!

jobenjada added a commit that referenced this pull request May 17, 2024
jobenjada added a commit that referenced this pull request May 17, 2024
jobenjada added a commit that referenced this pull request May 17, 2024
* services,action,zod,level form,(not image)

* corrected the replace button bug

* correct the button variant, input is not changing

* changed to arrow fxns

* corrected the space

* corrected the spacing

* take 1- changed the update handlers in frontend only

* image needs to be provided, removed the image fallback

* changed the name environmentId to repositoryId, things may break(hope i am wrong here)

* added delete from s3 functionality when delete level happens

* feat:core functionality+visibility of levels

* fix:now players with higher levels can take on task of lower levels

* chore: shifted the sorting to the util function

* fix:shows all tags from lower levels as well

* fix:corrected the key

* levels tweaks

---------

Co-authored-by: Johannes <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request May 17, 2024
* feat: Get LEVEL Creation to work  (#78)

* services,action,zod,level form,(not image)

* corrected the replace button bug

* correct the button variant, input is not changing

* changed to arrow fxns

* corrected the space

* corrected the spacing

* take 1- changed the update handlers in frontend only

* image needs to be provided, removed the image fallback

* changed the name environmentId to repositoryId, things may break(hope i am wrong here)

* added delete from s3 functionality when delete level happens

* feat:core functionality+visibility of levels

* fix:now players with higher levels can take on task of lower levels

* chore: shifted the sorting to the util function

* fix:shows all tags from lower levels as well

* fix:corrected the key

* levels tweaks

---------

Co-authored-by: Johannes <[email protected]>

* solve build errors

---------

Co-authored-by: Manish Singh Bisht <[email protected]>
@jobenjada jobenjada mentioned this pull request May 18, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Get LEVEL Creation to work
2 participants