Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

[order table] Partial Fills table (BASE BRANCH) #412

Merged
merged 13 commits into from
Apr 13, 2023

Conversation

anxolin
Copy link
Contributor

@anxolin anxolin commented Mar 30, 2023

Summary

Recreates #251 after rebasing it with the latest from develop.

🚨 LETS USE THIS BRANCH AS BASE 🚨
We can fix small things in this branch by creating other PRS against it.

WIP DEMO: https://explorer-dev-git-partial-fills-table-cowswap.vercel.app/goerli/orders/0x76cb4b2ac25690664ccb2967b5322f17e1d966e31b205cf86a2b1956bf2f5e54dbc682d0ec19bd276fd6c2af4e0189b584bb31e164258bb1?tab=overview

Once it's decent, we can merge.

@vercel
Copy link

vercel bot commented Mar 30, 2023

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

Name Status Preview Comments Updated (UTC)
explorer-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback

📖 Storybook ↗︎

@anxolin anxolin added the DONT_MERGE Indicates the PR should not be merged. Probably a WIP or PoC. label Mar 30, 2023
@coveralls
Copy link

coveralls commented Mar 30, 2023

Pull Request Test Coverage Report for Build 4690239573

  • 11 of 16 (68.75%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.6%) to 61.543%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils/operator.ts 6 11 54.55%
Files with Coverage Reduction New Missed Lines %
src/utils/operator.ts 1 74.77%
Totals Coverage Status
Change from base Build 4656565407: 0.6%
Covered Lines: 872
Relevant Lines: 1231

💛 - Coveralls

@anxolin anxolin mentioned this pull request Mar 30, 2023
* Fix error displaying 0% and 100%

* Add testing for formatting function

* Rmove helper function
* Refactoring to make the code unambiguous and reduced lines of code 38->12

* Fixed displaying of order assets info in <FilledProgress/>

* Fixed layout for FillsTable component

1. Added <TokenAmount> component for buy/sell/execution amounts. It helps to display them shorter
2. Fixed displaying of "View batch graph" button, it was too big for mobile view
3. Fixed global layout (in MainWrapper) to fix page with in mobile view. Warning! This change might brake smth in other pages

* Fixed filled progress width for DetailsTable in mobile view

* Execution price calculation for Fills table

* Added invert button for mobile layout

* isPriceInverted

* Execution time for trades table (#425)

* Execution time for trades table

* TradesTimestamps type

* Fix type

* Fix type

* Cache for fetchTradesTimestamps()

* Fixed blinking of fills table

isFirstLoading - seems to be excessive, because we should display loader only once at start and areTokensLoaded is enough

* Fixed lint errors and remove node version restriction

* Rollback node restriction

* Changed isLoading flag meaning in useOrderTrades()

Now it actually means isFirstLoading

* Fix lint errors (#426)
Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

The comment is a note to self, I'll address it

@alfetopito alfetopito removed the DONT_MERGE Indicates the PR should not be merged. Probably a WIP or PoC. label Apr 10, 2023
* Removed old placeholder

* Fixed txhash for fill or kill orders

* Do not mutate original obj
* Do not show fills tab for fill or kill orders

* Hide fills button

* Do not show fills tab for orders with single fills

* Do not show fills tab if there are no trades

* Moved fills button display logic to parent component

* Show tx hash for partial fills with single fill

* Updated label to be explicit about partial fills

* Fixed storybook

* Consistently using the same rule for displaying the fills tab, button and tx hash row:

When there are 2 trades or more, show fills tab and button, and hide tx hash row

* Do not show fills tab if there are no trades 🤦
* Added new component SurplusComponent

* Added calculation for trade surplus getTradeSurplus

* Added surplus to fills table

* Refactored OrderSurplusDisplay to use SurplusComponent

* Fixed issue with surplus tooltip

* Removed buy amount value by mistake 😅
* Inverted sell amount and buy amount positions on fills table

* Removed batch viewer link column from fills tab

* Moved surplus column to after buy amount on fills tab

* Added total surplus to fills table

* Removed `of <total amount>` from filled progress

* Partial fills table styling (#443)

* partial fills table styling

* partial fills table styling

* conditional lineBreak for filled amount

* Table header arrow wrap

* fix arrow green

* add surplus green icon to fills

* remove bottom border

* remove bottom border

* fix top padding sticky cards

* revert button wrapping

---------

Co-authored-by: fairlight <[email protected]>
@alfetopito alfetopito marked this pull request as ready for review April 13, 2023 14:40
@alfetopito alfetopito merged commit 230a3fe into develop Apr 13, 2023
@alfetopito alfetopito deleted the partial-fills-table branch April 13, 2023 14:56
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.

6 participants