ng2-slim-loading-bar icon indicating copy to clipboard operation
ng2-slim-loading-bar copied to clipboard

Progress bar stays loading forever (until completed is called) and an…

Open enjoythelive1 opened this issue 7 years ago • 2 comments

…imation is much smother

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Fixes #61

    • It makes the progress bar to grow in a way that allows it to not be completed ever (like in youtube) until the complete method is called, when start is called.
    • Made possible to change the transition timing function from the code.
    • Set the transition timing function to linear by default (looks better when the progress is changed by the start method)
    • Made the transition speed of the bar, equal to the velocity of the bar when start is called (That and the timing function being linear makes the loading way more smoother).
    • Removed the completed callback from the start method, because that callback will never be called under the new algorithm for the bar growth.
  • What is the current behavior? (You can also link to an open issue here) When start is called, the loading bar loads for 50 seconds until it looks completed.

  • What is the new behavior (if this is a feature change)? When start is called, the bar stays loading forever, showing increments of lower amounts as time progresses allowing for it to stay doing increments to the bar forever. (9%, 17%, 25%, 32%, 38%, 44%, 49%, 53%, 58%, 61%, 65%, 68%, 71%, 74%, 76%, 78%, 80%, 82%, 84%, 85%, 86%, 88%, 89%, ...) but no 100%.

  • Other information:

The velocity of this change can be modified by changing the field growVelocity in the service, and the higher the value, the more quickly the bar will look full.

enjoythelive1 avatar Nov 01 '17 01:11 enjoythelive1

The issue with the test are with the versions of the dependencies that are downloaded for testing. If the @angular/common dependency is specified to only match the other dev dependencies, the tests runs

enjoythelive1 avatar Nov 01 '17 01:11 enjoythelive1

I have been looking for something similar to this - Would be great if it could be merged in!

ChrisDalley avatar Dec 13 '17 03:12 ChrisDalley