WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 10 days ago

#44264 accepted enhancement

Give progress indication for export and erasure

Reported by: allendav Owned by: garrett-eclipse
Milestone: 5.4 Priority: normal
Severity: normal Version: 4.9.6
Component: Privacy Keywords: has-patch has-screenshots needs-testing needs-design-feedback
Focuses: ui, javascript Cc:
PR Number:

Description

Sometimes export and erasure can take a while, e.g. more than 15 seconds even, on slow hosts or when there is a lot to export.

It would be helpful to somehow indicate to the user how export is proceeding. Since the javascript knows what exporter index it is on, we could at least include that as a percentage or something.

Attachments (9)

44264.0 (4.5 KB) - added by dominic_ks 3 months ago.
Initial patch to show percentage completion of export or deletion.
44264.1.patch (5.1 KB) - added by dominic_ks 3 months ago.
Updated patch with fixed indents and also allows for specific progress indicators per job when running multiple exports or deletions at the same time.
44264.2.diff (5.2 KB) - added by garrett-eclipse 4 weeks ago.
Refreshed patch to address PHPCS issues and some naming changes
cb02c181f77525a819219c55ea6a7711.gif (356.1 KB) - added by garrett-eclipse 4 weeks ago.
Send Export Link w/ Progress
0a0b21446f018d6f2a0a87c47daffe63.gif (377.4 KB) - added by garrett-eclipse 4 weeks ago.
Erase Personal Data w/ Progress
Screen Shot 2019-12-20 at 10.42.46 AM.png (25.9 KB) - added by garrett-eclipse 4 weeks ago.
The 'Download Personal Data' row-action which potentially could have the progress indicator
Screen Shot 2019-12-20 at 10.42.53 AM.png (17.5 KB) - added by garrett-eclipse 4 weeks ago.
The 'Force Erase Personal Data' row-action which potentially could have the progress indicator
44264.3.diff (5.1 KB) - added by garrett-eclipse 4 weeks ago.
Added back the new line at the end of privacy-tools.js didn't realize that was part of the JS Coding Standards "There should be a new line at the end of each file." Reference - https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#spacing
44264.4.diff (7.4 KB) - added by xkon 10 days ago.

Download all attachments as: .zip

Change History (19)

#1 @desrosj
19 months ago

  • Keywords gdpr removed

Removing the GDPR keyword. This has been replaced by the new Privacy component and privacy focuses in Trac.

#2 @garrett-eclipse
4 months ago

  • Focuses ui javascript added
  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #core by dominic_ks. View the logs.


4 months ago

#4 @dominic_ks
4 months ago

Hello, I'm new to contributing but picked this up from the Good First Bugs list and started looking at it this morning.

@dominic_ks
3 months ago

Initial patch to show percentage completion of export or deletion.

#5 @dominic_ks
3 months ago

I've made a couple of updates to the markup of the export / delete in progress button to contain the percentage progress and also the JS to update this element based on the current exporter or eraser index as a percentage of the total.

I found that if you have the "normal" items registered you largely will see 0%, 33%, 67%, done as it works through posts and comments. Since at present there's no indication of the number of pages that will need to be worked through per item.

There's probably a couple of ways that we could find out the total pages, but perhaps that would be overkill.

#6 @rukkykf
3 months ago

  • Keywords has-patch added; needs-patch removed

#7 @rukkykf
3 months ago

  • Keywords needs-testing added

#8 @garrett-eclipse
3 months ago

  • Keywords needs-refresh added; good-first-bug needs-testing removed

Speaking with @dominic_ks on Slack there's a few issues with the initial patch he's working to address, updating to indicate his refresh and remove the call to testing until it's in a better state.

@dominic_ks
3 months ago

Updated patch with fixed indents and also allows for specific progress indicators per job when running multiple exports or deletions at the same time.

@garrett-eclipse
4 weeks ago

Refreshed patch to address PHPCS issues and some naming changes

@garrett-eclipse
4 weeks ago

Send Export Link w/ Progress

@garrett-eclipse
4 weeks ago

Erase Personal Data w/ Progress

#9 @garrett-eclipse
4 weeks ago

  • Keywords has-screenshots needs-testing needs-design-feedback added; needs-design needs-refresh removed
  • Milestone changed from Future Release to 5.4
  • Owner set to garrett-eclipse
  • Status changed from new to accepted

Thanks for the patch refresh there @dominic_ks it worked really nicely.

In 44264.2.diff I made the following minor changes;

  • Fixed PHPCS issues for spacing
  • Changed 'delete-progress' to 'erasure-progress' as the tool is for Erasures which don't always involve deletions.
  • Changed '$progresCont' to just '$progress' as we want full words for variable naming and I wasn't sure what the 'Cont' meant.

Uploaded some gifs to illustrate the Progress indicators for both the Export and Erasure tools.

This looks great so let's get it in for 5.4 after some more testing. Also just adding needs-design-feedback to ensure the design team like this direction.

Note: For testing unless you expand upon the number of exporters/erasures in your test install it'll always be a quick progress as by default there's not many.

And last question, not sure if it's worth it but am wondering if we should add progress indicators for the admins in the cases they use the admin links for 'Download Personal Data' [Export] and 'Force Erase Personal Data' [Erasure]. These are found by the admin when they hover over the row as row-actions. *I'll post some screens to illustrate.

@garrett-eclipse
4 weeks ago

The 'Download Personal Data' row-action which potentially could have the progress indicator

@garrett-eclipse
4 weeks ago

The 'Force Erase Personal Data' row-action which potentially could have the progress indicator

@garrett-eclipse
4 weeks ago

Added back the new line at the end of privacy-tools.js didn't realize that was part of the JS Coding Standards "There should be a new line at the end of each file." Reference - https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#spacing

@xkon
10 days ago

#10 @xkon
10 days ago

Tested the 44264.3.diff and seems to be working fine for me and I do agree that the progress should also be indicated on the tables Actions as well if those are used instead by users that have access.

44264.4.diff adds the necessary spans for progress indication on the action links also.

Note: See TracTickets for help on using tickets.