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: Migrate StablecoinAccordion to Chakra UI #9004

Conversation

TylerAPfledderer
Copy link
Contributor

Description

Migrate component to Chakra UI

Related Issue

#8632

@gatsby-cloud
Copy link

gatsby-cloud bot commented Dec 24, 2022

✅ ethereum-org-website-dev deploy preview ready

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.

This looks fantastic @TylerAPfledderer nice break out & simplification of this component.

I left a couple of questions/requests. LMK what do you think.

@@ -0,0 +1,311 @@
import { useStaticQuery, graphql } from "gatsby"
Copy link
Member

Choose a reason for hiding this comment

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

For consistency, lets keep using camelCase names. This file should be named useStablecoinAccordion.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You got it!

The Trilemma component would need an update with its similar file.

Copy link
Member

Choose a reason for hiding this comment

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

Oh did't see that one. Good catch, yea. Will do a quick refactor.

reduceMotion
>
<AccordionCustomItem category="dapps">
{({ LeftColumnPanel, RightColumnPanel }) => (
Copy link
Member

Choose a reason for hiding this comment

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

Wondering why you have chosen this approach instead of just define those components in this file as you did with StepBoxContainer for example.

I mean, why we can't just define

const LeftColumnPanel = (props: ChildOnlyType & Partial<BoxProps>) => ();
const RightColumnPanel = (props: ChildOnlyType) => ();

in this file?

I think that if there is no special reason, this would simplify the structure of the component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pettinarip it was an approach to contain these to components within AccordionCustomItem, but I can understand the inconsistency you describe here.

No reason not to use the panel components directly instead of through a child function. I'll go ahead and make the change. 😄

Copy link
Member

Choose a reason for hiding this comment

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

Cool. Yea, this is just a minor comment but I think simplicity will make it more readable for other devs. Thanks for doing that.

@TylerAPfledderer
Copy link
Contributor Author

@pettinarip applied your change requests for re-review. 🤘🏼

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.

This is greaaaat! eager to see those .stories in the folder 😬

@pettinarip pettinarip merged commit 84b42dd into ethereum:dev Jan 13, 2023
@TylerAPfledderer TylerAPfledderer deleted the refactor/stablecoinaccordion-to-chakra branch January 13, 2023 19:17
@corwintines corwintines mentioned this pull request Jan 16, 2023
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.

None yet

2 participants