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

feat: migrate ExpandableCard component to shadcn #14017

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

kushagrasarathe
Copy link
Contributor

Migrates ExpandableCard component to ShadCN from Chakra

Description

This PR updates the ExpandableCard to use ShadcnUI's accordion component instead of Chakra component. Styles have been updated for both light and dark version.

Note

@pettinarip I've used the accordion from /tailwind directory and did not directly overwrite the classes in the primitives, instead added classes in the ExpandableCard component to keep the UI similar to how it was with Chakra.

Lemme know if this approach doesn't look good, happy to update it.

Also the default behaviour on shadcn accordion doesn't allow the accordion it to be closed if clicked on content, I can add this using mouse events, thoughts?

Related Issue

#13946

Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit c0f29ed
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/66fee4542b7556000832f73f
😎 Deploy Preview https://deploy-preview-14017--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: 48 (🟢 up 2 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.

@pettinarip pettinarip mentioned this pull request Oct 2, 2024
65 tasks
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.

Great start @kushagrasarathe! The approach you took is perfect. Left a few requests on color token changes to match the Design System.

This is how I see it on https://deploy-preview-14017--ethereumorg.netlify.app/en/contributing/style-guide/
image

We would also need to align the text on the header texts to the left.

src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
src/components/ExpandableCard.tsx Outdated Show resolved Hide resolved
@kushagrasarathe
Copy link
Contributor Author

Hey @pettinarip pushed the changes requestd 🙌

Great start @kushagrasarathe! The approach you took is perfect. Left a few requests on color token changes to match the Design System.

This is how I see it on https://deploy-preview-14017--ethereumorg.netlify.app/en/contributing/style-guide/ image

We would also need to align the text on the header texts to the left.

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.

Thanks @kushagrasarathe !

@pettinarip pettinarip merged commit 1f8058d into ethereum:dev Oct 4, 2024
6 checks passed
Copy link

gitpoap-bot bot commented Oct 4, 2024

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

Be sure to join the Ethereum.org discord if you are interested in contributing further to the project or have any questions for the team.

GitPOAP: 2024 Ethereum.org Contributor:

GitPOAP: 2024 Ethereum.org Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@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.

2 participants