Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruct users to flush page cache when changing template modes #4843

Closed
westonruter opened this issue Jun 13, 2020 · 9 comments · Fixed by #6467
Closed

Instruct users to flush page cache when changing template modes #4843

westonruter opened this issue Jun 13, 2020 · 9 comments · Fixed by #6467
Assignees
Labels
Caching Changelogged Whether the issue/PR has been added to release notes. Groomed P0 High priority WS:UX Work stream for UX/Front-end
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented Jun 13, 2020

Feature description

If the WP_CACHE constant is enabled or if a site is detected to have page caching (#4386), when the user switches the Template mode (or the Reader theme) they should be prompted to flush their page cache.

We should also consider firing an action like amp_page_cache_flush_needed when such a setting is changed. This would facilitate third party plugins integrating with the AMP plugin, or for there to be compatibility plugins that bridge the AMP plugin with a page caching plugin.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

@westonruter westonruter changed the title Instruct users to flush cache their page caching is enabled Instruct users to flush page cache when changing template modes Jun 13, 2020
@westonruter westonruter added this to the v1.6 milestone Jun 15, 2020
@kmyram kmyram modified the milestones: v1.6, v1.7 Jul 7, 2020
@kmyram kmyram added the Groomed label Jul 7, 2020
@kmyram kmyram added the WS:Core Work stream for Plugin core label Aug 5, 2020
@westonruter westonruter added WS:UX Work stream for UX/Front-end and removed WS:Core Work stream for Plugin core labels Dec 10, 2020
@westonruter westonruter modified the milestones: v2.1, v2.2 Feb 11, 2021
@dhaval-parekh dhaval-parekh self-assigned this Jul 15, 2021
@westonruter westonruter added the P1 Medium priority label Jul 22, 2021
@kenrodriguesdesign
Copy link

Hi @westonruter

I have taken this issue up for UI and came up with the following design as a prompt to encourage the user to flush all cache. There will not be any CTA present here. It will just be a notification.

Screenshot 2021-07-23 at 6 39 49 PM

I had another idea in mind in which a CTA is present after switching template modes, and I wanted to know advice/feedback on it.

After checking the plugins listed here , I noticed something all of these have in common; A “purge all cache/ flush all cache/ delete all cache” option.

So my question is this:
As shown in the design below,
Screenshot 2021-07-21 at 5 02 47 PM

When the user clicks the “Save and flush cache” CTA, is it possible to trigger the “purge all” cache option, present in the plugin that the user has installed? Is this feasible? If not, then we will go ahead with a simple prompt message.

@westonruter
Copy link
Member Author

It would be nice if we could programmatically flush the cache, but since there is no standardized page caching API (especially when page caching is done remotely via Varnish) the best we can do is provide the prompt to tell the user to seek out the cache purge option with their respective plugin/platform.

In terms of placement of the notification, would it make more sense to add to the "Saved" notification?

template-mode-change-save-notification.mov

Otherwise, if the notice were a banner then it would cause layout shifting, right?

@kenrodriguesdesign
Copy link

Hey @westonruter, unfortunate that the CTA isn't possible, so we will continue working on it being just a promo for now.

I will take into consideration the placement of the prompt to be added into notification along with a couple more variations.

@kenrodriguesdesign
Copy link

Hey @westonruter, the team has confirmed this design

#4843

The "Learn More" link will lead to a section in this page to inform the user why they need to flush their cache.

Do let me know if you have any questions in regards to this.

@westonruter
Copy link
Member Author

Yes, that looks good.

@kenrodriguesdesign
Copy link

Added a small tweak to the design, by introducing a dismiss option.
Screenshot 2021-08-26 at 10 37 43 PM

@dhaval-parekh
Copy link
Collaborator

Hey @kenrodriguesdesign

I have updated the UI of the notice. However, didn't add dismiss button. since that will automatically remove once use make any other change or refresh the page.

@maitreyie-chavan maitreyie-chavan added P0 High priority and removed P1 Medium priority labels Oct 4, 2021
@delawski
Copy link
Collaborator

QA not passed

Here's a video of the QA process:

Screen.Recording.2021-11-19.at.12.18.23.PM.mp4

Note that the user is asked to purge caches after switching a template mode even though a caching plugin has just been deactivated. It's because the page caching is currently detected only when visiting the Site Health page. I think the page caching detection should be also done when deactivating plugins (and probably when they get activated, too).

See: #6731

@delawski
Copy link
Collaborator

delawski commented Dec 1, 2021

QA Passed

✅ The bug report #6731 has been closed. Since I found no other issues with this feature, this ticket can now safely land in the "QA Passed" lane.

@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caching Changelogged Whether the issue/PR has been added to release notes. Groomed P0 High priority WS:UX Work stream for UX/Front-end
Projects
None yet
6 participants