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

PDF resource completion #8868

Closed
radinamatic opened this issue Dec 8, 2021 · 9 comments · Fixed by #8937
Closed

PDF resource completion #8868

radinamatic opened this issue Dec 8, 2021 · 9 comments · Fixed by #8937
Assignees
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) OS: Android P1 - important Priority: High impact on UX TAG: regression Something that previously worked

Comments

@radinamatic
Copy link
Member

radinamatic commented Dec 8, 2021

Observed behavior

It does not seem possible to achieve completion on any PDF file, no matter how short they are, or time learner spends with the resource. I added 3 more short PDF files (3-9 pages) to the QA channel, but it seems impossible to complete them.

Errors and logs

Expected behavior

Ability to complete PDF resources.

User-facing consequences

...

Steps to reproduce

...

Context

  • Kolibri version: 0.15.0b3
  • Operating system: Android 8.0 and 9.0
  • Browser: -

cc @marcellamaki @rtibbles

@radinamatic radinamatic added P1 - important Priority: High impact on UX OS: Android TAG: regression Something that previously worked APP: Learn Re: Learn App (content, quizzes, lessons, etc.) labels Dec 8, 2021
@radinamatic radinamatic added this to the 0.15.0 milestone Dec 8, 2021
@sairina sairina self-assigned this Dec 9, 2021
@sairina
Copy link
Contributor

sairina commented Dec 9, 2021

Additional issues noted with the PDF resource completion:

  • The PDF renderer is not registering the first page of the PDF as being visited (unless a user stops scrolling at some point on the first page)
  • The content card does not register immediately (or sometimes too quickly) that the PDF has been completed. The progress bar is still there even when the user has completed the PDF in the renderer and points have been awarded.

@pcenov
Copy link
Member

pcenov commented Dec 14, 2021

Just adding a note here that I'm managing to 'hack' the pdf completion by first decreasing the size of the pdf pages and then increasing it up to about 150% percent and slowly scrolling down. Not sure why that works but it sure does so adding it here as an additional clue...

@jamalex
Copy link
Member

jamalex commented Feb 16, 2022

I'm still seeing some version of this on 0.15.1 -- pages that I spend time on and scroll back and forth past still often don't get marked as completed. Context: https://kolibri-demo.learningequality.org/en/learn/#/topics/c/57bc2d771781589fb353abc14964ad91?lessonId=461fd0c27110982efc30768d55a0ff84&classId=4d3ff8ff23e47585c6cee4d7460aa48b&last=LESSON_PLAYLIST

@jamalex jamalex reopened this Feb 16, 2022
@akash5100
Copy link
Contributor

Hey @radinamatic, I have worked in the past with pdf rendering. So I feel I could help with some pdf-related issues. Any pointers on how to get started?

@marcellamaki marcellamaki modified the milestones: 0.15.0, 0.15.3 Mar 3, 2022
@sairina
Copy link
Contributor

sairina commented Mar 3, 2022

Hi @akash5100 , would love it if you could take a look at this issue. Some of the original glitches seemed to have been fixed, but as you can see, there seems to still be bugginess in trying to track completion. In this PR, you'll find some of the files that are relevant to this issue, particularly in the useProgressTracking composable.

@akash5100
Copy link
Contributor

Hi, @sairina thank you for the reply. With the help of that I went through the issue, and it's a bit confusing :)

When I tried to read pdf's in the development server I found that on the top the icon "in progress" doesn't change to "complete", which happens in your PR (when you finished reading the pdf). So is this the issue here? (can I get any more details?)

Can you tell me how the files under __test__ are executed like you did here (should I make changes under __test__ dir? )

@sairina
Copy link
Contributor

sairina commented Mar 7, 2022

Oof, that's so unfortunate!

I just pulled that branch and it seemed to be that I was able to get the icon to change, so that is strange 🤔 . However, a lot has changed in the code since then (I think including dependencies), so it's possible that this is no longer working OR that my original fix was not the right fix - also highly possible.

To run tests, we use yarn run test-jest [file_name]. If you want to add tests to that component, you can just add them to the test file and they will get run.

@radinamatic, would you mind testing this issue again and seeing exactly what the problems are? I think that will help us better define the problem.

@sairina
Copy link
Contributor

sairina commented Mar 7, 2022

@akash5100 I did a quick run-through of the typical user workflow for reading a PDF on the release-v0.15.x branch, and this is what I found to be the current problem:

  • If a user clicks on a PDF resource and starts reading, progress is being tracked, but there is no longer any visual indication in the component (the icon - ProgressIcon - in the bar at the top of the page -LearningActivityBar - is not updating)
  • However, when the user is back on the TopicsPage (the page with all the content cards), the progress bar does show progress.
  • If the user than clicks back into that PDF from the content card, you will see the ProgressIcon appropriately indicating that it is in progress, and it will correctly turn to "complete" when all the pages in the PDF have been viewed both in the activity bar at the top of the page and back on the content card.

Hope that helps at least for you to get started - let me know if you're seeing a different issue pop up as you investigate this more closely.

@rtibbles
Copy link
Member

Fixed in #9776

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) OS: Android P1 - important Priority: High impact on UX TAG: regression Something that previously worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants