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

feat: clear order selection on change tabs #5286

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

fairlighteth
Copy link
Contributor

@fairlighteth fairlighteth commented Jan 14, 2025

Summary

  • clear order selection on change tabs
  • TWAP order statuses

Copy link

vercel bot commented Jan 14, 2025

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

Name Status Preview Updated (UTC)
cosmos 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm
cowfi 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm
explorer-dev 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm
sdk-tools 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm
swap-dev 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm
widget-configurator 🔄 Building (Inspect) Visit Preview Jan 16, 2025 3:48pm

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Thanks!

(child.orderParams?.hasEnoughBalance === false || child.orderParams?.hasEnoughAllowance === false) &&
(child.order.status === OrderStatus.PENDING || child.order.status === OrderStatus.SCHEDULED),
)
: null
Copy link
Contributor

@anxolin anxolin Jan 14, 2025

Choose a reason for hiding this comment

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

looks like there's repetition here. Isn't this the same as hasChildWithWarning? so:

const hasChildWithWarning = !!childWithWarning

@anxolin anxolin self-requested a review January 14, 2025 16:25
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.

The title of the PR made me thing the PR is smaller

// At least one part is open
if (hasOpen) {
return TwapOrderStatus.Pending
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is right, but double checking that if I have

  • P1: Filled
  • P2: Pending

I want to show OPEN and not PARTIALLY_FILLED?


// Some filled + some expired/cancelled
if (hasFilled && (hasExpired || hasCancelled)) {
return TwapOrderStatus.Fulfilled // Partially filled is considered Fulfilled for display
Copy link
Contributor

Choose a reason for hiding this comment

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

Partially filled is considered Fulfilled for display

why, i didn't get this. This is not what we show in the explorer. I would think this is also not what we show in limit orders table

}

// Mixed cancelled & expired only (no fills)
if (hasCancelled && hasExpired && !hasFilled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why the hasExpired?

If we cancel and is not expired, we need to see Cancelled, no?

@anxolin anxolin self-requested a review January 14, 2025 16:29
@anxolin
Copy link
Contributor

anxolin commented Jan 14, 2025

Regarding the design, imo, we should not put in the same column the status and the parts. Why not keeping them in separate columns?

Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

Hey @fairlighteth , great, thank you!
As @anxolin suggests, I'd also split columns for parts and statuses displaying. At least. to avoid these issues (see the images):
responsive
separate

@elena-zh elena-zh self-requested a review January 15, 2025 15:45
@elena-zh
Copy link

Hey @fairlighteth , great, thank you! As @anxolin suggests, I'd also split columns for parts and statuses displaying. At least. to avoid these issues (see the images): responsive separate

Addressed in #5296

Base automatically changed from feat/limit-ui-upgrade-5 to feat/limit-ui-upgrade-2 January 16, 2025 15:45
@alfetopito alfetopito force-pushed the feat/limit-ui-upgrade-6 branch from de27601 to 3b1038d Compare January 16, 2025 15:48
@alfetopito
Copy link
Collaborator

@fairlighteth consolidating to parent, please address @anxolin 's comments in a follow up PR

@alfetopito alfetopito merged commit 23c92f5 into feat/limit-ui-upgrade-2 Jan 16, 2025
4 of 11 checks passed
@alfetopito alfetopito deleted the feat/limit-ui-upgrade-6 branch January 16, 2025 15:50
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants