You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the voting delegates too much work to the client, sends a lot of useless data and exposes too many details. In fact, it sends back to the client the full list of all votes with user ids and +/- status to allow UI handle voting status, colors and so on. Such a list can be huge and we had to restrict maximum size (see #207).
The response (i.e. Comment) can be simplified by stripping votes map completely and replacing it by singular vote field indication +/- for the current user.
@igoradamenko & @Reeywhaar - do you see any potential problem I can cause to UI by making the change? Sure, it will need adjustment to read vote status, but to me, it sounds like a trivial change and even simplification of UI logic.
The text was updated successfully, but these errors were encountered:
I've thought recently that it possible for a user to find who up/downvoted them by looking at response and matching user id's. I think, yes, {vote: {score: number, delta: -1/0/+1}} value is enough to handle voting.
@Reeywhaar - I have a functional version in vote branch with votes field stripped and new vote =1,-1,0 added
I can't merge it to master because it will break voting on UI side, but you may add your PR and test with vote branch. We have to release both at the same time.
The current implementation of the voting delegates too much work to the client, sends a lot of useless data and exposes too many details. In fact, it sends back to the client the full list of all votes with user ids and +/- status to allow UI handle voting status, colors and so on. Such a list can be huge and we had to restrict maximum size (see #207).
The response (i.e. Comment) can be simplified by stripping
votes
map completely and replacing it by singularvote
field indication +/- for the current user.@igoradamenko & @Reeywhaar - do you see any potential problem I can cause to UI by making the change? Sure, it will need adjustment to read
vote
status, but to me, it sounds like a trivial change and even simplification of UI logic.The text was updated successfully, but these errors were encountered: