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

Refactor YouTube component to use ChakraUI #7723

Merged
merged 2 commits into from
Sep 6, 2022
Merged

Conversation

minimalsm
Copy link
Contributor

Description

Migrate YouTube from styled-components to ChakraUI

Related Issue

#6374

@minimalsm minimalsm added the refactor ♻️ Changes which don't affect functionality label Sep 6, 2022
@vercel
Copy link

vercel bot commented Sep 6, 2022

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

Name Status Preview Updated
ethereum-org-website ❌ Failed (Inspect) Sep 6, 2022 at 4:52PM (UTC)

@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
const baseUrl = "https://www.youtube.com/embed/"
const src = baseUrl + id + startQuery
return (
<Figure>
<Box as="figure" display="block" marginY="1rem">
<iframe
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think we'd want to refactor the iframe to Chakra. LMK if you disagree

Copy link
Member

Choose a reason for hiding this comment

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

No, thats ok 👍🏼

@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
const baseUrl = "https://www.youtube.com/embed/"
const src = baseUrl + id + startQuery
return (
<Figure>
<Box as="figure" display="block" marginY="1rem">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping display block is necessary for Crowdin formatting reasons.

Copy link
Member

Choose a reason for hiding this comment

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

Oh didn't know that, thanks for explaining that. You can ignore my suggestion there then 😬

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.

Good first Chakra PR @minimalsm 🚀 I've pointed out only a few improvements.

@@ -27,7 +22,7 @@ const YouTube: React.FC<IProps> = ({ id, start = "0", title = "YouTube" }) => {
const baseUrl = "https://www.youtube.com/embed/"
const src = baseUrl + id + startQuery
return (
<Figure>
<Box as="figure" display="block" marginY="1rem">
Copy link
Member

@pettinarip pettinarip Sep 6, 2022

Choose a reason for hiding this comment

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

Suggested change
<Box as="figure" display="block" marginY="1rem">
<Box as="figure" display="block" my={4}>
  • figure is by default block displayed, we can ignore it
  • there is a short version of marginY => my
  • lets try to use the chakra spacing scale. 1 rem = 4 (more about this here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed 👍

Thanks for the link! I looked in our theme and couldn't see spacing. Can I assume we'll be sticking with the default Chakra spacing?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we are going to use the default values. In the Design System too.

Co-authored-by: Pablo Pettinari <pettinarip@gmail.com>
@gatsby-cloud
Copy link

gatsby-cloud bot commented Sep 6, 2022

Gatsby Cloud Build Report

ethereum-org-website-dev

🎉 Your build was successful! See the Deploy preview here.

Build Details

View the build logs here.

🕐 Build time: 17m

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.

🚀

@pettinarip pettinarip merged commit 8018b81 into dev Sep 6, 2022
@pettinarip pettinarip deleted the migrateYouTubeToChakra branch September 6, 2022 17:09
@corwintines corwintines mentioned this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor ♻️ Changes which don't affect functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants