tunapanda / funzo-app

Cordova app running ember and h5p
2 stars 3 forks source link

Book navigation improvements #97

Closed Jakeii closed 8 years ago

Jakeii commented 8 years ago

Improves the reliability of tapping/swiping around the book, as it seemed pretty unreliable.

Now it records all the section locations, and uses them for navigation, and keeps track of what section is actually visible at the moment.

There's also a disabled feature to hide sections that aren't visible, as it improves performance on some devices, but its still a WIP.

usernamenumber commented 8 years ago

Tested. I think we can can merge this if it will take more than a day or two to to : mprove, but I do see two problems:

First, the time between tapping the book and seeing content is around 7 seconds, so we should either decrease that wait or ensure that a wait scre reen or pulser displays during it.

Second, once you are in the book, it starts out off by about 1.25 pages. The screenshot below shows the first thing I saw: screenshot_2016-08-10-23-13-22

So others can be sure they're using the same code I am, I have pushed a branch with my merge of 94, 96, and 97 into master as https://github.com/tunapanda/funzo-app/tree/merge_949697

If no one can fix the page issue in a day or two, I think the improvements are big enough to go ahead and merge them anyway (though of course fixing would be great!)

Jakeii commented 8 years ago

@usernamenumber managed to fix the initial scroll position.

RE start up time (especially on mobile) I did some profiling and most of it is going to decrypting the book, and it's blocking the main thread so the loader spinner that should display isn't shown.

Only way to resolve would be to cache the decrypted book somehow, or perhaps looking to web workers for this?

usernamenumber commented 8 years ago

I think we definitely should not cache the unencrypted book. IMO this is another argument for only decrypting/loading sections N-1, N, and N+1 (or something like that) at any given time, rather than the entire book, which isn't a scalable solution so we're going to need to revise it anyway as people start using the platform for longer books and courses.

In the mean-time, is it possible to transition to the spinner and then start the decryption from there?

On Thursday, August 11, 2016, Jake Lee Kennedy notifications@github.com wrote:

@usernamenumber https://github.com/usernamenumber managed to fix the initial scroll position.

RE start up time (especially on mobile) I did some profiling and most of it is going to decrypting the book, and it's blocking the main thread so the loader spinner that should display isn't shown.

Only way to resolve would be to cache the decrypted book somehow, or perhaps looking to web workers for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tunapanda/funzo-app/pull/97#issuecomment-239309347, or mute the thread https://github.com/notifications/unsubscribe-auth/AALfvRYJ9Mh9JqePo8SLa7IVlO1wyBpEks5qe54wgaJpZM4JfCRx .

Jakeii commented 8 years ago

Well we could put it into the secure storage available on ios/android, where we where thinking of putting the keys at one point?

We could show the spinner first, this https://guides.emberjs.com/v2.7.0/routing/loading-and-error-substates/ looks like it will make it possible, I'll have a look.

Jakeii commented 8 years ago

oh the loading beforehand was already in place, but the transition plugin (liquid-fire) is breaking it...

Jakeii commented 8 years ago

should be good to go now