-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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(Hero): create multiple hero components for new DS #11132
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
@nloureiro any update with Hub hero illustrations? |
for the new illustration? we might still be one week from getting the first one. are these new illustrations blocking you from any developments? |
@nloureiro not a blocker here. I was thinking of just keeping this in draft until they become available. Also keeping it in draft because there is also another primitive component from the DS still missing for this (Big Numbers component for content hero) If you don't want to wait on the illustrations, then maybe when ready can mark the Hero components as "offline" so they are not used for prod until all assets are available? |
Oh, the big numbers. I'll be sure to look into it. regarding the rest, I wanted to have everything ready and tested before we have the illustrations. I sense we need some design adjustments, and I wanted to do it on the browser. Thank you for your help :) |
@nloureiro I went ahead and switched to "Ready for Review" :) |
Looks great! I approve it on Chromatic, I wonder if that leads to an approval here on the PR itself. One last thing that I wanted to test is on an actual page. Thank you |
@nloureiro the approval you made was through the "UI Review" check on here, which did update. "UI Tests" remains pending. I can update the learning page using the Eth2 Illustration |
got, just approve it Yes, great, we can use the Eth2 illustrations for testing purposes. Thank you!!! |
@nloureiro updated the Learning Hub Page |
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.
Good job @TylerAPfledderer
Is this ready for review? as I see in the comments that you changed it bc you needed the preview deploy for testing purposes. You are also probably waiting for #11133 to be merged (will be soon).
docs/ds-implementation.md
Outdated
└── ComponentA/ | ||
├── index.tsx | ||
├── ComponentA.stories.tsx | ||
└── // Any other files as applicable (utils, child components, useHook, etc.) |
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 guess this autoformat was triggered when dev was merged to update the branch. Lets revert this changes as this format is wrong.
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 Darnit. Every time I try to save the changes locally, it wants to fix the formatting. -_-
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, I think is because it is coming as a new/modified file when you update the branch with dev (that is caught by prettier). Shouldn't happen in the upcoming PRs you make.
There is GatsbyImage as well as getting the Big Numbers component online too. I don't see the latter being a blocker if that can be added in a future PR, if currently these heroes are only to be tested in preview and Storybook and not yet deployed to prod. |
Got it. FYI #11133 is merged 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.
Beautiful!
Looking great @TylerAPfledderer.
I think we should also add a components/Hero/index.ts
file to export all the nested hero components, as we are doing in other places, to be consistent and have better autocomplete dx when importing.
src/components/Hero/CallToAction.tsx
Outdated
import * as React from "react" | ||
import Button, { IProps as ButtonProps } from "../Button" | ||
import { MatomoEventOptions, trackCustomEvent } from "../../utils/matomo" | ||
import { ReactNode } from "react" |
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.
import order
* let the parent handle the spacing. | ||
* | ||
* This change would be done when the component is applied | ||
* to prod. |
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.
yes please
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'd work this out in a separate PR, of course 😅
*/} | ||
<Breadcrumbs slug={breadcrumbSlug} mb="0" /> | ||
<Stack spacing="6"> | ||
<Heading size="2xl">{header}</Heading> |
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.
IMO this should be an h1
as there is no other heading in this hero.
|
||
interface MdxHeroProps { | ||
breadcrumbs: BreadcrumbsProps | ||
headingTitle: string |
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.
To be consistent with the rest
headingTitle: string | |
title: string |
import { CommonHeroProps } from "../utils" | ||
|
||
export interface ContentHeroProps extends CommonHeroProps { | ||
breadcrumbSlug: BreadcrumbsProps["slug"] |
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.
To be consistent with the MdxHero api, I'd call this breadcrumb
and accept any breadcrumb prop.
// and then just
<Breadcrumbs {...breadcrumbs} />
we have the final image for the learning hub |
@nloureiro Or just keep the updated learning hub page only for prod with the new hero component and this new image? |
I'm not sure if I understand, but what I have in mind is to publish just this hero now. does it make sense? |
@nloureiro got it! Will get to updating the image 🤘 |
Merged |
@TylerAPfledderer did you fix the spacing bug on mobile? I think was the only blocker a few weeks ago. |
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 took another look at this and everything looks good 👍🏼
Once we add that new image I think we are ready to go!
Yep, I can go ahead and make that adjustment here! |
@nloureiro @pettinarip added the newest image for the learning hub and applied the spacing beneath the hero for that page. After updating the branch with the latest Also with the spacing issue in mobile: since it also showing in current prod, I would like to know if the spacing I applied is enough; I could not find a reference to work with. |
@TylerAPfledderer can you change the raw image to this one @konopkja noticed that it is a bit blur(ish) on the browser, and he was right, after comparing it to the original one. Can it be the compression code that scales down the image and makes it blurry? Let's try with a new PNG that I exported from Photoshop with more detail on it to see if it still happens Thank you |
@nloureiro I added in that updated image file. I do see an improvement. Currently we have a graphQL query that maxes the image to 1504px wide with max quality for a constrained layout. |
yes, indeed it looks better! and, are adopting to better resolution screens, like 2x and 3x, using this script? |
This was something in place before I touched anything.
Now this will be different for a page like the home page, where the image will always span the width of the screen, meaning that the original image size is the maximum generated and loaded to the page. Aspect ratio is maintained. I don't think it is altering the image like 3x or 2x resolution. |
✅ Deploy Preview for ethereumorg ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
🚢 🚢 🚢 !!
Description
Adds a new set of Hero components per DS.
Related Issue
Closes #10753
Part of Implementation of DS v1 #9548