uisautomation / media-webapp

Web application for the University Media Platform
https://alpha.media.cam.ac.uk
MIT License
4 stars 7 forks source link

frontend: PlaylistOverlay: fix indexing bug #410

Closed rjw57 closed 5 years ago

rjw57 commented 5 years ago

As noted in #408, the logic used to highlight the current media item and to select a new one in the embedded playlist view was faulty when the playlist was being searched.

The root cause was the fact that the index of the item being rendered in the playlist overlay must match the index of the item in the JWP playlist itself. Filtering the list of items beforehand by the search breaks this invariant. We fix this by imply rendering a null element for playlist items which should not be rendered.

Closes #408

codecov[bot] commented 5 years ago

Codecov Report

Merging #410 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #410   +/-   ##
=======================================
  Coverage   81.61%   81.61%           
=======================================
  Files          53       53           
  Lines        2437     2437           
=======================================
  Hits         1989     1989           
  Misses        448      448

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update eb7e244...215fbd6. Read the comment docs.