Enhance mentorship UI with breadcrumb improvements and issues link#3632
Enhance mentorship UI with breadcrumb improvements and issues link#3632kasya merged 6 commits intoOWASP:mainfrom
Conversation
Summary by CodeRabbit
WalkthroughThe breadcrumb navigation hook was updated to hide additional path segments ('mentees', 'modules', 'programs') alongside the existing 'repositories' segment. This prevents these segments from being rendered as clickable links in breadcrumb navigation, addressing broken routes that lack corresponding page implementations. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@frontend/src/components/CardDetailsPage.tsx`:
- Around line 361-369: The link inside CardDetailsPage (within the SecondaryCard
for "Issues") uses an accessibility-poor combination: the Link element's
className currently sets bg-gray-200 with text-white; update the styling on that
Link (or its enclosing SecondaryCard if shared) to use a higher-contrast
combination — e.g., a darker background (replace bg-gray-200 with a darker
gray/blue) or darker text (use text-gray-900 or similar) and ensure hover styles
remain appropriate; update the Link className and any dark-mode classes
accordingly so the anchor meets contrast requirements while preserving existing
hover/underline behavior.
🧹 Nitpick comments (1)
frontend/src/hooks/useBreadcrumbs.ts (1)
8-33: Scoping hidden segments is a reasonable defensive practice, but not currently required.
Line 8 hidesprogramsandmenteesglobally. These segments currently exist only in mentorship routes (/mentorship/programsand/my/mentorship/programs/.../mentees), so no unintended breadcrumb loss occurs today. However, if future routes reuse these segment names outside mentorship contexts, the global hiding would break their breadcrumbs. Consider scoping the visibility check to mentorship paths for better maintainability.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@frontend/src/components/CardDetailsPage.tsx`:
- Around line 361-373: The "View All Issues" Link uses text-blue-400 with
hover:bg-blue-700 which causes low contrast on hover; update the Link styling in
CardDetailsPage (inside the SecondaryCard block rendering the Issues card) to
set an accessible hover text color (e.g., add hover:text-white and
dark:hover:text-white) so the text contrasts against hover:bg-blue-700, and
ensure the normal state still shows the intended blue (keep text-blue-400 for
non-hover or replace with a neutral default if desired).
|
kasya
left a comment
There was a problem hiding this comment.
Hi @Mr-Rahul-Paul ! Thanks for working on this!
I updated HIDDEN_SEGMENTS to also include modules - we don't have a page for that either 👌🏼
Also I reverted your changes for an issue button. There's a way to view issues from module card and from module page:
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3632 +/- ##
==========================================
+ Coverage 85.55% 87.70% +2.14%
==========================================
Files 463 462 -1
Lines 14303 14287 -16
Branches 1904 1905 +1
==========================================
+ Hits 12237 12530 +293
+ Misses 1687 1344 -343
- Partials 379 413 +34
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|



Fixes #3606
Summary
This PR implements :
.../repositoryKeys]/repostoriesis handled inuseBreadcrumbs.ts.modules/[modulekey]for quick access to module issues../[modulekey]/issues, which was not accessible for ones who dont know the endpoints).Changes Made
useBreadcrumbs.ts, Extended HIDDEN_SEGMENTS to include 'mentees' and 'programs' alongside the existing 'repositories' segment.modules/[modulekey], added "View all issues" navigation link/button to provide access to module issues.Disscussion
useBreadcrumbs.test.tsx?Checklist
make check-testlocally: all warnings addressed, tests passed