developmentseed / developmentseed/osm-teams
Assign badge in modal
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The current page approach for badges results in a number of potential concerns/bugs:
- I can visit the URL `/organizations/:id/badges/assign/:userid` with any values for :userid, even if the userid is not a part of the org, and no error is thrown. The page renders as expected and my only indication that something is wrong is if I try to assign the badge to a user who is not part of the org - then a toast is displayed
- I can visit the URL `/organizations/:id/badges/assign/:userid` with any values for :orgid, even if I am not a member of the org or if the org does not exist. No badges display, but no error is thrown until I try to assign a badge
- Now that #415 enables assigning badges from the team page, there is no easy way to click "assign badge" on the team and then navigate back to that team - the badge assignment page redirects to the org. While getting the location history from the router is possible, this seems like a more brittle solution
Assigning a badge in a modal would be a more straightforward way to approach this. The individual badge page at `/organizations/:orgid/badges/:badgeid` and badge-user-assignment page at `/organizations/:orgid/badges/:badgeid/assign/:userid` are both likely still necessary and useful; the badgeless assignment page at `/organizations/:id/badges/assign/:userid` is the one that seems most helpfully replaced by a modal.
Page refresh actions would be necessary, but this would seem to also help pave the way to team badges for teams which are not part of an organization.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the badgeless assignment route `/organizations/:id/badges/assign/:userid` and the team-page assign-badge flow, then compare them with the existing badge and badge-user-assignment routes. The issue describes replacing that route with a modal while retaining the other pages, preserving team navigation, and refreshing the relevant page after assignment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100