Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Read percentage complete from Typerighter API response when available #233

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

rebecca-thompson
Copy link
Contributor

@rebecca-thompson rebecca-thompson commented Sep 23, 2022

What does this change?

This reads an optional parameter returned by the Typerighter API which indicates what percentage of a request has been completed in the streamed/chunked response. There is currently a lot of logic in this project which calculates the percentage remaining based on the number of processed vs inflight requests. The ultimate goal is that a lot of that code will be able to be removed once we move over to using the chunked Typerighter Adapter.

How to test

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

Copy link
Contributor

@jonathonherbert jonathonherbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the review of guardian/typerighter#204, I haven't been able to exercise this, but code looks good 👍

src/ts/state/reducer.ts Outdated Show resolved Hide resolved
@jonathonherbert
Copy link
Contributor

Tested locally, works as expected.

Co-authored-by: Jonathon Herbert <jonathon.herbert@guardian.co.uk>
@rebecca-thompson rebecca-thompson merged commit f598027 into main Sep 26, 2022
@rebecca-thompson rebecca-thompson deleted the bt/read-percentage-complete branch September 26, 2022 09:40
@github-actions
Copy link

🎉 This PR is included in version 5.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants