-
Notifications
You must be signed in to change notification settings - Fork 147
fix: broken user links #1268
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
fix: broken user links #1268
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1268 +/- ##
=======================================
Coverage 83.36% 83.36%
=======================================
Files 70 70
Lines 3005 3005
Branches 499 499
=======================================
Hits 2505 2505
Misses 397 397
Partials 103 103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@andypols I fixed up some remaining user links, should be good to merge after a final check on your side! |
jescalada
left a comment
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.
LGTM after my fixes are reviewed!
I replaced the a tags in the AttestationView component to use UserLinks instead, and also adjusted a link on UserList which used the old format.
I'll be adding dynamic URLs for uiRouteAuth-defined admin routes down the line.
|
@jescalada Nice one. LGTM |
Summary
This PR addresses #1264, fixing broken user profile links and improving maintainability by centralising user navigation into a reusable component.
Problem:
User profile links across the application were pointing to
/dashboard/user/:id, while the actual route was configured as/dashboard/admin/user/:id. This mismatch caused broken navigation in the Reviewers, Contributors, and Push Details sections.Additionally, using the
/dashboard/admin/user/:idroute prevented non-admin users from accessing these links due touiRouteAuthrestrictions.Solution
/dashboard/admin/user/:idto/dashboard/user/:idto align with existing usage.Linkfor client-side navigation, eliminating full page reloads and improving user experience.RepoDetailsandPushDetailswith the newUserLinkcomponent, ensuring future route changes require updates in only one place.The
UserLinkcomponent supports both simple usage (<UserLink username={user} />) and custom children for wrapping images or displaying alternate text.