Moodle
  1. Moodle
  2. MDL-32999 META: Files UI Stage 2 polishing in master
  3. MDL-33005

Remove CSS arrow animation and replace with a simple subtle animated gif

    Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Filepicker
    • Labels:
    • Rank:
      40180

      Description

      In Mac Firefox there is this problem (but not in Mac Chrome):

      1) Drag one or more files that exceeds the maximum upload limit for a form, into a filemanager.

      2) You'll see the dialog telling you that the file is too big.

      3) The ENTIRE browser freezes for a minute or so, then comes back to normal.

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          I'm adding Davo Smith here as well in case he has some insight.

          Show
          Martin Dougiamas added a comment - I'm adding Davo Smith here as well in case he has some insight.
          Hide
          Davo Smith added a comment -

          I can't reproduce with Windows / Linux Firefox.

          It appears that it must be a browser bug, but I can't think what the workaround would be. The javascript logic looks something like this:

          When a 'drop' event occurs, look to see if there are any files included.
          If there are any files, loop through each of them:

          • if the file is too big, pop up a javascript 'alert' message, then get on with processing the next file
          • if the file size is OK, send the data to the server

          There isn't anything in the javascript code that does any processing after the 'too big' file has been detected, that could account for such a freeze.

          Show
          Davo Smith added a comment - I can't reproduce with Windows / Linux Firefox. It appears that it must be a browser bug, but I can't think what the workaround would be. The javascript logic looks something like this: When a 'drop' event occurs, look to see if there are any files included. If there are any files, loop through each of them: if the file is too big, pop up a javascript 'alert' message, then get on with processing the next file if the file size is OK, send the data to the server There isn't anything in the javascript code that does any processing after the 'too big' file has been detected, that could account for such a freeze.
          Hide
          Martin Dougiamas added a comment -

          Thanks Davo! I just tried on Master and you're right, it's fine there.

          This bug is in the new files UI branch only.

          Show
          Martin Dougiamas added a comment - Thanks Davo! I just tried on Master and you're right, it's fine there. This bug is in the new files UI branch only.
          Hide
          Martin Dougiamas added a comment -

          Still here after integration in master.

          Show
          Martin Dougiamas added a comment - Still here after integration in master.
          Hide
          Davo Smith added a comment - - edited

          I've just tried the integration repo with

          • Linux: Firefox (Iceweasel) and Chrome
          • Windows: Firefox and Chrome

          None of these show the reported problem, so it must be something specific to Firefox on Mac.

          Show
          Davo Smith added a comment - - edited I've just tried the integration repo with Linux: Firefox (Iceweasel) and Chrome Windows: Firefox and Chrome None of these show the reported problem, so it must be something specific to Firefox on Mac.
          Hide
          Dan Poltawski added a comment -

          Testing this.

          Show
          Dan Poltawski added a comment - Testing this.
          Hide
          Dan Poltawski added a comment -

          Yep I can reproduce this, dragging and dropping file into the file manager - dialogue comes up, can't do anything else.

          I don't often use firefox so have no extensions or anything like that either.

          Show
          Dan Poltawski added a comment - Yep I can reproduce this, dragging and dropping file into the file manager - dialogue comes up, can't do anything else. I don't often use firefox so have no extensions or anything like that either.
          Hide
          Dan Poltawski added a comment -

          I'm guessing that alert box must stop the execution of the 'run loop' so to speak..

          Show
          Dan Poltawski added a comment - I'm guessing that alert box must stop the execution of the 'run loop' so to speak..
          Hide
          Ankit Agarwal added a comment -

          After lots of investigation, it was found that, the arrow animation requires huge CPU resource, causing a crash in firefox in the given specific circumstances.
          Also we the "alert" code needs to be improved and should use the yui if possible.
          Reassigning this issue to Barbara to work on a new animation.

          Thanks

          Show
          Ankit Agarwal added a comment - After lots of investigation, it was found that, the arrow animation requires huge CPU resource, causing a crash in firefox in the given specific circumstances. Also we the "alert" code needs to be improved and should use the yui if possible. Reassigning this issue to Barbara to work on a new animation. Thanks
          Hide
          Martin Dougiamas added a comment -

          Replace with a simple animated gif.

          Show
          Martin Dougiamas added a comment - Replace with a simple animated gif.
          Hide
          Dan Poltawski added a comment -

          I filed a firefox bug for this problem: https://bugzilla.mozilla.org/show_bug.cgi?id=759342

          Show
          Dan Poltawski added a comment - I filed a firefox bug for this problem: https://bugzilla.mozilla.org/show_bug.cgi?id=759342
          Hide
          Dan Poltawski added a comment -

          I've integrated this, thanks.

          Just noting that some people are not very keen on the continual animation (not me, i'm in love with that icon :-P )

          Show
          Dan Poltawski added a comment - I've integrated this, thanks. Just noting that some people are not very keen on the continual animation (not me, i'm in love with that icon :-P )
          Hide
          Davo Smith added a comment -

          Would there be any scope for limiting the animation loop to 2 or 3 repeats?

          Personally, I'm expecting the animation to really grate after a while.

          Show
          Davo Smith added a comment - Would there be any scope for limiting the animation loop to 2 or 3 repeats? Personally, I'm expecting the animation to really grate after a while.
          Hide
          Frédéric Massart added a comment -

          Thanks. Successfully testing on master (Firefox/Chrome Ubuntu, Firefox Mac VM)

          Show
          Frédéric Massart added a comment - Thanks. Successfully testing on master (Firefox/Chrome Ubuntu, Firefox Mac VM)
          Hide
          Barbara Ramiro added a comment -

          Dan and Davo, I can make the animation play once since it bounces twice and then stops in the middle. Will commit on the same branch later. Cheers =)

          Show
          Barbara Ramiro added a comment - Dan and Davo, I can make the animation play once since it bounces twice and then stops in the middle. Will commit on the same branch later. Cheers =)
          Show
          Barbara Ramiro added a comment - Dan here's the revised animation: https://github.com/barbararamiro/moodle/commit/a04b8a8d366cecf3ce7d5f9c6c24e3894e77afd4
          Hide
          Dan Poltawski added a comment -

          I'm pulling this commit in now and will test it.

          Show
          Dan Poltawski added a comment - I'm pulling this commit in now and will test it.
          Hide
          Dan Poltawski added a comment -

          Have pulled the revised single loop animation and tested it.

          Show
          Dan Poltawski added a comment - Have pulled the revised single loop animation and tested it.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Big thanks for the effort. This is now part of Moodle upstream. Let's wait for regressions, yay! LOL Ciao

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: