kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Properly handle progress tracking based on scroll in the SafeHTML5Viewer

Open rtibbles opened this issue 3 months ago • 0 comments

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Desired behavior

To have parity of progress tracking with our other document type viewers (e.g. PDF, EPUB), the SafeHTML5Viewer should implement some simple scroll based progress tracking behaviour - so that when a user has scrolled all the way to the bottom of the resource, their progress is marked as finished. The overall progress should be proportional to how far they have scrolled.

In addition, we should pay specific attention to when the article has been scrolled all the way to the end, and emit a finished event when this has happened. The user experience for this is still not ideal for PDFs, but worth looking at the implementation here in case the implementation of progress is similarly tricky: https://github.com/learningequality/kolibri/blob/develop/kolibri/plugins/pdf_viewer/assets/src/views/PdfRendererIndex.vue#L472

Current behavior

Currently we only have a dummy implementation that always returns 0.5 for the progress.

Possible tradeoffs

As we have seen with the PDF viewer progress tracking, user confusion can arise if completion status happens too soon or too late, especially in relation to when the completion modal appears when the viewer is used in the context of learn.

rtibbles avatar Oct 14 '25 15:10 rtibbles