vegaprotocol / frontend-monorepo

Toolkit for building apps that interact with Vega
https://vega.xyz
MIT License
24 stars 15 forks source link

Filtering and sorting for ledger entries does not work #2818

Closed candida-d closed 1 year ago

candida-d commented 1 year ago

Description

Ledger entries provide a lot of data. The filtering doesn't seem to work, and thus the table is pretty much unusable for an LP or any other user that will have created lots of data.

Additionally the ledger entry table does not have a date range applied by default.. It should to avoid a huge data set and/or possibly very long wait for data.

Raised on behalf of an LP

Steps to Reproduce

  1. Place a lot of orders
  2. Click on Portfolio > Ledger entries
  3. Choose the filter option
  4. See that the results don't change

Screen recording

https://user-images.githubusercontent.com/62548908/216098795-c9e40321-e88c-4edd-9974-274ea3405b66.mov

macqbat commented 1 year ago

would be nice to have this one done https://github.com/vegaprotocol/vega/issues/7339

mattrussell36 commented 1 year ago

Lets just limit the query using date range filter (with a default of 7 days) and filter and sort client side only. Lets also add a max date range of 30 days.

macqbat commented 1 year ago

We implemented here a single query instead infinite model - one bigger request (for max 5000 entries) provides data for review it by the user. The request has default range last 7 days. The earliest data a user can query is 30 days ago. The max range of time a user can query is 7 days. Min and max date in date pickers will be limited acording to rules above. Sorting by column works on existing set of data on client side as well as filtering by accounts type. Filtering by date range works on server side (due to querying server with given range parameters).