-
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
refactor(Hero): sync styles to latest DS #12875
refactor(Hero): sync styles to latest DS #12875
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
parameters: { | ||
// Set asPath in mock router so the Breadcrums component can render | ||
// the "home" text with correct translation | ||
nextjs: { | ||
router: { | ||
asPath: "/en", | ||
}, | ||
}, | ||
}, |
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.
A good to know here, as this is integrated into Storybook with NextJS.
https://storybook.js.org/blog/integrate-nextjs-and-storybook-automatically/#nextrouter
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.
Aha! interesting. Thanks
render: () => { | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
const { t } = useTranslation("page-learn") | ||
const { t } = getI18n() |
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.
Using this method is better here, so there are no errors/warnings of a hook being used outside of a component.
Though you have to specify the namespace when calling t
on each instance, unless you make a middleman function.
d829ccd
to
f30f775
Compare
@coderabbitai review |
WalkthroughThis update involves significant changes across various hero components, focusing on improving responsiveness and language translation handling. The alterations include switching from horizontal to vertical stacking in response to screen size, updating translation management from Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
6954446
to
03c6333
Compare
Thanks @TylerAPfledderer! Looks good at first glance, assigning to @nloureiro for design eyes |
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.
Nice @TylerAPfledderer. Left a few questions but its looking good.
parameters: { | ||
// Set asPath in mock router so the Breadcrums component can render | ||
// the "home" text with correct translation | ||
nextjs: { | ||
router: { | ||
asPath: "/en", | ||
}, | ||
}, | ||
}, |
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.
Aha! interesting. Thanks
Looking great! I see one conflict, and some resolved conversations after the last review... @TylerAPfledderer If you get a chance to clear the conflicts, and @pettinarip if things look good I'd say go ahead and pull in |
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.
Nice job @TylerAPfledderer
Updates the Hero components so they match the latest DS changes.
Depends on #12853 to complete the sync
Summary by CodeRabbit
New Features
ContentHero
component for better translation handling.ContentHero
andHomeHero
components to adapt better on different screen sizes.HubHero
component for improved user interaction.Refactor
ContentHero
,HomeHero
, andHubHero
for enhanced responsiveness and maintainability.Style
HomeHero
component to improve visual appeal on various devices.