Closed mnorkin closed 11 years ago
Sorting is kind of an interesting problem.
Firstly, we have target price (entry) sorted by date, which are limited to 7 last days.
Then, we also have sorting by features (entry attributes), which is implemented with JavaScript, to free the server from the unnecessary job.
Here's the problem -- what entries to load and how to digest them, then the load_more_targetprices kicks in?
One solution is to load next day target prices and then sort everything with JavaScript again (we have information about 6 days, we load the 7 day information and do sorting again). This requires some additional bumping or some sort of thing for the user, in order to be sure, that he notices the additional entries in the list.
Second solution is to load the entries, which comes next after particular sorting. This method is kind of messy. Firstly, the big probability is that there will be wide spectrum of data already [1](the entries of accuracy varies from 100 to bottom 0). If we would have to load data, based on accuracy sorting, so what comes next after 0? Secondly, there might be a load of old, not relevant data -- after 2013-Apr-01 might load 2012-May-13. Which might kick user out of how displayed data is interconnected.
[1] The wide spectrum of data.
In conclusions, the first method is more appropriate and we will do it as described.
Had a little chat with Project Manager, change of plans.
Load the 5 days of data and do all the operations only with that data.
Switching to compare page and then loading the prices does break the sorting.
Need a solution for this problem.