wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Add "Clear Used CSS of this URL" option on Edit screen

Open NataliaDrause opened this issue 3 years ago • 4 comments

Clear Used CSS of this URL top menu option is currently not available if you are on the Edit screen.

image Full-screen image: https://i.imgur.com/GTKnKU0.png

The option is only available when you are logged-in and viewing URL:

image Full-screen image: https://i.imgur.com/eXvMizW.png

This can be confusing for some users as they don't see an option to clear Used CSS for a specific URL.

Describe the solution you'd like Add Clear Used CSS of this URL option to the top menu on Edit screen.

Related ticket: https://secure.helpscout.net/conversation/1943904513/354757?folderId=3864740

NataliaDrause avatar Jul 19 '22 14:07 NataliaDrause

Reproduce the issue ✅

Reproduced

Identify the root cause ✅

It's happening because the method adding this admin bar item has a check for is_admin() and bails-out if true.

Scope a solution ✅

Remove the check for is_admin() in RUCSS\Controller\UsedCSS::add_clear_usedcss_bar_item()

Estimate the effort ✅

Effort [XS]

remyperona avatar Aug 01 '22 15:08 remyperona

Correct me if I'm wrong, but we must delete the Used CSS when we update the page, right?

If so, we don't need this link.

For which we would like/need to clear the Used CSS on one page if it has not been updated?

GeekPress avatar Aug 25 '22 07:08 GeekPress

@GeekPress Yes, you're right here. That's the same behaviour with Clear this Post in the backend editor 🤔 maybe we should consider removing that one, since updating the post is obviously, clearing the cache

piotrbak avatar Aug 31 '22 10:08 piotrbak

maybe we should consider removing that one, since updating the post is obviously, clearing the cache

Yes we could

GeekPress avatar Sep 07 '22 13:09 GeekPress

Closing this one as we don't do it.

GeekPress avatar Oct 06 '22 13:10 GeekPress