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

Major refactor #272

Merged
merged 30 commits into from
Nov 16, 2023
Merged

Major refactor #272

merged 30 commits into from
Nov 16, 2023

Conversation

0xfirefist
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Nov 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2023 6:59pm
staking-devnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 16, 2023 6:59pm

Copy link
Collaborator

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

The component extraction part looks good to me. I don't really understand the query client stuff though, and I don't want to approve this without understanding that as I think there's some potential for weird caching behavior.

isActionDisabled: boolean | undefined
actionLabel: string
}
export function BasePanel({
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: imo this isn't a great abstraction because it's pretty inflexible. It's hard to customize the panels using this component to be slightly different from each other.

I wouldn't worry about changing that in this PR though. if someone wants more customizability later, they can copy/paste this code into the other panel component.

Copy link
Collaborator

Choose a reason for hiding this comment

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

(a better abstraction would be more composable. An example here would be to make a component for the token input with the half/max buttons and the input text. If you had a couple of those little components, it would be easy to specify the LockPanel etc using a small number of lines of code, and it would also be more flexible in case you wanted to vary the appearances of those panels)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am going to address this in future. Prioritising other things over this.

@0xfirefist 0xfirefist merged commit 49926c2 into main Nov 16, 2023
@0xfirefist 0xfirefist deleted the refactor branch November 16, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants