Commit graph

28 commits

Author SHA1 Message Date
Ward Bell
9f3b549cf6 docs: Migrate Service Worker to Standalone (#51687)
Although there are several pages, only `service-worker-getting-started.md` has an example.
That example code was migrated.

Worked around the few references to NgModule.

Other changes as follows:

**Revised "Getting Started"**

The original service worker example page (`service-worker-getting-started.md`) is full of holes! I don’t know how anyone got this working just by following this page

- it doesn’t tell you where to get the example (and it isn’t generated by AIO)
- it doesn’t tell you that ng serve doesn’t support service worker apps
- it mentions http-server in passing but not what that is or where to get it.
- several commands tell you to supply the “project-name” but (a) it doesn’t tell you how to find that name and (b) you never actually have to provide a name at all. That includes on the command that gets http-server going.

**Hid section on `ngsw-config` tool**

Hid the discussion of the `ngsw-config` tool in `service-worker-config.md` because
(a) the command invoke it didn't seem to work and (b) it referenced `<project-name>`
without explaining what that is or where to find it.

Left the hidden text in the page in case someone wants to do something about this.

Meanwhile, you seem to be able to edit the `ngsw-config.json` and then rebuild.
That should suffice.

**Disabled E2E**

The AIO CI will no longer attempt to run the (thin) E2E tests.

These tests could lightly test the app with the dev server but couldn't test the Service Worker aspects; that would require launching the app with something other than `ng serve` and the AIO CI is not set up for that.

The existing tests appeared to pass when run locally with the dev server.
However, only one of them actually ran; test runner reported.
"There were tests whose specified size is too big."

Decided to bypass E2E testing of this project for now.

PR Close #51687
2023-09-19 12:01:16 +02:00
Marc Wrobel
eca3db5692 docs(docs-infra): fix minor typos in angular.io (#47295) (#47295)
PR Close #47295

PR Close #47295
2022-09-07 10:47:21 -07:00
Bob Watson
0d192e8d0b docs: add info about request timeouts (#46882)
* Adds a short note about how service workers report request timeouts
* Updated heading levels to present a clearer hierarchy and cleaner local TOC
* Removed documentation lint errors
* Moves the service worker service timeout paragraph to a more logical topic in service-worker-devops
* Removes line error from the more logical topic.
* address feedback from PR review comments

fixes #46445

PR Close #46882
2022-07-20 08:47:59 -07:00
Billy Lando
253ac15ae8 docs: replace broken <br/> from service worker (#46193)
PR Close #46193
2022-05-31 12:02:35 -07:00
George Kalpakas
9f558003c4 docs(service-worker): fix alert closing tag (#45797)
This also allows correctly parsing other tags further below (such as
the `@reviewed` tag at the end).

PR Close #45797
2022-05-03 09:27:36 -07:00
Joe Martin (Crowdstaffing)
42289f25c6 docs: improve markdown (#45325)
The purpose of the changes is to clean all markdown to match a single pedantic style.

*   To ensure all changes in style are properly separated.
*   To ensure all styled content aligns to nearest 4-character-tab.
*   To ensure all code blocks use the Angular `<code-example>` or `<code-tab>` elements.
*   To ensure all markdown exists outside of html tags.
*   To ensure all images use the Angular style for `<img>` elements.
*   To ensure that all smart punctuation is replaced or removed.

    ```text
    ’, ’, “, ”, –, —, …
    ```

*   To ensure all content does not conflict with the following reserved characters.

    ```text
    @, $, *, &, #, |, <, >,
    ```

*   To ensure all content displays using html entities.

The following changes were made to files in the following directory.

```text
aio/content
```

The target files were markdown files.
The list of excluded files:

```text
.browserslistrc, .css, .conf, .editorconfig, .gitignore, .html, .js, .json, .sh, .svg, .ts, .txt, .xlf,
```

PR Close #45325
2022-04-08 19:36:30 +00:00
Arjen
9f5edce0e9 docs: explain how ngsw.json is generated (#44823)
Update aio/content/guide/service-worker-devops.md

ngsw.json is the manifest file which is generated at build time ( based on ngsw-config.json ). This explains this a bit clearer.
At first, I thought that it was a wrongly named filename. Not is it explicitly described.

Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com>

PR Close #44823
2022-02-01 18:26:42 +00:00
Teri Glover
353cad283d docs: Edits to remove jargon (#43000)
PR Close #43000
2021-09-27 10:44:21 -07:00
dario-piotrowicz
a1633c1c6e docs(service-worker): improve service worker guides (#43508)
improve slightly the angular.io guides related to service workers, by
means of fixes, styling, information and clarity changes

PR Close #43508
2021-09-22 17:48:39 +00:00
Naveed Ahmed
59353c6305 fix(service-worker): clear service worker cache in safety worker (#43324)
clear angular service worker cache in safety worker to ensure stale
or broken contents are not served in future requests

Fixes #43163

PR Close #43324
2021-09-13 14:34:32 -07:00
George Kalpakas
53fe557da7 feat(service-worker): include ServiceWorker version in debug info (#42622)
This commit includes the ServiceWorker version in the debug info shown
at `/ngsw/state` to make it easier to know what version of the
ServiceWorker script is controlling the page.

PR Close #42622
2021-06-24 09:55:32 -07:00
Teri Glover
391d08f6fb docs: edits to remove jargon and abbreviations (#41530)
PR Close #41530
2021-04-15 16:00:53 -07:00
George Kalpakas
a086976d68 fix(docs-infra): improve heading styles (#40427)
This commit includes some general improvements to heading styles
(font-weight, margin/padding). It also adds a horizontal separator above
`<h2>` headings to segment important sections more easily.
(As a consequence, we can remove several `<hr />` elements right before
`<h2>` headings.)

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40427
2021-02-02 12:04:55 -08:00
TinyMan
ec482dadb1 docs: clarrify use of sw behind redirect (#32915)
Closes #30684

PR Close #32915
2019-10-21 16:50:52 -04:00
Hoel IRIS
45c893d0e1 docs(service-worker): add info about recovering from degraded Driver state (#32682)
Related to #31865

PR Close #32682
2019-09-30 14:15:35 -07:00
Peter Johan Salomonsen
6200732e23 feat(service-worker): support bypassing SW with specific header/query param (#30010)
Add support for bypassing the ServiceWorker for a request by using the
ngsw-bypass header or query parameter.

Fixes #21191

PR Close #30010
2019-04-25 13:09:44 -07:00
Jurgen Van de Moere
b3edf494a4 docs(service-worker): fix small typo in devops guide (#29866)
PR Close #29866
2019-04-16 10:30:52 -07:00
Juri Strumpflohner
ae16378ee7 docs: fix wrong filename in text (#28832)
This should be `ngsw.json` not `ngsw-config.json` as the latter is only the src file that gets then compiled into the `ngsw.json` and placed into the `dist` folder
PR Close #28832
2019-02-19 13:34:09 -08:00
jenniferfell
0ef1f7ef0d docs: change links to cli wiki to link to new aio docs files m to z (#26492)
PR Close #26492
2018-10-17 11:06:07 -07:00
George Kalpakas
d1e716b2cb docs(service-worker): minor fixes/improvements (#23339)
PR Close #23339
2018-04-13 13:13:36 -07:00
Alex Rickabaugh
db3e65fb17 docs(service-worker): describe safety-worker.js in SW guide (#21921)
PR Close #21921
2018-01-31 10:25:14 -08:00
Vani
1ce46b56f8 docs: change titles to sentence case (#21620)
PR Close #21620
2018-01-18 18:22:09 -06:00
Dmitry Fisenko
bc66d27938 docs(service-worker): fix word wrap (#21114)
The fix removes space between 'c' and 'aches' in docs

PR Close #21114
2017-12-21 20:12:18 -08:00
chembu
f593552cfe docs(aio): Rename service worker files, update examples, move service worker under Techniques 2017-12-19 11:07:57 -08:00
Alex Rickabaugh
20e1cc049f fix(service-worker): check for updates on navigation
Currently the Service Worker checks for updates only on SW startup,
an event which happens frequently but also nondeterministically. This
makes it hard for developers to observe the update process or reason
about how updates will be delivered to users. This problem is
exacerbated by the DevTools behavior of keeping the SW alive
indefinitely while opened, effectively preventing the page from
updating at all.

This change causes the SW to additionally check for updates on
navigation requests (app page reloads). This creates deterministic
update behavior, and is much easier for developers to reason about.
It does leave the old update-on-SW-startup behavior in place, as
removing that would be a breaking change.

Fixes #20877
2017-12-15 15:19:20 -08:00
Kapunahele Wong
9bbec42a6c docs(aio): add service worker guide content and update nav (#20736)
PR Close #20736
2017-12-06 06:52:20 -08:00
George Kalpakas
47addd169d revert: docs(aio): add service worker guide content and update nav (#20021) (#20716)
* revert: style: broken build due to missing new lines

This reverts commit ba6af2a6dd.
The commit that introduced these files (48300067f) will also get
reverted.

* revert: docs(aio): add service worker guide content and update nav (#20021)

This reverts commit 48300067fb.
This commit has some issues (e.g. breaks some e2e tests, adds images
to the wrong directories, breaks linting, etc).
Reverting in order to investigate and fix.
2017-11-30 09:53:07 -08:00
Kapunahele Wong
48300067fb docs(aio): add service worker guide content and update nav (#20021)
PR Close #20021
2017-11-29 12:15:27 -06:00