Skip to content

Improve card typography consistency and reduce unnecessary spacing#724

Closed
AmyKrrrr wants to merge 2 commits into
AOSSIE-Org:mainfrom
AmyKrrrr:fix/ideas-card-layout
Closed

Improve card typography consistency and reduce unnecessary spacing#724
AmyKrrrr wants to merge 2 commits into
AOSSIE-Org:mainfrom
AmyKrrrr:fix/ideas-card-layout

Conversation

@AmyKrrrr
Copy link
Copy Markdown

@AmyKrrrr AmyKrrrr commented May 22, 2026

Addressed Issues:

Fixes #723

Screenshots/Recordings:

Before

Screenshot 2026-05-22 164313

After

Screenshot 2026-05-22 164506

Additional Notes:

This PR improves the visual consistency of the project cards by updating typography and reducing unnecessary spacing while maintaining the existing design language.

AI Usage Disclosure:

I have used the following AI models and tools:

  • ChatGPT (OpenAI) for guidance regarding GitHub contribution workflow and PR structuring.

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and I will share a link to this PR with the project maintainers there
  • I have read the [Contribution Guidelines](../CONTRIBUTING.md)
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Style
    • Reduced card height for a more compact, balanced layout in idea tiles.
    • Updated title typography for stronger emphasis, improved spacing, and centered alignment.
    • Refined "Know more" button typography for clearer hierarchy and visual consistency across cards.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

📝 Walkthrough

Walkthrough

IdeaCard styling changes: card height lowered to 270, title Typography uses font-bold and mt-6 with theme coloring and text-center, and the "Know more" Button switches to font-bold font-mono classes while removing prior sx overrides.

Changes

IdeaCard Styling Updates

Layer / File(s) Summary
Card height, title, and button styling
src/components/ideas/IdeaCard.jsx
MotionMuiCard height changed from 350 to 270; title Typography removes sx overrides and adds font-bold, mt-6, theme color, and text-center; "Know more" Button className updated from font-Nunito-Bold to font-bold font-mono and prior sx removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Zahnentferner

Poem

A rabbit nudged a card so neat,
Trimmed its height and tuned its beat,
Bold the title, snug the space,
Button fonts in tidy place,
Now the layout hops with glee. 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely summarizes the main changes: improving card typography consistency and reducing spacing in the IdeaCard component.
Linked Issues check ✅ Passed All coding objectives from issue #723 are met: card heading font weight increased via font-bold class, Know more button typography updated with font-bold font-mono, and card height reduced from 350 to 270 pixels.
Out of Scope Changes check ✅ Passed All changes are directly related to the IdeaCard component and focused on addressing the three specific requirements from issue #723 with no extraneous modifications.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/ideas/IdeaCard.jsx`:
- Around line 40-41: The element in IdeaCard.jsx currently mixes Tailwind
classes (font-bold, font-mono, text-green-600, dark:text-yellow-400) with an MUI
sx prop (fontFamily: 'Nunito-Bold', color: '`#3c982c`', textAlign: 'center'),
causing sx to override Tailwind; fix by consolidating to one approach—remove the
conflicting properties from the sx prop (or remove sx entirely) and keep the
Tailwind classes for typography and color consistency on the element that has
className="font-bold mt-6 text-2xl font-mono text-green-600
dark:text-yellow-400", ensuring any needed alignment is preserved via Tailwind
(e.g., add text-center) if you drop textAlign from sx.
- Line 74: In IdeaCard.jsx, the Typography element has conflicting text color
definitions between the Tailwind classes in className ("text-green-600
dark:text-yellow-400") and the MUI sx prop (color: '`#3c982c`'); remove the color
from the sx prop on that Typography (or otherwise consolidate to a single
styling approach) so the Tailwind dark-mode and semantic classes take effect;
update the sx object used in the Typography component to omit the color key and
rely on the existing className for text color.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: abde5794-934b-4075-a0e1-bf5c673d7338

📥 Commits

Reviewing files that changed from the base of the PR and between a20f3ef and 9bd6d2b.

📒 Files selected for processing (1)
  • src/components/ideas/IdeaCard.jsx

Comment thread src/components/ideas/IdeaCard.jsx Outdated
Comment thread src/components/ideas/IdeaCard.jsx Outdated
Copy link
Copy Markdown

@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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/ideas/IdeaCard.jsx`:
- Around line 70-75: The Button in IdeaCard.jsx currently relies on the Tailwind
class "normal-case" which may be overridden by MUI Button's default uppercase;
restore the explicit sx override or use Tailwind important to guarantee casing:
add back sx={{ textTransform: 'none' }} on the Button component (or change the
className to use "!normal-case") so the MUI Button's textTransform cannot force
uppercase; locate the Button in IdeaCard.jsx (look for className="...
normal-case") and update its props accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 67bd86c0-dcad-4b46-8946-72b6ab18f58e

📥 Commits

Reviewing files that changed from the base of the PR and between 9bd6d2b and 65934c9.

📒 Files selected for processing (1)
  • src/components/ideas/IdeaCard.jsx

Comment on lines +70 to 75
// sx={{
// color: '#3c982c',
// textTransform: 'none',
// }}
className="font-bold font-mono text-green-600 dark:text-yellow-400 text-lg leading-7 text-center normal-case"
>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether project-level MUI overrides already disable uppercase globally.
# If no override exists, keep `sx={{ textTransform: 'none' }}` (or use `!normal-case`).
rg -n -C3 "MuiButton|styleOverrides|textTransform" --type js --type jsx --type ts --type tsx

Repository: AOSSIE-Org/Website

Length of output: 90


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Inspect the exact surrounding code in IdeaCard.jsx
if [ -f "src/components/ideas/IdeaCard.jsx" ]; then
  echo "=== IdeaCard.jsx context around lines 55-90 ==="
  nl -ba src/components/ideas/IdeaCard.jsx | sed -n '55,95p'
else
  echo "Missing file: src/components/ideas/IdeaCard.jsx" >&2
fi

# 2) Find any MUI Button / textTransform overrides in the repo (no reliance on rg --type 'jsx')
echo "=== Searching for MUI Button / textTransform overrides ==="
rg -n -C3 "MuiButton|styleOverrides|textTransform" src . \
  --glob='*.js' --glob='*.jsx' --glob='*.ts' --glob='*.tsx' --glob='*.css' --glob='*.scss' || true

# 3) Specifically look for theme customization / typography / button defaults
echo "=== Searching for createTheme / ThemeProvider ==="
rg -n -C3 "createTheme|ThemeProvider|components:\s*\{|typography" src . \
  --glob='*.js' --glob='*.jsx' --glob='*.ts' --glob='*.tsx' || true

Repository: AOSSIE-Org/Website

Length of output: 171


🏁 Script executed:

#!/bin/bash
# 4) Also list any MUI theme file candidates by common names
echo "=== Candidate theme files ==="
fd -t f "theme" src . | head -n 50 || true
fd -t f "Mui" src . | head -n 50 || true

Repository: AOSSIE-Org/Website

Length of output: 92


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="src/components/ideas/IdeaCard.jsx"
echo "=== IdeaCard.jsx context around lines 60-85 ==="
if [ -f "$FILE" ]; then
  awk 'NR>=60 && NR<=85 {printf "%d\t%s\n", NR, $0}' "$FILE"
else
  echo "Missing file: $FILE" >&2
fi

echo "=== Searching for MuiButton / textTransform overrides (any file types) ==="
rg -n -S -C3 "MuiButton|textTransform" . --glob='*.js' --glob='*.jsx' --glob='*.ts' --glob='*.tsx' --glob='*.css' --glob='*.scss' || true

echo "=== Searching for MUI theme customizations (theme/ThemeProvider/components) ==="
rg -n -S -C3 "createTheme|ThemeProvider|components:\s*\{|typography" . --glob='*.js' --glob='*.jsx' --glob='*.ts' --glob='*.tsx' || true

echo "=== Candidate theme/theme-related files by name ==="
# fall back to repo-wide filename search
fd -t f -i "*theme*" . | head -n 50 || true
fd -t f -i "*material*" . | head -n 50 || true
fd -t f -i "*mui*" . | head -n 50 || true

Repository: AOSSIE-Org/Website

Length of output: 3372


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Searching specifically for 'MuiButton' occurrences ==="
rg -n -S "MuiButton" . || true

echo "=== Searching for 'typography' button textTransform overrides ==="
rg -n -S "typography.*button|button.*textTransform|textTransform:.*uppercase|textTransform:.*none" . || true

Repository: AOSSIE-Org/Website

Length of output: 272


normal-case is unlikely to override MUI Button’s default uppercase

In src/components/ideas/IdeaCard.jsx, the <Button> relies on the Tailwind normal-case class, but the repo has no MuiButton/theme textTransform overrides disabling MUI’s uppercase styling. That means casing can revert to uppercase depending on CSS precedence—keep sx={{ textTransform: 'none' }} (or use Tailwind !normal-case) to guarantee consistent typography.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/ideas/IdeaCard.jsx` around lines 70 - 75, The Button in
IdeaCard.jsx currently relies on the Tailwind class "normal-case" which may be
overridden by MUI Button's default uppercase; restore the explicit sx override
or use Tailwind important to guarantee casing: add back sx={{ textTransform:
'none' }} on the Button component (or change the className to use
"!normal-case") so the MUI Button's textTransform cannot force uppercase; locate
the Button in IdeaCard.jsx (look for className="... normal-case") and update its
props accordingly.

@reach2saksham
Copy link
Copy Markdown
Member

Thank you for the contribution. But I feel the approach is making it too filled in with respect to cards. We already know that there are too many cards but if we reduce the height and try to accomodate more cards within the same viewport. It is not a pleasent view for user.

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.

[GOOD FIRST ISSUE]: Improve card typography consistency and reduce unnecessary spacing

2 participants