Skip to content

Commit

Permalink
docs: fix docs for docusaurus
Browse files Browse the repository at this point in the history
  • Loading branch information
Topener authored and kabaros committed Jun 20, 2024
1 parent 9bdb7dd commit 80336e1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions docs/pwa/pwa.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

The App Platform provides some tools that can enable some PWA features and offline caching.

!> **WARNING** These features are considered **experimental** and are **subject to breaking changes outside of the normal release cycle.** They are for advanced purposes only and have some significant drawbacks in their first implementation. Keep an eye out for a more robust implementation in the future!
:::warning
These features are considered **experimental** and are **subject to breaking changes outside of the normal release cycle.** They are for advanced purposes only and have some significant drawbacks in their first implementation. Keep an eye out for a more robust implementation in the future!
:::

### Opting In

Expand Down Expand Up @@ -63,13 +65,13 @@ A number of messages are sent between the service worker and a client using the

**NB** These are internal and added only for developer reference.

| **Message type (event.data.type)** | **Sent by? (SW or Client)** | **Payload expected (event.data.payload)** | **Event** | **Notes** |
| ---------------------------------- | --------------------------- | ------------------------------------------ | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SKIP_WAITING | Client | | Client confirms using newly installed service worker | Activates newly installed and waiting service worker. A ‘controller change’ event will be triggered, upon which the client should reload the window to use the most recent static assets. |
| START_RECORDING | Client | { sectionId: String, recordingDelay: Int } | Starts recording mode | Recording delay is how long to wait (in ms) after all pending requests have finished before stopping recording |
| RECORDING_STARTED | Service worker | | Service worker is prepared to record network requests | Safe to initiate recorded network requests without triggering race conditions |
| RECORDING_ERROR | Service worker | { error: Error } | Error in recording | Something went wrong with the recording; any recorded requests are scrapped. Previous recordings are safe from being overwritten. |
| CONFIRM_RECORDING_COMPLETION | Service worker | | Recording has finished | As a measure to avoid saving faulty recordings, the service worker will prompt the client to confirm completion of the recording. A 10-second timer will be started, and if the client has not responded with a “CONFIRM_COMPLETION” message, the recording will be scrapped. |
| COMPLETE_RECORDING | Client | | Responding to service worker that requests completion | Client confirms that conditions are good and the completed recording should be saved. A previous recording will be overwritten at this point, and data about the recording will be saved in the IndexedDB. |
| RECORDING_COMPLETED | Service worker | | Recording completed & saved | The above completion operations are complete. The client can now resume normal activity. |
| DELETE_RECORDED_SECTION | Client | { sectionId: String } | Delete a section | If a recorded section with the specified ID exists, its cached requests will be deleted and the section data in IndexedDB will be removed. |
| **Message type (event.data.type)** | **Sent by? (SW or Client)** | **Payload expected (event.data.payload)** | **Event** | **Notes** |
| ---------------------------------- | --------------------------- | -------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SKIP_WAITING | Client | | Client confirms using newly installed service worker | Activates newly installed and waiting service worker. A ‘controller change’ event will be triggered, upon which the client should reload the window to use the most recent static assets. |
| START_RECORDING | Client | `{ sectionId: String, recordingDelay: Int }` | Starts recording mode | Recording delay is how long to wait (in ms) after all pending requests have finished before stopping recording |
| RECORDING_STARTED | Service worker | | Service worker is prepared to record network requests | Safe to initiate recorded network requests without triggering race conditions |
| RECORDING_ERROR | Service worker | `{ error: Error }` | Error in recording | Something went wrong with the recording; any recorded requests are scrapped. Previous recordings are safe from being overwritten. |
| CONFIRM_RECORDING_COMPLETION | Service worker | | Recording has finished | As a measure to avoid saving faulty recordings, the service worker will prompt the client to confirm completion of the recording. A 10-second timer will be started, and if the client has not responded with a “CONFIRM_COMPLETION” message, the recording will be scrapped. |
| COMPLETE_RECORDING | Client | | Responding to service worker that requests completion | Client confirms that conditions are good and the completed recording should be saved. A previous recording will be overwritten at this point, and data about the recording will be saved in the IndexedDB. |
| RECORDING_COMPLETED | Service worker | | Recording completed & saved | The above completion operations are complete. The client can now resume normal activity. |
| DELETE_RECORDED_SECTION | Client | `{ sectionId: String }` | Delete a section | If a recorded section with the specified ID exists, its cached requests will be deleted and the section data in IndexedDB will be removed. |

0 comments on commit 80336e1

Please sign in to comment.