Skip to content

Conversation

@TylerAPfledderer
Copy link
Contributor

Description

Migrate Footer component to Chakra

Related Issue

#6374


const isPageRightToLeft = isLangRightToLeft(intl.locale as Lang)

const [smallBp] = useToken("breakpoints", ["sm"])
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Nov 5, 2022

Choose a reason for hiding this comment

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

See comment below at line 328

Comment on lines 328 to 338
sx={{
"@media (max-width: 1300px)": {
gridTemplateColumns: "repeat(3, auto)",
},
[`@media (max-width: ${smallBp})`]: {
gridTemplateColumns: "repeat(2, auto)",
},
"@media (max-width: 500px)": {
gridTemplateColumns: "auto",
},
}}
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Nov 5, 2022

Choose a reason for hiding this comment

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

Because some of the breakpoints used are not part of the theme config, there is not a concise way in handling the change of value in Chakra.

useToken at line 60 is used to retrieve the correct breakpoint value for sm so it can be interpolated here.

Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer left a comment

Choose a reason for hiding this comment

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

Providing various comments

const SocialIcons = styled.div`
margin: 1rem 0;
`
const SocialIcon = styled(Icon)`
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Nov 5, 2022

Choose a reason for hiding this comment

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

SocialIcon was unused and therefore not kept in the migration

@gatsby-cloud
Copy link

gatsby-cloud bot commented Nov 5, 2022

✅ ethereum-org-website-dev deploy preview ready

@minimalsm
Copy link
Contributor

Thanks for the PR @TylerAPfledderer :-) we'll try to get to reviewing this soon.

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.

Nice job @TylerAPfledderer.

For some reason, I don't see the little arrows on the external links. I couldn't realize yet why it is happening. Could take a closer look later if you can't figure it out.
image


const isPageRightToLeft = isLangRightToLeft(intl.locale as Lang)

const [smallBp] = useToken("breakpoints", ["sm"])
Copy link
Member

Choose a reason for hiding this comment

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

I agree with this but I think this should be md instead of sm

Suggested change
const [smallBp] = useToken("breakpoints", ["sm"])
const [mediumBp] = useToken("breakpoints", ["md"])

@TylerAPfledderer
Copy link
Contributor Author

Nice job @TylerAPfledderer.

For some reason, I don't see the little arrows on the external links. I couldn't realize yet why it is happening. Could take a closer look later if you can't figure it out.
image

@pettinarip I did notice that and wonder if it's something that only appears during build. I never checked that out but will take a look asap! 😄

Comment on lines -76 to -78
&:after {
color: ${(props) => props.theme.colors.text200};
}
Copy link
Contributor Author

@TylerAPfledderer TylerAPfledderer Nov 10, 2022

Choose a reason for hiding this comment

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

@pettinarip This was the culprit to the missing external icons when applied with Chakra. The object created with the __after prop on the Link component was overriding the styling applied within the component

This wasn't needed anyway because the pseudo inherits color from the parent element.

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.

That's awesome @TylerAPfledderer thanks for looking into that problem with the arrow as well :)

@pettinarip pettinarip merged commit 93f6d7d into ethereum:dev Nov 18, 2022
@pettinarip pettinarip mentioned this pull request Nov 18, 2022
80 tasks
@TylerAPfledderer TylerAPfledderer deleted the feat/footer-to-chakra branch November 18, 2022 22:43
@corwintines corwintines mentioned this pull request Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants