guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Calculate percentage complete and return in check result #204

Closed rebecca-thompson closed 2 years ago

rebecca-thompson commented 2 years ago

What does this change?

This updates the chunked/streamed response in the Typerighter API to return an indication of what percentage of jobs have been completed in a check request. This percentage is currently calculated on the client-side and by calculating this value on the server we will be able to simplify our client-side code.

How to test

Deploy and run this branch locally and run the accompanying branch in prosemirror-typerighter. You should be able to see the loading bar in the right hand side results panel continue to work as expected.

jonathonherbert commented 2 years ago

Tested locally, works as expected.