-
Notifications
You must be signed in to change notification settings - Fork 5k
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(pages): migrate home page to Chakra #9364
refactor(pages): migrate home page to Chakra #9364
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
a9abf69
to
92c0e7f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done @TylerAPfledderer! overall this looks great
src/pages/index.tsx
Outdated
padding: 2rem; | ||
} | ||
` | ||
type ChildOnlyProp = { children: ReactNode } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type looks like a good one to move to src/types.ts
as I image we are going to start using it more often now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pettinarip Would you like to go ahead and move it in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that would be great
p={{ sm: 8, lg: 24 }} | ||
boxSize="full" | ||
> | ||
<SectionHeading fontFamily="inherit" mb={6}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that all of our section headers should not have the margin top in order to have the content correctly centered. Perhaps we can add it directly on the SectionHeading
component as its default.
<SectionHeading fontFamily="inherit" mb={6}> | |
<SectionHeading fontFamily="inherit" mb={6} mt={0}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied directly to the component
src/pages/index.tsx
Outdated
</MainSectionContainer> | ||
{/* Eth Today Section */} | ||
<GrayContainer> | ||
<ContentBox> | ||
<h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use Heading
s for these h2
s
src/pages/index.tsx
Outdated
<StyledContent> | ||
</GrayContainer> | ||
{/* Explore Section */} | ||
<ContentBox> | ||
<h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well. Heading
src/pages/index.tsx
Outdated
<StyledContent> | ||
</GrayContainer> | ||
{/* Explore Section */} | ||
<ContentBox> | ||
<h2> | ||
<Translation id="page-index-touts-header" /> | ||
</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<ButtonLink to="/dapps/?category=technology"> | ||
<Translation id="page-index-internet-button" /> | ||
</ButtonLink> | ||
<StyledButtonLink variant="outline" to="/wallets/"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We missed this button
src/pages/index.tsx
Outdated
{/* Eth Today Section */} | ||
<GrayContainer> | ||
<ContentBox> | ||
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leveraging the SectionHeading
component in replacing the h2
tag that was here and in the next section.
Since mt
, mb
, and fontFamily
are defined in the component and overriding other styles specific to the h2
that are more preferable here, setting the values to undefined
essentially cancels the overrides while still gaining the reuseability of the component.
Is this OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't like it tbh 😄
Lets do this for now. heading
is the old theme font family.
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> | |
<SectionHeading mt={12} mb={8} fontFamily="heading"> |
src/pages/index.tsx
Outdated
padding: 2rem; | ||
} | ||
` | ||
type ChildOnlyProp = { children: ReactNode } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that would be great
src/pages/index.tsx
Outdated
{/* Eth Today Section */} | ||
<GrayContainer> | ||
<ContentBox> | ||
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't like it tbh 😄
Lets do this for now. heading
is the old theme font family.
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> | |
<SectionHeading mt={12} mb={8} fontFamily="heading"> |
src/pages/index.tsx
Outdated
{/* Explore Section */} | ||
<ContentBox> | ||
<Box pb={4}> | ||
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
<SectionHeading mt={undefined} mb={undefined} fontFamily={undefined}> | |
<SectionHeading mt={12} mb={8} fontFamily="heading"> |
@pettinarip we should be good to go! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @TylerAPfledderer
Description
Migrate the Home page to use Chakra UI
Related Issue
#9353