WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#29367 closed defect (bug) (fixed)

Media Modal: the progress bar for each attachment no longer shows upload progress

Reported by: gcorne Owned by: azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch
Focuses: javascript Cc:
PR Number:

Description (last modified by gcorne)

The progress bars in the attachment browser no longer animate when uploading. See https://cloudup.com/cAGpTEdfq6A for a demonstration. The progress bars worked correctly in 3.9.2.

This broke in [29266] because rerenderOnModelChange is set to true so any change triggers the view to re-render. The upload progress isn't handled during a normal Attachment view render, so always re-rendering causes any change to the progress bar to be overwritten.

Attachments (1)

29367-01.patch (1.8 KB) - added by gcorne 5 years ago.

Download all attachments as: .zip

Change History (8)

#1 @gcorne
5 years ago

  • Component changed from General to Media
  • Description modified (diff)
  • Focuses javascript added
  • Version set to trunk

#2 @gcorne
5 years ago

  • Description modified (diff)

#3 @gcorne
5 years ago

Actually, it looks like the binding of render to change happened in [28993].

This ticket was mentioned in IRC in #wordpress-dev by gcorne. View the logs.


5 years ago

@gcorne
5 years ago

#5 @gcorne
5 years ago

  • Keywords has-patch added

29367-01.patch fixes the issue by incorporating the percentage of progress into the template that is used to render. So when the change event is firing a re-render, the current percentage is reflected in the width of the progress bar. I handled it this way instead of calling this.progress() after this.$el.html() so that the progress bar wouldn't flicker.

#6 @azaozz
5 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 29609:

Media modal: fix the progress bar in the attachment thumbnail. Props gcorne, fixes #29367

#7 @azaozz
5 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.