Display sidebar spinner during export - #1071
Conversation
ivan-ottinger
left a comment
There was a problem hiding this comment.
The proposed changes look good. The spinner is rendering correctly when the site is being exported.
Good idea of adding it in the first place. It makes the experience consistent. 👌🏼
| ...currentProgress, | ||
| statusMessage: __( 'Backing up files...' ), | ||
| progress: Math.min( 100, 20 + entriesProgress * 80 ), // Backup creation takes progress from 20% to 100% | ||
| progress: Math.min( 95, 20 + entriesProgress * 80 ), // Backup creation takes progress from 20% to 95% |
There was a problem hiding this comment.
It is not clear to me why is this change needed? 🤔
There was a problem hiding this comment.
Good question. It's because I made the logic in isSiteExporting check that progress < 100 (identical to isSiteImporting). However, the BACKUP_CREATE_PROGRESS event handler would previously increment the progress all the way up to 100, which made the sidebar spinner disappear before the export was actually complete.
This change makes the event handler stop the progress at 95.
There was a problem hiding this comment.
Thanks, that makes sense.
Related issues
Proposed Changes
Testing Instructions
Pre-merge Checklist