Skip to content

Fixes #140#295

Open
Rohan11P wants to merge 1 commit intoAOSSIE-Org:mainfrom
Rohan11P:Dashboard_Layout_Fix
Open

Fixes #140#295
Rohan11P wants to merge 1 commit intoAOSSIE-Org:mainfrom
Rohan11P:Dashboard_Layout_Fix

Conversation

@Rohan11P
Copy link

@Rohan11P Rohan11P commented Feb 5, 2026

Fixed overlapping text and UI elements in creator match cards by:

  • Converting AudienceMatchBar to vertical stack layout
  • Improving label/value spacing in CreatorStats
  • Reducing grid columns from 4 to 2 on large screens

Closes #

📝 Description

🔧 Changes Made

📷 Screenshots or Visual Changes (if applicable)

🤝 Collaboration

Collaborated with: @username (optional)

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

Release Notes

  • New Features

    • Collaborations page now supports a compact layout mode that adjusts content visibility and spacing.
  • Improvements

    • Refined creator stats display with improved spacing and typography.
    • Reorganized audience match bar with header row and separate progress indicator.
    • Adjusted creator card grid layout for better responsive behavior.

Fixed overlapping text and UI elements in creator match cards by:
- Converting AudienceMatchBar to vertical stack layout
- Improving label/value spacing in CreatorStats
- Reducing grid columns from 4 to 2 on large screens
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

The changes implement a compact view mode for the collaboration hub by introducing an optional compact prop that conditionally adjusts layout and element visibility, while refining creator match card styling and grid responsiveness.

Changes

Cohort / File(s) Summary
Collaboration Hub UI Refinements
Frontend/src/components/collaboration-hub/CreatorMatchCard.tsx, Frontend/src/components/collaboration-hub/CreatorMatchGrid.tsx
Updated CreatorStats and AudienceMatchBar subcomponents with refined grid spacing and layout structure. Simplified grid responsiveness by removing lg:grid-cols-4 breakpoint, reducing column configuration for larger screens.
Compact Mode Implementation
Frontend/src/pages/Collaborations.tsx, Frontend/src/pages/DashboardPage.tsx
Added optional compact prop to CollaborationsPage that conditionally renders layout (full-width vs. responsive grid) and hides the filters card when enabled. DashboardPage now passes compact={true} to CollaborationsPage.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A compact view emerges, neat and tight,
Where collaboration cards align just right,
Grid layouts shift, responsive and true,
The dashboard now shows what creators do!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title 'Fixes #140' is vague and does not convey meaningful information about the changeset; it only references an issue number without describing the actual change. Consider using a more descriptive title that summarizes the main change, such as 'Fix creator match card layout and spacing issues' or 'Refactor AudienceMatchBar to vertical stack layout'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@Frontend/src/components/collaboration-hub/CreatorMatchCard.tsx`:
- Around line 44-52: AudienceMatchBar renders an inconsistent progress state for
unknown audience labels: aria-valuenow falls back to 0 but the inner bar width
falls back to 50%, confusing assistive tech and visuals. Fix AudienceMatchBar by
computing a single numeric matchValue (e.g., 100, 75, 50, or 0) from
audienceMatch (use a small map or switch) and use that value both for
aria-valuenow and for the inline style width (e.g., `${matchValue}%`); keep
using getAudienceMatchColor(audienceMatch) for color only so unknown labels show
0% width and aria-valuenow=0 consistently.

In `@Frontend/src/pages/DashboardPage.tsx`:
- Line 193: The CollaborationsPage component defaults showHeader to true which
causes its sticky header to render inside the Dashboard card; update the
embedded instance (the <CollaborationsPage compact={true} /> usage) to
explicitly pass showHeader={false} so the header is disabled in the
compact/dashboard embed and prevents layout overlap.

Comment on lines 44 to 52
const AudienceMatchBar: React.FC<{audienceMatch: string}> = ({ audienceMatch }) => (
<div className="flex items-center gap-2 w-full justify-center mb-2">
<span className="text-xs text-gray-500">Audience Match</span>
<span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
<div className="flex-1 h-2 rounded bg-gray-200 mx-2 min-w-[60px] max-w-[80px]" role="progressbar" aria-valuenow={audienceMatch === 'Very High' ? 100 : audienceMatch === 'High' ? 75 : audienceMatch === 'Good' ? 50 : 0} aria-valuemin={0} aria-valuemax={100}>
<div className="w-full mb-3 space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-gray-500">Audience Match</span>
<span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
</div>
<div className="w-full h-2 rounded bg-gray-200" role="progressbar" aria-valuenow={audienceMatch === 'Very High' ? 100 : audienceMatch === 'High' ? 75 : audienceMatch === 'Good' ? 50 : 0} aria-valuemin={0} aria-valuemax={100}>
<div className={`h-2 rounded ${getAudienceMatchColor(audienceMatch)}`} style={{ width: audienceMatch === "Very High" ? "100%" : audienceMatch === "High" ? "75%" : "50%" }} />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Align progress width with the ARIA value for unknown audience labels.

When audienceMatch is unrecognized, aria-valuenow becomes 0 but the bar still renders at 50%. That’s inconsistent visually and for assistive tech.

✅ Suggested fix
-const AudienceMatchBar: React.FC<{audienceMatch: string}> = ({ audienceMatch }) => (
+const AudienceMatchBar: React.FC<{audienceMatch: string}> = ({ audienceMatch }) => (
+  const percent =
+    audienceMatch === "Very High" ? 100 :
+    audienceMatch === "High" ? 75 :
+    audienceMatch === "Good" ? 50 : 0;
   <div className="w-full mb-3 space-y-2">
     <div className="flex items-center justify-between">
       <span className="text-xs text-gray-500">Audience Match</span>
       <span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
     </div>
-    <div className="w-full h-2 rounded bg-gray-200" role="progressbar" aria-valuenow={audienceMatch === 'Very High' ? 100 : audienceMatch === 'High' ? 75 : audienceMatch === 'Good' ? 50 : 0} aria-valuemin={0} aria-valuemax={100}>
-      <div className={`h-2 rounded ${getAudienceMatchColor(audienceMatch)}`} style={{ width: audienceMatch === "Very High" ? "100%" : audienceMatch === "High" ? "75%" : "50%" }} />
+    <div className="w-full h-2 rounded bg-gray-200" role="progressbar" aria-valuenow={percent} aria-valuemin={0} aria-valuemax={100}>
+      <div className={`h-2 rounded ${getAudienceMatchColor(audienceMatch)}`} style={{ width: `${percent}%` }} />
     </div>
   </div>
 );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const AudienceMatchBar: React.FC<{audienceMatch: string}> = ({ audienceMatch }) => (
<div className="flex items-center gap-2 w-full justify-center mb-2">
<span className="text-xs text-gray-500">Audience Match</span>
<span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
<div className="flex-1 h-2 rounded bg-gray-200 mx-2 min-w-[60px] max-w-[80px]" role="progressbar" aria-valuenow={audienceMatch === 'Very High' ? 100 : audienceMatch === 'High' ? 75 : audienceMatch === 'Good' ? 50 : 0} aria-valuemin={0} aria-valuemax={100}>
<div className="w-full mb-3 space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-gray-500">Audience Match</span>
<span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
</div>
<div className="w-full h-2 rounded bg-gray-200" role="progressbar" aria-valuenow={audienceMatch === 'Very High' ? 100 : audienceMatch === 'High' ? 75 : audienceMatch === 'Good' ? 50 : 0} aria-valuemin={0} aria-valuemax={100}>
<div className={`h-2 rounded ${getAudienceMatchColor(audienceMatch)}`} style={{ width: audienceMatch === "Very High" ? "100%" : audienceMatch === "High" ? "75%" : "50%" }} />
</div>
const AudienceMatchBar: React.FC<{audienceMatch: string}> = ({ audienceMatch }) => {
const percent =
audienceMatch === "Very High" ? 100 :
audienceMatch === "High" ? 75 :
audienceMatch === "Good" ? 50 : 0;
return (
<div className="w-full mb-3 space-y-2">
<div className="flex items-center justify-between">
<span className="text-xs text-gray-500">Audience Match</span>
<span className="font-semibold text-xs text-gray-700">{audienceMatch}</span>
</div>
<div className="w-full h-2 rounded bg-gray-200" role="progressbar" aria-valuenow={percent} aria-valuemin={0} aria-valuemax={100}>
<div className={`h-2 rounded ${getAudienceMatchColor(audienceMatch)}`} style={{ width: `${percent}%` }} />
</div>
</div>
);
};
🤖 Prompt for AI Agents
In `@Frontend/src/components/collaboration-hub/CreatorMatchCard.tsx` around lines
44 - 52, AudienceMatchBar renders an inconsistent progress state for unknown
audience labels: aria-valuenow falls back to 0 but the inner bar width falls
back to 50%, confusing assistive tech and visuals. Fix AudienceMatchBar by
computing a single numeric matchValue (e.g., 100, 75, 50, or 0) from
audienceMatch (use a small map or switch) and use that value both for
aria-valuenow and for the inline style width (e.g., `${matchValue}%`); keep
using getAudienceMatchColor(audienceMatch) for color only so unknown labels show
0% width and aria-valuenow=0 consistently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant