pressbooks / pressbooks

Open publishing. Open web. Open source.
https://pressbooks.org/
GNU General Public License v3.0
422 stars 133 forks source link

Progress bar timer stalls when window isn't displayed #1885

Open mcgratay opened 4 years ago

mcgratay commented 4 years ago

Prerequisites

Description

Because some important functions of Pressbooks (like cloning, exporting, or importing) can take quite a bit of time, Pressbooks displays progress bars which give users updates in realtime about what actions are being performed. This includes a timer that records the amount of time (in seconds) that's elapsed since the export began.

When users minimize the window or navigate to another tab, the export continues but the timer and progress bar stall and remain at the time that the user last saw. The timer only resumes when users revisit the window.

Steps to Reproduce

  1. Choose a test book that is larger than normal so that exports take longer than a few seconds
  2. Navigate to Exports from the left sidebar menu
  3. Select a few files, then export
  4. Watch the timer, then leave the window for a few seconds
  5. Return to the page and see if the actual time that elapsed matches the time that elapsed on the progress bar

Expected behavior: Progress bar timer shows an accurate representation of how long it has taken to export a file

Actual behavior: Progress bar only works when users have browser tab open

SteelWagstaff commented 4 years ago

@connerbw not asking you to fix, but can you comment on whether this is intended behavior for the status bar feature?