Skip to content

Commit

Permalink
Merge branch 'master' into catch-up-alpha-12-with-master
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Jun 20, 2024
2 parents 59bae7e + 80336e1 commit 5789973
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [11.4.2](https://github.com/dhis2/app-platform/compare/v11.4.1...v11.4.2) (2024-06-18)


### Bug Fixes

* do not encode username, password ([#852](https://github.com/dhis2/app-platform/issues/852)) ([2fb4272](https://github.com/dhis2/app-platform/commit/2fb4272130000b383c91d46ba1b3dac44bb13ebf))

## [11.4.1](https://github.com/dhis2/app-platform/compare/v11.4.0...v11.4.1) (2024-06-06)


Expand Down
4 changes: 2 additions & 2 deletions adapter/src/components/LoginModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const loginWithNewEndpoints = async ({
await postJSON(
`${server}/api/auth/login`,
JSON.stringify({
username: encodeURIComponent(username),
password: encodeURIComponent(password),
username,
password,
})
)
window.location.reload()
Expand Down
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 5789973

Please sign in to comment.