Improve GSoC UI hover states and idea card interactions#585
Improve GSoC UI hover states and idea card interactions#585Abhishekmaurya12367 wants to merge 4 commits intoAOSSIE-Org:mainfrom
Conversation
Make the Ideas page CTA respond to hover with green in light mode and yellow in dark mode. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThis PR replaces the Twitter icon with a new custom X icon component across the application, introduces the XIcon component for SVG rendering, and enhances UI styling with Tailwind classes for improved hover effects, transitions, and dark-mode support across multiple pages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/ideas/2024/index.jsx (1)
17-28:⚠️ Potential issue | 🟡 MinorCSS
transitionconflict between Tailwind and MUIsx.Tailwind's
transition-transform(Line 17) generatestransition-property: transform; transition-duration: 200ms, while thesxprop (Line 27) setstransition: 'background-color 0.3s ease'. Whichever applies last will override the other — you'll lose either the scale or the background-color transition.Consolidate both transitions in one place:
♻️ Option: move both transitions to Tailwind
- className="dark:bg-[`#2A2A2A`] dark:border-white transform transition-transform duration-200 hover:scale-105" + className="dark:bg-[`#2A2A2A`] dark:border-white transform transition-all duration-200 hover:scale-105"Then remove
transition: 'background-color 0.3s ease'from thesxobject (Line 27). Usingtransition-allcovers bothtransformandbackground-color.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/ideas/2024/index.jsx` around lines 17 - 28, The element currently mixes Tailwind's className "transition-transform" (scale hover) with an sx object that sets transition: 'background-color 0.3s ease', causing one to override the other; remove the transition entry from the sx object (the transition property inside the sx passed to this component) and consolidate transitions in the className instead — e.g. replace/augment "transition-transform" with a Tailwind utility that covers both transform and color changes (like "transition-all" or "transition-colors duration-300") so the hover scale and background-color transition both work consistently.
🧹 Nitpick comments (3)
src/pages/apply.jsx (1)
145-152: Redundantfont-mono font-semiboldon both the Link and inner span.The
font-mono font-semiboldclasses appear on the<Link>(Line 146) and again on the inner<span>(Line 149). The inner span inherits from the link, so one set is sufficient. Also,order-1on Line 146 has no effect since there's only one child in the flex container.♻️ Suggested cleanup
<Link - className="order-1 group relative inline-flex items-center overflow-hidden rounded-lg bg-white px-8 py-3 font-mono font-semibold text-[`#00843D`] shadow-sm ring-1 ring-black/10 transition hover:bg-[`#00843D`] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#00843D`] focus-visible:ring-offset-2 dark:bg-black dark:text-yellow-400 dark:ring-white/15 dark:hover:bg-yellow-400 dark:hover:text-black dark:focus-visible:ring-yellow-400 dark:focus-visible:ring-offset-2 dark:focus-visible:ring-offset-black" + className="group relative inline-flex items-center overflow-hidden rounded-lg bg-white px-8 py-3 font-mono font-semibold text-[`#00843D`] shadow-sm ring-1 ring-black/10 transition hover:bg-[`#00843D`] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#00843D`] focus-visible:ring-offset-2 dark:bg-black dark:text-yellow-400 dark:ring-white/15 dark:hover:bg-yellow-400 dark:hover:text-black dark:focus-visible:ring-yellow-400 dark:focus-visible:ring-offset-2 dark:focus-visible:ring-offset-black" href="https://summerofcode.withgoogle.com/" > - <span className="font-mono font-semibold text-center"> + <span className="text-center"> View GSoC Program Announcements </span>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/apply.jsx` around lines 145 - 152, Remove redundant classes from the Link and inner span: keep the font classes on the outer Link and delete "font-mono font-semibold" from the inner <span>, and remove the unnecessary "order-1" class from the <Link> since there's only one child; update the JSX in the Link component (the Link element and its inner span) to reflect these class removals so styling is preserved without duplication.src/components/Footer.jsx (1)
49-51: Consider updating the URL fromtwitter.comtox.com.The link still points to
https://twitter.com/aossie_org. While Twitter URLs redirect to x.com, updating it tohttps://x.com/aossie_orgwould be consistent with the rebranding reflected in the label and icon change. Same applies tosrc/pages/index.jsxLine 93.Also verify that
h-6 w-6visually matches the FontAwesomesize='xl'used for the other icons in this row, to ensure consistent sizing.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/Footer.jsx` around lines 49 - 51, Update the X/Twitter links to use the x.com host and ensure icon sizing matches other icons: change the href in the Link components that reference 'https://twitter.com/aossie_org' to 'https://x.com/aossie_org' (affecting the Link that wraps XIcon and the similar Link in src/pages/index.jsx), and confirm the XIcon sizing matches the FontAwesome icons (adjust or replace the className 'h-6 w-6' on XIcon to match the FontAwesome size='xl' visual dimensions used elsewhere for consistent row height).src/pages/ideas/index.jsx (1)
122-129: Unusedgroupandorder-2classes on the Link.
groupis typically used when child elements referencegroup-hover:etc., but the inner<span>doesn't use any group-prefixed utilities.order-2has no effect as the sole child in the container.♻️ Suggested cleanup
<Link - className="group order-2 mx-auto inline-flex items-center overflow-hidden rounded-lg bg-white px-8 py-3 font-mono font-semibold text-[`#00843D`] shadow-sm ring-1 ring-black/10 transition hover:bg-[`#00843D`] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#00843D`] focus-visible:ring-offset-2 dark:bg-black dark:text-yellow-400 dark:ring-white/15 dark:hover:bg-yellow-400 dark:hover:text-black dark:focus-visible:ring-yellow-400 dark:focus-visible:ring-offset-2 dark:focus-visible:ring-offset-black" + className="mx-auto inline-flex items-center overflow-hidden rounded-lg bg-white px-8 py-3 font-mono font-semibold text-[`#00843D`] shadow-sm ring-1 ring-black/10 transition hover:bg-[`#00843D`] hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[`#00843D`] focus-visible:ring-offset-2 dark:bg-black dark:text-yellow-400 dark:ring-white/15 dark:hover:bg-yellow-400 dark:hover:text-black dark:focus-visible:ring-yellow-400 dark:focus-visible:ring-offset-2 dark:focus-visible:ring-offset-black" href="/ideas/2024" >🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/ideas/index.jsx` around lines 122 - 129, The Link element rendering the "View 2024 Idea List" button includes unused Tailwind classes `group` and `order-2`; remove those from the Link's className to avoid dead CSS and confusion (locate the Link JSX in the ideas page where the Link component renders the inner <span> text). Ensure no child elements rely on `group-` utilities before removal and verify visual/ordering remain correct after pruning.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/pages/ideas/2024/index.jsx`:
- Around line 17-28: The element currently mixes Tailwind's className
"transition-transform" (scale hover) with an sx object that sets transition:
'background-color 0.3s ease', causing one to override the other; remove the
transition entry from the sx object (the transition property inside the sx
passed to this component) and consolidate transitions in the className instead —
e.g. replace/augment "transition-transform" with a Tailwind utility that covers
both transform and color changes (like "transition-all" or "transition-colors
duration-300") so the hover scale and background-color transition both work
consistently.
---
Duplicate comments:
In `@src/pages/ideas/index.jsx`:
- Around line 17-28: The component uses both Tailwind's transition utilities in
the className ("transition-transform") and an explicit transition in the sx prop
("transition: 'background-color 0.3s ease'"), causing conflicting/overridden
transitions; to fix, replace "transition-transform" with "transition-all" in the
className or remove the sx transition and consolidate all transition rules in
sx, updating the className or sx accordingly—apply this change where the JSX
uses className and the sx prop on the same element to ensure a single unified
transition definition.
---
Nitpick comments:
In `@src/components/Footer.jsx`:
- Around line 49-51: Update the X/Twitter links to use the x.com host and ensure
icon sizing matches other icons: change the href in the Link components that
reference 'https://twitter.com/aossie_org' to 'https://x.com/aossie_org'
(affecting the Link that wraps XIcon and the similar Link in
src/pages/index.jsx), and confirm the XIcon sizing matches the FontAwesome icons
(adjust or replace the className 'h-6 w-6' on XIcon to match the FontAwesome
size='xl' visual dimensions used elsewhere for consistent row height).
In `@src/pages/apply.jsx`:
- Around line 145-152: Remove redundant classes from the Link and inner span:
keep the font classes on the outer Link and delete "font-mono font-semibold"
from the inner <span>, and remove the unnecessary "order-1" class from the
<Link> since there's only one child; update the JSX in the Link component (the
Link element and its inner span) to reflect these class removals so styling is
preserved without duplication.
In `@src/pages/ideas/index.jsx`:
- Around line 122-129: The Link element rendering the "View 2024 Idea List"
button includes unused Tailwind classes `group` and `order-2`; remove those from
the Link's className to avoid dead CSS and confusion (locate the Link JSX in the
ideas page where the Link component renders the inner <span> text). Ensure no
child elements rely on `group-` utilities before removal and verify
visual/ordering remain correct after pruning.
Summary by CodeRabbit
Style
New Features