Code review comment for lp:~dylanmccall/harvest/gsoc-client-stuff

Revision history for this message
Dylan McCall (dylanmccall) wrote :

Okay, thanks for the comments so far, Daniel! That last commit covers the last of them.

Keep them coming :)

If it helps understand some of the reason behind the Javascript, here's a list of behaviours this is aiming for:

----- Harvest.js interaction tests for humans and ents -----

Filters

 Selected items should have checkboxes added via Javascript
 Deselected items should have checkboxes removed

 Clicking a filter's name should select it or deselect it

 Changing the value of an EditFilter should cause that filter to be selected
 Selecting an item in a deselected ChoiceFilter should select the entire ChoiceFilter
 Deselecting an item should not affect whether the ChoiceFilter itself is selected or deselected

 When an item is hovered over with the mouse or focused with the keyboard, any item that would be affected according to the above rules should have a prelight indicating what will happen. If it would be selected, there should be a checkbox. If it would be deselected, there should be a checkbox with a line through it.

 When a filter's value is changed, that value should be immediately submitted to the Results object
 All filters should submit their initial values to Results when the page is loaded

Results

 Results begin waiting (filter value is changed)
  Status bubble appears at the top (fades in and slides downwards) with an unmoving progress bar
 Results stop waiting (filter value is changed back to how it was before waiting began)
  Status bubble disappears (fades out and slides upwards)

 Results from waiting to loading (1.5 seconds after changing filter value)
  Status bubble transitions to show an animated bar
 Results finish loading
  Status bubble disappears
  Correct results for selected filters should be displayed

 Results from loading to waiting (another filter is changed while content is loading)
  Status bubble transitions from "loading" to "wating"
  Previously loading results should not appear
 Results abort loading (all filters changed back to how they were before)
  Status bubble disappears
  Previously loading results should not appear

Packages

 Clicking a collapsed package should expand it, and vice-versa
 When a collapsed package is expanded for the first time, a loading indicator should gradually fade in
 When a collapsed package is being expanded (loading indicator visible), if it is clicked again, the loading should be aborted and the package should not be expanded

 When new results are loaded, any packages that are in the new results that were also in the previous results, and were expanded, should already be expanded
 If a package is expanded while results are being loaded, it should be expanded again after the new results are shown (if it is still listed)

« Back to merge proposal