Opened 6 years ago
Last modified 5 years ago
#43978 assigned defect (bug)
Avoid flickering on the Tools / Export page
Reported by: | birgire | Owned by: | birgire |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Export | Keywords: | has-screenshots has-patch |
Focuses: | ui, administration | Cc: |
Description
The export filters are hidden by default on the Tools / Export page.
But it's only hidden with Javascript in wp-admin/export.php
:
jQuery(document).ready(function($){ var form = $('#export-filters'), filters = form.find('.export-filters'); filters.hide();
The filters can therefore be visible for a short time, before they are hidden.
Here the filters.hide()
will add a display:none;
inline styling to the corresponding filters.
We can avoid this flickering with CSS, something like:
#export-filters .export-filters { display: none; }
Attachments (7)
Change History (15)
@
6 years ago
Positioned css at proper location where tools styles reside in forms.css and discard all changes in common.css which are in 43978.2.patch
@
6 years ago
Positioned css at proper location where tools styles reside in forms.css and discard all changes in common.css which are in 43978.2.patch
#3
@
6 years ago
- Keywords good-first-bug removed
@pmbaldha Thanks for the patch and the screen-animation. That looks good
Mark the good-first-bug as claimed and remove that tag.
#4
@
5 years ago
- Focuses ui added
- Milestone changed from Awaiting Review to 5.3
- Owner set to birgire
- Status changed from new to assigned
I was reminded by this again today, when using the export :-)
I think we should try to target the next big milestone, as this is a relatively small fix.
The 43978-4.diff patch only targets the case when javascript is enabled, to allow the options to be expanded when it's disabled. It came to mind to use the .hidden
CSS class on the .export-filters
nodes, but since plugins can add their own, it's not suitable, as they would be missing the .hidden
class.
#5
@
5 years ago
Thanks @birgire I would lean more towards using the .hidden
CSS class as well as use setActionState()
in xfn.js
to add remove the class. For the plugins we can on load run JS to apply the class, I guess that will cause the plugin ones to flicker though which almost defeats the purpose.
Would be nice to know how export_filters
is used in the wild.
#6
@
5 years ago
@garrett-eclipse thanks for the suggestions.
Having a way to avoid the flickering for both default setup and all filters added via the export_filters
filter would be optimal.
It would be an interesting approach, if you think there's a way to add .hidden
via javascript to reduce the flickering, but I guess one would probably have to test it to see if it helps :-)
Here we have 24 plugins in the plugin directory that add their own export filter:
https://wpdirectory.net/search/01DE7RBMHNMS56FF8KQG7VPQD9
When we have a suitable patch, it would be good to test some of them.
ps: The setActionState()
should now be in the new privacy-tools.js
Thanks for the patch @robicse11128
These files currently have references to
#export-filters
or.export-filters
:I wonder if either one, would be suitable here. What do you think?