From 80336e1c8f95f69078c3dfd9f05b96f38ce90c6b Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Thu, 20 Jun 2024 08:31:36 +0200 Subject: [PATCH] docs: fix docs for docusaurus --- docs/pwa/pwa.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/pwa/pwa.md b/docs/pwa/pwa.md index a71126bfa..bda30607a 100644 --- a/docs/pwa/pwa.md +++ b/docs/pwa/pwa.md @@ -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 @@ -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. |