I can see both my most recent profits, as well as full profit history, easily
I can better understand what's happening in the game
Discussion
The profits table currently shows ALL profits from milking the cows during the game, which can result in a kind of sloppy user experience, since this table can go on for many more rows that the page design can accomodate.
What we want is to page the profits table in a similar way to how the jobs table is currently paged.
You could use the PagedJobsTable as a model.
What we want is for the user to be able to see the most recent profits at a glance on the main user commons page (for example, perhaps the "n" most recent records, where "n" is a constant defined in the page component, e.g. const PROFIT_PAGE_SIZE=5. )
A paged backend endpoint for profits could be added at
[ ] The play page initially shows only the first page of profits, e.g. only the most recent n profits where n is a constant defined in the code for the play page (e.g. `const PROFIT_PAGE_SIZE=5.)
[ ] The Profits section of the page has page controls to go through profits from earlier.
[ ] It is easy for the user to navigate through their profits and the user interface looks clean.
User Story
Discussion
The profits table currently shows ALL profits from milking the cows during the game, which can result in a kind of sloppy user experience, since this table can go on for many more rows that the page design can accomodate.
What we want is to page the profits table in a similar way to how the jobs table is currently paged.
You could use the
PagedJobsTable
as a model.What we want is for the user to be able to see the most recent profits at a glance on the main user commons page (for example, perhaps the "n" most recent records, where "n" is a constant defined in the page component, e.g.
const PROFIT_PAGE_SIZE=5
. )A paged backend endpoint for profits could be added at
Then components to go forward and backwards through the pages can be added.
Note that the buttons in
PagedJobsTable
were a quick attempt at building an MVP, but since then we've discovered that React Bootstrap has components just for this purpose: see https://react-bootstrap.netlify.app/docs/components/paginationYou are encouraged to use those.
Acceptance Criteria
n
profits wheren
is a constant defined in the code for the play page (e.g. `const PROFIT_PAGE_SIZE=5.)