Making WordPress.org

Changeset 8988


Ignore:
Timestamp:
06/24/2019 07:22:05 PM (3 years ago)
Author:
iandunn
Message:

Service Worker Caching: Add notes for iteration.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/service-worker-caching.php

    r8982 r8988  
    1313
    1414
    15 // todo is prompt to save offline automatically showing on mobile?
    16     // if so, not sure we want it to
     15// todo prompt to install app to home screen is automatically showing on mobile
     16    // not sure we want it to
    1717    // not really related to this file, but nothing closer at the moment
    1818    // maybe want it to be eventually, but not until we do more work to really make the site use pwa features well?
    1919    // otherwise risk giving users bad impression of pwas
     20
     21// also, says "install wordcamp" instead of "install wordcamp europe" - maybe manifest issue?
     22
     23// after adding to home screen, there's a delay and a "wordcamp" interstitial screen before the site appears.
     24    // why? can remove that? it should load instantly, right? that's the whole idea
     25
     26// experience on mid-level phone (moto e4) and fast bandwidth is pretty poor
     27    // what's the cause? big images? too much markup to parse? server slow ttfb?
     28    // maybe just needs to have better perceived speed rather than better actual speed? like transitions between screens
     29        // maybe new default theme that's a SPA and has a subtle transition animation when fetching new page content from API
     30
     31// what's the point of adding to home screen? doesn't seem like it has anything extra cached for offline use
     32    // maybe if can detect when it's installed, we should pre-cache more things, for faster loading and more offline accessibility?
     33
     34// maybe avoid loading images on slow connections
     35    // related https://github.com/xwp/pwa-wp/issues/110, probably better to contribute to that (or new issue in that repo), than build custom. would be good feature for core
     36    // https://github.com/wceu/wordcamp-pwa-page/issues/5
     37    // https://deanhume.com/dynamic-resources-using-the-network-information-api-and-service-workers/
     38    // this isn't really caching, so maybe create a separate file for it, or refactor this to be everything related to service workers.
     39        // probably the former, `service-worker-misc.php`
     40
     41// having multiple tabs open, when 1 has a youtube embed playing, then refresh other tab, the video in first tab stops playing
     42    // doesn't happen every time though
     43
     44
     45
     46
     47
     48
     49// open issue w/ pwa lpugin - this may be plugin territory, but save offline button to add to precache route?
     50    // similar to that one site
     51//  or does it do that automatically already?
     52//
     53//maybe button to download all pages (not all posts or other cotent types, just pages, so that whole site heirarchy is accessible offline)
     54
    2055
    2156/**
     
    2661     * todo
    2762     *
     63     * pre-cache important pages like Location. what others? how to detect programatically?
     64     *      could match `location` slug, and also add a `service-worker-precache` postmeta field to post stubs that we create on new sites
     65     *      maybe pwa feature plugin already supports something like that? if not, maybe propose it
     66     *      offline and day-of-event templates could show warnings to logged-in admins if the key is missing b/c they didn't use the default page
    2867     * Is the wp-content/includes caching route even working? Didn't cache assets for offline template.
    2968     *      How can you tell if it's working, compared to regular browser caching?
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/parts/location.php

    r8981 r8988  
    99    // can pull address from `wordcamp` post type, maybe create a link to Google Maps driving directions with the starting place blank so they type that
    1010    // it'd be nice to pull in content from the Location page, but don't have a way to programatically detect that, and could have lots of non-essential content mixed in with it
     11        // could identify location page by post meta inserted into stub when site created
     12        // if can't find page w/ that, then fall back to address from wordcamp post
     13    // maybe the full location page would have too much content for this context though? it'd still be good to automatically cache that for offline use, though, and the above approach could work well for that
     14        // for low-bandwidth users, probably only want to install if add to home screen
     15            // maybe that kind of functionality should be built into pwa feature plugin instead of custom
    1116
    12 // include from day-of-event template and offline template
     17// include this from day-of-event template and from offline template
    1318    // link to gmaps wouldn't make sense in offline scenario, though. maybe detect which template it's being included from and show link or not based on that
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/day-of-event/src/components/latest-posts.js

    r8979 r8988  
    4141            <a href={ archiveUrl } className="all-posts">
    4242                { _x( 'View all Posts', 'title', 'wordcamporg' ) }
     43                {/* todo figure out good solution for this: https://github.com/wceu/wordcamp-pwa-page/issues/6#issuecomment-504268038 */}
    4344            </a>
    4445        </div>
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/theme-templates/templates/offline.php

    r8981 r8988  
    7373         * todo
    7474         *
     75         * this doesn't have headlines for separate days. why not? will probably be fixed by replacing block with shortcode though
    7576         * maybe need to specify params to show all days/all tracks/etc
    7677         * disable "favorites" b/c it won't work? well, some parts will and some parts won't. probably better to leave it, but think about in more detail
Note: See TracChangeset for help on using the changeset viewer.