SReview icon indicating copy to clipboard operation
SReview copied to clipboard

New times display before the updated notification

Open belenbarrospena opened this issue 5 years ago • 3 comments

Steps to reproduce:

  1. Load the video review page
  2. Select "The video has problems."
  3. In the "Start time" section, select "The video starts too early"
  4. Move the video scrubber forward and click the "Set new start up" button. The notification showing the new video times will fade in.
  5. Move the video scrubber forward again and click the "Set new start up" button.

Outcome: the video times will update, then the old notification will fade out, and the new one will fade in. The overall effect is a bit strange.

The correct sequence of events should be:

  1. Fade out the notification
  2. Update the video times
  3. Fade in the notification

belenbarrospena avatar Dec 19 '18 20:12 belenbarrospena

We actually do it in that order, but jQuery doesn't wait. I'll have to figure out how to make jQuery wait for the previous animation before moving on to the next line of code. That'll probably be a callback or some such, I guess.

yoe avatar Dec 19 '18 23:12 yoe

Could the delay() function help with this? https://api.jquery.com/delay/

belenbarrospena avatar Jan 31 '19 21:01 belenbarrospena

There is actually a Promise which would help (it's a method that gets called once the fade has finished), but it gets called for each element that's being faded, so have to filter that out first. Should be doable, but could be slightly complicated

yoe avatar Feb 05 '19 16:02 yoe