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

Offline Template: Test with all themes #205

Closed
6 tasks done
ryelle opened this issue Aug 7, 2019 · 5 comments · Fixed by #316
Closed
6 tasks done

Offline Template: Test with all themes #205

ryelle opened this issue Aug 7, 2019 · 5 comments · Fixed by #316
Labels
[Component] PWA Service workers, manifest [Component] Theme Templates Theme-agnostic templates like Day of Event, Offline

Comments

@ryelle
Copy link
Contributor

ryelle commented Aug 7, 2019

Our supported themes are:

  • CampSite 2017
  • Twenty Thirteen
  • Twenty Sixteen
  • Twenty Seventeen
  • Twenty Nineteen
  • WordCamp Base

We should also test with custom CSS, and with remote CSS.

There's a note about testing with child themes, but WCs can't have child themes, so do we need to do this?


The rest we don't test with, but will fix issues on

  • Twenty Ten
  • Twenty Eleven
  • Twenty Twelve
  • Twenty Fourteen
  • Twenty Fifteen
  • WordCamp Base Redux
@ryelle ryelle added the [Component] Theme Templates Theme-agnostic templates like Day of Event, Offline label Aug 7, 2019
@westonruter
Copy link
Member

See also GoogleChromeLabs/pwa-wp#199 where the PWA plugin could bundle offline templates for the core themes.

@westonruter westonruter added the [Component] PWA Service workers, manifest label Aug 7, 2019
@ryelle
Copy link
Contributor Author

ryelle commented Aug 7, 2019

We would still want to inject our own, so we can show the schedule and other info related to the WordCamp.

@westonruter
Copy link
Member

Good point. At least we could share the same base, or the PWA templates could trigger an action for the WordCamp sites to inject the content. Nevertheless, the content could also be injected via script.

@westonruter
Copy link
Member

westonruter commented Aug 7, 2019

The need to inject content into the offline template is also something that PWA plugin isn't properly facilitating. Right now there is a wp_service_worker_error_message_placeholder() function that the offline.php template is expected to include. Perhaps this function should do an action as well?

Perhaps wp.hooks could also be incorporated into the service worker to allow filtering the offline template response prior to sending to the browser, which would better enable dynamically-populating the template with content (e.g. list of pages available offline #201 (comment)): GoogleChromeLabs/pwa-wp#142

See also GoogleChromeLabs/pwa-wp#211

@ryelle
Copy link
Contributor Author

ryelle commented Aug 8, 2019

I think the specifics would have to depend on how the the template itself works, we might still want to override the whole thing. For more "average user" cases, an action before & after wp_service_worker_error_message_placeholder sounds good (as does the wp.hooks suggestion, though I personally haven't used it as much).

@ryelle ryelle added this to the PWA Initial Version milestone Aug 9, 2019
ryelle added a commit that referenced this issue Jan 22, 2020
…es across themes (#316)

The templates on some default themes use different markup, which causes display issues when trying to use the same templates across themes. To fix this, we should stop trying to fully emulate all themes. This PR removes the global Day of Event template, since the Day of Event stub is created and can use a regular page template. The offline page is called differently, but instead of trying to match the theme directly, we can create a very simple page, which inherits the basic style of the active theme.

Fixes #205, fixes #206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] PWA Service workers, manifest [Component] Theme Templates Theme-agnostic templates like Day of Event, Offline
Projects
None yet
3 participants