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

[FW][IMP] website_event_track_online: PWA adds prefetch for offline use #56159

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Aug 19, 2020

This PR adds the prefetch of the current page's children (cf. under
the same scope) to be available for offline use.

For performance reason, only the first-level children are added to the
cache to avoid a huge amount of requests and/or resources used by simply
loading the event website's pages. Also, for the same reason, this
process is delegated to the ServiceWorker to avoid cluttering the Main
Thread.

Also, this PR perform some linting and ensure ES5 usage (for compatibility purpose).

Forward-Port-Of: #56058

This commit convert ES6 syntax (mainly Arrow Functions & String
Templates) to ES5 for compatibility with older browsers on the frontend.

Also some linting for consistency.

X-original-commit: 177860e
This commit adds the prefetch of the current page's children (cf. under
the same scope) to be available for offline use.

For performance reason, only the first-level children are added to the
cache to avoid a huge amount of requests and/or resources used by simply
loading the event website's pages. Also, for the same reason, this
process is delegated to the ServiceWorker to avoid cluttering the Main
Thread.

Note: due to some security restriction introduced in the Fetch spec,
some redirects may prevent offline-requests from being properly
fulfilled from the cache. See references for further details.

References:
- whatwg/fetch#763
- GoogleChromeLabs/sw-precache#220
- https://fetch.spec.whatwg.org/#concept-request-redirect-mode

X-original-commit: bc9a306
@fw-bot fw-bot requested a review from a team as a code owner August 19, 2020 15:19
@robodoo robodoo added forwardport This PR was created by @fw-bot seen 🙂 labels Aug 19, 2020
@fw-bot
Copy link
Contributor Author

fw-bot commented Aug 19, 2020

Ping @pparidans, @adr-odoo
This PR targets master and is the last of the forward-port chain containing:

To merge the full chain, say

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added ☑ legal/cla CI 🤖 Robodoo has seen passing statuses and removed ☐ legal/cla labels Aug 19, 2020
@C3POdoo C3POdoo added the RD research & development, internal work label Aug 19, 2020
@pparidans
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request Aug 19, 2020
This commit adds the prefetch of the current page's children (cf. under
the same scope) to be available for offline use.

For performance reason, only the first-level children are added to the
cache to avoid a huge amount of requests and/or resources used by simply
loading the event website's pages. Also, for the same reason, this
process is delegated to the ServiceWorker to avoid cluttering the Main
Thread.

Note: due to some security restriction introduced in the Fetch spec,
some redirects may prevent offline-requests from being properly
fulfilled from the cache. See references for further details.

References:
- whatwg/fetch#763
- GoogleChromeLabs/sw-precache#220
- https://fetch.spec.whatwg.org/#concept-request-redirect-mode

closes #56159

X-original-commit: bc9a306
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
@robodoo robodoo added r+ 👌 and removed CI 🤖 Robodoo has seen passing statuses merging 👷 labels Aug 19, 2020
@robodoo
Copy link
Contributor

robodoo commented Aug 19, 2020

Staging failed: ci/runbot (view more at http://runbot.odoo.com/runbot/build/3912869)

@pparidans
Copy link
Contributor

@robodoo retry

@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses r+ 👌 and removed error 🙅 labels Aug 20, 2020
@robodoo robodoo closed this Aug 20, 2020
@robodoo robodoo temporarily deployed to merge August 20, 2020 06:27 Inactive
@fw-bot fw-bot deleted the master-saas-13.3-event-pwa-prefetch-app-9rGr-fw branch September 3, 2020 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants