Skip to content

add alternating row colors for better readability to geneds table (#227)#236

Draft
maelleallanic wants to merge 4 commits intoScottyLabs:mainfrom
maelleallanic:feature/striped-rows
Draft

add alternating row colors for better readability to geneds table (#227)#236
maelleallanic wants to merge 4 commits intoScottyLabs:mainfrom
maelleallanic:feature/striped-rows

Conversation

@maelleallanic
Copy link
Copy Markdown
Contributor

@maelleallanic maelleallanic commented Apr 7, 2025

Closes #227
adds alternating background colors to the geneds table rows to improve readability and visual scanning
lowkey not super happy with the colors in light mode, i wanted the hover to be lighter than the rows
anish am i ur fav slabs parent yet

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 7, 2025

@maelleallanic is attempting to deploy a commit to the ScottyLabs Team on Vercel.

A member of the Team first needs to authorize it.

@ap-1
Copy link
Copy Markdown
Contributor

ap-1 commented Apr 7, 2025

anish am i ur fav slabs parent yet

top 3 for sure

kidding

@ap-1 ap-1 requested a review from Copilot April 7, 2025 06:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

apps/frontend/src/components/GenedsDataTable.tsx:159

  • Consider using strict equality (===) to ensure type-safe comparisons.
const bgColor = idx % 2 == 0 ? "bg-white" : "bg-gray-50";

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmucourses-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 7, 2025 6:55am

{table.getRowModel().rows.map((row,idx) => {
const bgColor = idx % 2 == 0 ? "bg-white" : "bg-gray-50";
return (
<tr key={row.id} className={`${bgColor} hover:bg-gray-100 dark:hover:bg-gray-200`}>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would benefit from some margin outside the inner text in each row, or some padding within each row. It'll make the gened table look less cramped.

Otherwise I think it looks great

@ap-1 ap-1 requested review from ap-1 and Copilot April 8, 2025 03:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

apps/frontend/src/components/GenedsDataTable.tsx:159

  • [nitpick] Consider using the strict equality operator (===) instead of (==) for better clarity and to prevent potential type coercion issues.
const bgColor = idx % 2 == 0 ? "bg-white" : "bg-gray-50";

@xavilien
Copy link
Copy Markdown
Member

xavilien commented Apr 8, 2025

I'm not sure I really vibe with the light mode. I can see where this is going with the dark mode, but this currently isn't consistent with the other tables in the course search page

@Adrastopoulos
Copy link
Copy Markdown
Member

Adrastopoulos commented Apr 8, 2025

not a fan of how this looks. I think opaque horiz lines will look better.
Ex:
Screenshot 2025-04-08 at 6 46 41 PM

@ap-1 ap-1 marked this pull request as draft May 27, 2025 17:29
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.

[Feature] Use alternating row colors on the geneds page

5 participants