Open hudson-newey opened 3 months ago
I think now that we have a more concrete idea of "actions that need to be completed to advance", we don't need to do anything special about page sizes.
I.e. if page size changes and we end up rendering a partial page of verified and unverified items, it doesn't matter. All the logic for when to advance (has each item has all necessary actions applied?) remains the same..
I'm not sure about your rules, clarify for me?
If the renderHead >= verificationHead, then the renderHead should not change
Why? Users can page forward? That's one of the feature requests
If the renderHead < verificationHead, then the renderHead should move back by the change delta.
If I understand your intent, I think this is better expressed as:
renderHead < verificationHead
then fetch a page starting at index renderHead - pageSize
, else fetch a page be doing renderHead + pageSize
. That way we're always fetching pages either side of the zero point.The two statements
If the renderHead >= verificationHead, then the renderHead should not change
If the renderHead < verificationHead, then the renderHead should move back by the change delta. This is so that if you are on the first page of history, and change the grid size you get more items from history (instead of seeing unverified items)
Are trying to address what would happen if the user changes their screen size while viewing history.
I think you summarized it succinctly as
If
renderHead < verificationHead
then fetch a page starting at indexrenderHead - pageSize
, else fetch a page be doingrenderHead + pageSize
. That way we're always fetching pages either side of the zero point.
I.e. if page size changes and we end up rendering a partial page of verified and unverified items, it doesn't matter. All the logic for when to advance (has each item has all necessary actions applied?) remains the same..
This will definitely be easier to implement, so (as a developer) I definitely prefer it.
(as a user) it's not how I initially expected it to work. In my mind, if I press the "previous page" button, I should only see previous items until I press a "Continue Verifying", "Jump to Unverified", or press "Next Page" until I find the page I was up to.
Raven supports changing the grid size and viewing history, so I wonder what precedence they have set?
At the moment we have two buffers for incoming subjects (in the data-source), and subjects with a decision (in the verification-grid).
This no longer makes sense, and we should instead use a single buffer with a
verificationHead
andrenderHead
.The verification head should only ever increase. Representing where the user has applied decisions up to.
The
renderHead
can be used to indicate what items are being rendered (moving this head back in the buffer will start viewing history).Notes to implementer
~Make sure that changing grid size is handled correctly~
renderHead
>=verificationHead
, then therenderHead
should not change~renderHead
<verificationHead
, then therenderHead
should move back by the change delta. This is so that if you are on the first page of history, and change the grid size you get more items from history (instead of seeing unverified items)~