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

Shadcn/Tailwind migration #13946

Open
38 of 65 tasks
pettinarip opened this issue Sep 24, 2024 · 58 comments
Open
38 of 65 tasks

Shadcn/Tailwind migration #13946

pettinarip opened this issue Sep 24, 2024 · 58 comments
Assignees
Labels
epic 💪 This issue is an epic on our product roadmap good first issue Good item to try if you're new to contributing hacktoberfest Track hacktoberfest activity hacktoberfest-beginner GFI for hacktoberfest participants help wanted Extra attention is needed or someone is needed to help

Comments

@pettinarip
Copy link
Member

pettinarip commented Sep 24, 2024

Description

As part of our Q3 roadmap, this issue tracks the progress of the Shadcn/Tailwind migration.

How to contribute

If you’d like to help with the component migration, please follow these steps:

  1. Read the following “Tips & Guidance” section for basic things to keep in mind while doing the migration.
  2. Leave a comment here asking which component you would like to work out.
  3. We assign you to the file by adding your handle next to the file name in the list.
    • If you were assigned to multiple files then create a separate PR for each component. It will make the testing and review process much simpler and more organized.
  4. Once you finish it (PR merged), we’ll mark it as done.
  5. Repeat!

Tips & Guidance

  • Migrate only the components defined in the component file.
  • Replace all Chakra imports (unless there is an exception mentioned in this file) with native tags or shadcn components installed in components/ui
    • @chakra-ui/react/Icon ⇒ just use the exported svg component from react-icons instead <MdMenu className="text-2xl" />
  • Replace other imports
    • OldText ⇒ use the native <p> tag
    • OldHeading ⇒ use native <h1>, <h2>, etc. tags
    • Link ⇒ use the Link component defined in components/ui/Link
    • Buttons ⇒ use the buttons defined in components/ui/buttons/Button
    • images ⇒ use TwImage from components/Image
  • For layout and general component structure
    • Use the components in components/ui/flex as much as possible
  • Colors
    • Define missing colors in the tailwind.config.ts file. At the review stage, we will analyze & try to replace old theme colors with new colors from the Design System.

Done

In review

Pending

src/components

src/components/Staking

src/components/Translatathon

  • Translatathon/TranslationHubCallout.tsx @Sambit03
  • Translatathon/TranslatathonBanner.tsx @Sambit03
  • Translatathon/StepByStepInstructions.tsx @Sambit03
@pettinarip pettinarip self-assigned this Sep 24, 2024
@github-actions github-actions bot added the needs triage 📥 This issue needs triaged before being worked on label Sep 24, 2024
@pettinarip pettinarip added epic 💪 This issue is an epic on our product roadmap and removed needs triage 📥 This issue needs triaged before being worked on labels Sep 24, 2024
@TylerAPfledderer
Copy link
Contributor

@pettinarip I'm currently handling all of the Quiz components

@pettinarip
Copy link
Member Author

@TylerAPfledderer gotcha! added your name next to them, ty.

@saurabhburade
Copy link
Contributor

@pettinarip Please assign me the Banners/ContributorsQuizBanner.tsx component.

@pettinarip
Copy link
Member Author

Assigned @saurabhburade 👍🏼

@Baystef
Copy link
Contributor

Baystef commented Sep 27, 2024

Please assign the Contributors and DataProductCard to me @pettinarip Thanks

@pettinarip
Copy link
Member Author

Please assign the Contributors and DataProductCard to me @pettinarip Thanks

Yey! awesome, assigned! let me know if you need any clarification or help 💪🏼

@Baystef
Copy link
Contributor

Baystef commented Sep 27, 2024

Please assign the Contributors and DataProductCard to me @pettinarip Thanks

Yey! awesome, assigned! let me know if you need any clarification or help 💪🏼

TwImage is not working with remote URLs , getting this error cos its using next/image under the hood Error: Invalid src prop (https://avatars2.githubusercontent.com/u/364566?v=4) on next/image, hostname "avatars2.githubusercontent.com" is not configured under images in your next.config.js See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host

should I add avatars2.githubusercontent.com to next.config.js or use the bare img element, this also shows a warning Using could result in slower LCP and higher bandwidth. Consider usingfromnext/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element but it works
@pettinarip

@pettinarip
Copy link
Member Author

Right @Baystef lets use the img tag for now. You can leave the warning.

@yashtotla
Copy link
Contributor

Hi @pettinarip can you assign the ProductCard.tsx migration to me? Thanks!

@kushagrasarathe
Copy link
Contributor

hey @pettinarip could you please assign ExpandableCard.tsx's migration to me. Thanks

@pettinarip
Copy link
Member Author

@yashtotla @kushagrasarathe thanks for helping! assigned, thanks

@Baystef
Copy link
Contributor

Baystef commented Oct 21, 2024

@Baystef I've assigned you the first 4 for now, just to give others a chance to join in the meantime. Once you are done with them, I can assign the rest if no one else has requested them.

  • Roadmap/RoadmapImageContent
  • Staking/StakingHowSoloWorks
  • Staking/StakingProductsCardGrid/index.tsx
  • Staking/StakingStatsBox

Thanks!

PR up for the 4

Wow, that was fast, thanks @Baystef. I'll check those PRs soon.

In the meantime, I've assigned the other components you requested before.

  • Staking/WithdrawalsTabComparison.tsx
  • Staking/StakingLaunchpadWidget.tsx
  • Staking/StakingCommunityCallout.tsx

@pettinarip, when OldText is removed and replaced with a normal p tag, the global styles of OldText gets lost obviously.

    margin-bottom: 1.45rem;
    line-height: 1.6rem;

So my question is
should I add a global p tag style with the exact style OldText was using
or add the tailwind style on individual p tags
or should I leave it squashed as is and you guys will handle it globally?

@ameeetgaikwad
Copy link
Contributor

@pettinarip

Would like to work on TranslationBannerLegal.tsx, TranslationBanner.tsx, TranslationLeaderboard.tsx

Please assign.

@pettinarip
Copy link
Member Author

@pettinarip, when OldText is removed and replaced with a normal p tag, the global styles of OldText gets lost obviously.

    margin-bottom: 1.45rem;
    line-height: 1.6rem;

So my question is should I add a global p tag style with the exact style OldText was using or add the tailwind style on individual p tags or should I leave it squashed as is and you guys will handle it globally?

@Baystef to simplify the migration, we try to match production as much as possible. For now, we won't set a global style for the paragraph as we don't have much consistency in them. What I would suggest is that you try to control the spacing from the parent using gap. If not, you could set the margin on each paragraph.

Another thing I would like to see if possible is the usage one of the tw sizes/scale, instead of the custom 1.45rem, feel free to use mb-6 (1.5rem) or whatever works best in this case.

@pettinarip
Copy link
Member Author

@pettinarip

Would like to work on TranslationBannerLegal.tsx, TranslationBanner.tsx, TranslationLeaderboard.tsx

Please assign.

Hi @ameeetgaikwad 👋🏼 happy to see you around!

I've assigned those to you. Ty

@Baystef
Copy link
Contributor

Baystef commented Oct 23, 2024

Please assign these to me @pettinarip

  • StablecoinAccordion/AccordionCustomItem.tsx
  • StablecoinAccordion/index.tsx
  • StablecoinBoxGrid.tsx

@pettinarip
Copy link
Member Author

@Baystef assigned. Will review those new PRs soon, thanks!

@cqw-acq
Copy link
Contributor

cqw-acq commented Oct 24, 2024

@pettinarip hey! i want to work on "RollupProductDevDoc.tsx"

@pettinarip
Copy link
Member Author

Its yours! @cqw-acq thanks. Let us know if you need help.

@bhushanpardeshii
Copy link

Hey @pettinarip can you assign me stat/index.tsx

@pettinarip
Copy link
Member Author

Hey @pettinarip can you assign me stat/index.tsx

Done @bhushanpardeshii 🙌🏼 ty

@kushagrasarathe
Copy link
Contributor

hey @pettinarip i've pushed 2 pr's, #14226 and #14233 for HorizontalCard and Layer2ProductCard components

@bhushanpardeshii
Copy link

would like to work on this TutorialMetadata.tsx.Please assign me.

@pettinarip
Copy link
Member Author

would like to work on this TutorialMetadata.tsx.Please assign me.

Done @bhushanpardeshii!

@cqw-acq
Copy link
Contributor

cqw-acq commented Oct 31, 2024

@pettinarip done! migration RollupProductDevDoc.tsx to tailwind #14268

@plvzfq-rit
Copy link

Hi! I would like to work on FileContributors.tsx. Please assign me. Thanks!

@yashtotla
Copy link
Contributor

Hi @pettinarip I have opened a PR for migrating ProductList.
Can you assign Leaderboard.tsx to me next?

bhushanpardeshii added a commit to bhushanpardeshii/ethereum-org-website that referenced this issue Nov 6, 2024
bhushanpardeshii added a commit to bhushanpardeshii/ethereum-org-website that referenced this issue Nov 6, 2024
@pettinarip
Copy link
Member Author

@plvzfq-rit done! and @yashtotla done! I'll review that PR soon. Assigned the other one 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic 💪 This issue is an epic on our product roadmap good first issue Good item to try if you're new to contributing hacktoberfest Track hacktoberfest activity hacktoberfest-beginner GFI for hacktoberfest participants help wanted Extra attention is needed or someone is needed to help
Projects
None yet
Development

No branches or pull requests