fix: show module as a section when there is only 1 module#3402
fix: show module as a section when there is only 1 module#3402kasya merged 3 commits intoOWASP:mainfrom
Conversation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughConditional rendering in CardDetailsPage now omits the SecondaryCard when a program has exactly one module. SingleModuleCard was refactored to render mentors/mentees inline with avatar links, a show-more toggle, and unified contributor URL logic. Tests and mocks were updated accordingly. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
@kasya, please review it and let me know if any changes are required. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@frontend/src/components/SingleModuleCard.tsx`:
- Around line 60-109: The renderContributors function signature currently
includes an unused showAll parameter; remove showAll from the signature of
renderContributors and from its type list (Contributor[] | undefined,
displayContributors..., label, toggleShowAll, isMentee) so the function only
accepts the parameters it uses, and update any call sites that pass showAll to
stop passing that argument (ensure calls still pass toggleShowAll and isMentee
in the correct order). Also update any related type annotations or usages (e.g.,
props or local callers) to match the new parameter list to avoid TypeScript
errors.
kasya
left a comment
There was a problem hiding this comment.
@HarshitVerma109 this looks good 👍🏼
Pushed tiny change to update one icon.
Thanks!
|
@HarshitVerma109 could you please resolve conflicts and check that tests pass so we could merge this in? |
d2e4655
eb378a4 to
d2e4655
Compare
|
@kasya, please review it and let me know if any changes are required. |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3402 +/- ##
=======================================
Coverage ? 85.56%
=======================================
Files ? 461
Lines ? 14246
Branches ? 1902
=======================================
Hits ? 12190
Misses ? 1679
Partials ? 377
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:
|
kasya
left a comment
There was a problem hiding this comment.
@HarshitVerma109 Great work! Thanks!



Proposed change
Resolves #3083
Display single module as a section instead of a nested card.
Changes
Checklist
make check-testlocally: all warnings addressed, tests passed