learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
458 stars 304 forks source link

There are videos downloaded, why the link grey? #376

Closed ghost closed 11 years ago

ghost commented 11 years ago

Situation: I successfully downloaded a GMAT video, and went to the GMAT section to find it The GMAT link is grey, does that mean there are no video in there? screen shot 2013-08-02 at 12 23 36 pm But I am sure I downloaded, so I clicked on and see there is a blue link screen shot 2013-08-02 at 12 23 41 pm Found my video screen shot 2013-08-02 at 12 23 46 pm

But,users could go back and re-download the video when they saw the grey link, thinking that there are no video available under GMAT section. If there are video downloaded, link should be blue, regardless how deep is the nesting.

jamalex commented 11 years ago

Good catch -- this is probably related to #293 and #295.

bcipolli commented 11 years ago

I'm glad to look at this. I've actually seen issues with browser-based caches--if the user hits refresh, the page actually loads properly.

@sophia2901 could you try hard refreshing your browser page (often it's holding shift while refreshing)

ghost commented 11 years ago

@bcipolli Ben, it does work. Maybe something to add in a collection of solutions for potential problem that users may face. I am closing post ~

bcipolli commented 11 years ago

@sophia2901 This is actually a big problem, and something we need to address immediately. We're not indicating to the browser the right information, such that it invalidates its own cache.

A big, big problem that must be addressed immediately. Thanks for finding!!

ghost commented 11 years ago

@bcipolli Ben, but when I did the hard refresh, it does show the blue link for GMAT. So, does that mean it works, just I didn't refresh before?

PS: it may sound a bit weird but when developer hears "bugs", they may have mix feeling. But when I found problem and it's recognized as big problem. I feel...awesome ~hahaha

bcipolli commented 11 years ago

:) Good to hear! Keep finding BUGS and I will keep saying: YOU FOUND A BUG!! :)

We cannot require users to hard-refresh their pages. And it's not necessary--you only had to do it because of the bug with our own code, which tells the browser the wrong thing to do.

BUG BUG BUG BUG BUG :P

jamalex commented 11 years ago

Excellent debuggery!

There are a couple cases in which this could happen: 1) re-navigating and clicking through links to get to the page 2) pressing the back button and ending up back on that page

In the former case, then we have something to fix, as Ben describes. In the latter case, I don't think there's anything we can do (browsers hold the state of a page across forwards-backwards navigation).

bcipolli commented 11 years ago

I am looking into "conditional view processing" as a way to interact more fluently with browsers through HTTP headers, to address this issue. https://docs.djangoproject.com/en/1.4/topics/conditional-view-processing/

bcipolli commented 11 years ago

Fixed in #433 ; @sophia2901 try it out! :)

ghost commented 11 years ago

Everything works great like how it supposed to be. No bugs found at this moment. Only 1 concern:

Grey link is clickable but still grey when hover the mouse. However, when user gets to the final videos in the root, then color changes when hover the grey link. For a moment, users could get excited that there are something there, but it's not clickable. Can we keep it consistent? Like when they get to the end of the root, it still grey when they hover the mouse over.

screen shot 2013-08-19 at 1 10 06 pm

gmindmint commented 11 years ago

Nice catch, it is a bug which we shouldn't have hover effect it is grey @sophia2901 can you open a new issue for it?