-
-
Notifications
You must be signed in to change notification settings - Fork 250
Task/badge implementation in frontend #2273
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
Merged
arkid15r
merged 43 commits into
OWASP:main
from
Piyushrathoree:task/badge-implementation-in-frontend
Oct 13, 2025
Merged
Changes from 14 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
6f9482e
created some initial file and add some changes
Piyushrathoree 2289fdd
Add Badge functionality to UserNode and integrate Badges component
Piyushrathoree 5b947da
updated the backend file for sorting badges
Piyushrathoree f22d2e0
Refactor tests and mock data for badges functionality
Piyushrathoree e78e42a
Update frontend/__tests__/unit/components/Badges.test.tsx
Piyushrathoree dcb90b7
Update frontend/src/components/Badges.tsx
Piyushrathoree 7f270cf
Update frontend/__tests__/unit/pages/UserDetails.test.tsx
Piyushrathoree 4fdca0f
Add Font Awesome icons to custom dictionary
Piyushrathoree e402712
Make Badge properties readonly
Piyushrathoree 21d6803
Sort badges by weight before rendering
Piyushrathoree 3e85e89
Use nullish coalescing for user badges
Piyushrathoree a38e89d
Add aria-label to FontAwesomeIcon for accessibility
Piyushrathoree 984da0d
Update user.py
Piyushrathoree f3f2290
Merge branch 'main' into task/badge-implementation-in-frontend
Piyushrathoree 39a7a8c
Refactor badge count resolver for improved readability and performanc…
Piyushrathoree 8e76f8f
Update backend/apps/github/api/internal/nodes/user.py
Piyushrathoree 81b21d9
Update frontend/src/components/Badges.tsx
Piyushrathoree 8e846f3
Update frontend/src/components/Badges.tsx
Piyushrathoree 3cb9785
Add badgeCount field to UserNode and update related queries; refactor…
Piyushrathoree 1121d26
frontend: fix Badges non-prefixed and invalid cssClass handling; adju…
Piyushrathoree d32c6bf
Merge branch 'main' into task/badge-implementation-in-frontend
Piyushrathoree 1b445b0
fix: correct badge relationship reference in UserNode and update tests
263d53f
refactor: streamline badge display in UserDetailsPage component
Piyushrathoree f429bbf
fix: update useParams to use memberKey in UserDetailsPage and adjust …
Piyushrathoree 5c69863
fix: adjust class names for better layout consistency in UserDetailsPage
Piyushrathoree cc30ab4
Merge branch 'main' into task/badge-implementation-in-frontend
kasya f9e044d
Revert "fix: adjust class names for better layout consistency in User…
0e9dede
Merge branch 'task/badge-implementation-in-frontend' of https://githu…
Piyushrathoree f429071
Refactor UserNode badge logic and improve Badge component rendering
Piyushrathoree ac27f26
done with changes suggested by kate .
Piyushrathoree 7535bc9
Update frontend/src/components/Badges.tsx
Piyushrathoree fb1e403
CodeRabbit: For Font Awesome icons, the CSS classes are backend-drive…
Piyushrathoree 05a694c
Merge branch 'main' into task/badge-implementation-in-frontend
Piyushrathoree f39dec0
migration
Piyushrathoree 878059d
Update migration timestamp, enhance badge component, and import icon …
Piyushrathoree 6e1bbe7
Refactor badge class key from 'bug_slash' to 'bugSlash' for consistency
Piyushrathoree 848ae72
Fix issues with badges
kasya 995f67a
Merge branch 'main' of github.com:OWASP/Nest into pr/Piyushrathoree/2273
kasya 142786e
Fix make check
kasya 2078a70
Guard against null/undefined cssClass in normalizeCssClass
kasya 84498fc
Add test to verify badge rendering order per backend contract
kasya bf7e112
Fix backend test for getting users
kasya 6c2a612
Update code
arkid15r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,18 @@ | ||
| """GraphQL node for Badge model.""" | ||
|
|
||
| import strawberry | ||
| import strawberry_django | ||
| from apps.nest.models import Badge | ||
|
|
||
| from apps.nest.models.badge import Badge | ||
|
|
||
|
|
||
| @strawberry_django.type( | ||
| Badge, | ||
| fields=[ | ||
| "css_class", | ||
| "description", | ||
| "id", | ||
| "name", | ||
| "description", | ||
| "weight", | ||
| "css_class", | ||
| ], | ||
| ) | ||
| class BadgeNode(strawberry.relay.Node): | ||
| class BadgeNode: | ||
| """GraphQL node for Badge model.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it , fixed them