I realized I have to give a shit about possible network latency, so:
Added flag to backend, --slow-network, can only be run in development mode, which will create a fake slow network. This is a base latency + some random initial latency (spotty networks).
Created a module, RequestTracker, which creates a primitive system for keeping track of requests. Added helpers makeSingletonRequest and andFinishRequest for starting/ending requests.
Fixed most areas of the website that had bugs on a slow-network by simply not allowing multiple requests and adding a cursor spinner or other UX to let the user know the request is in progress.
For the browse page, instead of just not allowing multiple requests, we allow multiple search requests but we only care about the results of the most recent request. We also don't allow identical search requests at the same time as per usual. This allows the user to make a search request, and before it returns, realize they want to change the search, and make a new request without having to wait for the last request to finish.
Closes
Closes #165
Description
I realized I have to give a shit about possible network latency, so:
Added flag to backend,
--slow-network
, can only be run in development mode, which will create a fake slow network. This is a base latency + some random initial latency (spotty networks).Created a module,
RequestTracker
, which creates a primitive system for keeping track of requests. Added helpersmakeSingletonRequest
andandFinishRequest
for starting/ending requests.Fixed most areas of the website that had bugs on a
slow-network
by simply not allowing multiple requests and adding a cursor spinner or other UX to let the user know the request is in progress.For the browse page, instead of just not allowing multiple requests, we allow multiple search requests but we only care about the results of the most recent request. We also don't allow identical search requests at the same time as per usual. This allows the user to make a search request, and before it returns, realize they want to change the search, and make a new request without having to wait for the last request to finish.