Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate EventCard to Shadcn #13966

Merged
merged 6 commits into from
Sep 27, 2024
Merged

Migrate EventCard to Shadcn #13966

merged 6 commits into from
Sep 27, 2024

Conversation

minimalsm
Copy link
Contributor

Description

  • Updates EventCard to shadcn

Notes

  1. Hardcoded 1.6rem line height for the description text (per OldText) as the defaults we have varied too much from the current design. Our designers should pull this component in line with current DS.

  2. Slight differences in spacing compared to the original design (which had kind of unusual spacing). IMO, these are improvements but defer to @nloureiro

  3. I've hardcoded the background colors (bg-[#FCFCFC] dark:bg-[#272627]) in the CardHeader. Our default theme values didn't provide a good match for this use case. another area where we might want to consult with design

Related Issue

#13946

Copy link

netlify bot commented Sep 25, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit ffee150
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66f57cfd7a654f000783fe86
😎 Deploy Preview https://deploy-preview-13966--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 47 (🟢 up 1 from production)
Accessibility: 93 (no change from production)
Best Practices: 89 (🔴 down 9 from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@nloureiro
Copy link
Contributor

agree. The spacing was off. Thank you for the adjustments

comapring with Figma, the text size is bigger, but now we are bumping everything to 16 or above so let's keep it like this

Screen Shot 2024-09-25 11 17 39 PM

With this text size, we should do a 2-card line. It's too narrow for an MD page. Would it be on another PR to do this?

Screen Shot 2024-09-25 11 22 51 PM

@minimalsm
Copy link
Contributor Author

Thanks @nloureiro

agree. The spacing was off. Thank you for the adjustments

comapring with Figma, the text size is bigger, but now we are bumping everything to 16 or above so let's keep it like this

Okay can update to 16px fontsize. With that we can probably normalise line height too?

With this text size, we should do a 2-card line. It's too narrow for an MD page. Would it be on another PR to do this?

We can handle that in #13967, which is the upcoming events grid wrapper

@nloureiro
Copy link
Contributor

Thanks @nloureiro

agree. The spacing was off. Thank you for the adjustments
comapring with Figma, the text size is bigger, but now we are bumping everything to 16 or above so let's keep it like this

Okay can update to 16px fontsize. With that we can probably normalise line height too?

yes, makes sense

With this text size, we should do a 2-card line. It's too narrow for an MD page. Would it be on another PR to do this?

We can handle that in #13967, which is the upcoming events grid wrapper

ok, got it

@minimalsm
Copy link
Contributor Author

Updated font size implementation after discussion with @nloureiro:

Mobile: 16px font size
Desktop: Retaining 14px font size

Rationale:

  • 3-column grid on large screens necessitates smaller font due to limited width
  • 2-column grid on large screens was tested but felt clunky and reduced event discoverability

Changes implemented && ready for review :)

Copy link
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@minimalsm looks good, will add a small fix to use cn function.

src/components/EventCard.tsx Outdated Show resolved Hide resolved
w="full"
h="full"
<Card
className={`border-lightBorder flex h-full flex-col rounded-md border ${className}`}
Copy link
Member

Choose a reason for hiding this comment

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

Ah, what did you mean with lightBorder?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No idea, just going to remove lol

@pettinarip pettinarip merged commit 8a0e613 into dev Sep 27, 2024
8 of 10 checks passed
@pettinarip pettinarip deleted the migrateEventCard branch September 27, 2024 06:41
This was referenced Oct 2, 2024
@pettinarip pettinarip added the hacktoberfest Track hacktoberfest activity label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Track hacktoberfest activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants