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: decompose OrderRow component #5335

Merged
merged 8 commits into from
Jan 24, 2025

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Jan 24, 2025

Summary

Please, review this PR commit by commit.

  1. Moved OrderRow to containers since this component became complex enough and it doesn't make sense to pass all the required data through props. It's just a relocation, no real changes right now, I will do it in the next PRs.
  2. Extract utils, hooks and pure components from OrderRow
  3. Removed excessive showIcon prop from WarningTooltip

The goal of the refactoring is to get rid of excessive rerenders.
Main cause of them is a lot of count of function that renders separate UI, like here.

To Test

No need to test now, since this is not final refactoring PR.

@shoom3301 shoom3301 requested a review from a team January 24, 2025 09:20
@shoom3301 shoom3301 self-assigned this Jan 24, 2025
Copy link

vercel bot commented Jan 24, 2025

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

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am
cowfi ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am
explorer-dev ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am
sdk-tools ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am
swap-dev ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am
widget-configurator ✅ Ready (Inspect) Visit Preview Jan 24, 2025 9:33am

@shoom3301 shoom3301 merged commit 220d233 into feat/limit-ui-upgrade Jan 24, 2025
12 of 13 checks passed
@shoom3301 shoom3301 deleted the feat/refactor-order-row branch January 24, 2025 10:52
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2025
@anxolin anxolin restored the feat/refactor-order-row branch January 24, 2025 11:12
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

👍

{...props}
/>
)

const renderLimitPrice = () => (
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove renderWarningEstimatedPrice too?

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

Reviewed the commits, it looks great to me.

@alfetopito alfetopito deleted the feat/refactor-order-row branch January 29, 2025 08:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants