[wp-trac] [WordPress Trac] #44264: Give progress indication for export and erasure
WordPress Trac
noreply at wordpress.org
Thu Feb 27 23:58:56 UTC 2020
#44264: Give progress indication for export and erasure
-------------------------------------------------+-------------------------
Reporter: allendav | Owner: garrett-
| eclipse
Type: enhancement | Status: reopened
Priority: normal | Milestone: 5.4
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: has-patch has-screenshots needs- | Focuses: ui,
testing | javascript
-------------------------------------------------+-------------------------
Changes (by garrett-eclipse):
* keywords: has-patch has-screenshots => has-patch has-screenshots needs-
testing
Comment:
Thanks for the patch @pbiron testing I found it worked but I was hesitant
to go all in as I was able to produce the concern you had with breaking
the tab action that makes row-actions visible.
In [https://core.trac.wordpress.org/attachment/ticket/44264/44264.8.diff
44264.8.diff] I took an alternate approach to avoid breaking that tab
functionality. Instead of affecting the other classes to break the hover
effect on the row actions I introduced a `.processing` class which matches
the `.visible` class but won't be removed by other pre-existing
functionality. This approach I found is less code heavy as well which is a
bonus.
My approach works in that the `.processing` class is added when the action
is initiated which keeps it in view while processing and upon completion
or failure this class is removed so the normal show/hide on row-actions
takes affect again. Meaning if you're hovering or tabbing the row actions
work as normal.
While testing my approach one draw back initially was if you were hovered
then 'Erasure completed' wouldn't become visible as that message is added
after the processing. To account for this I wrapped the removeClass calls
in SetTimeouts for half a second so the users is able to view/read the
completion message before normal show/hide functionality takes over again.
Also note two other items in this patch;
1. The erasure click handler was missing the `event.preventDefault();` so
I added it to match with the export click handler.
2. There was a hide call on the handlers upon success that made it so
additional exports weren't possible. This was added unintentionally when
we tried to make the two processes match in [46412] / #43974. As this
affects this process and is a reversion in and of itself I included in
this patch. If needed can be split out to a new ticket/patch but feel it's
fairly safe to fix two reversions in one go here.
@pbiron / @xkon / @SergeyBiryukov could you review/test and we can get
this fixed hopefully before RC.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44264#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list