Skip to content

Commit

Permalink
docs: improvements for developer portal (#1362)
Browse files Browse the repository at this point in the history
* docs: fix links

* docs: fix links

* docs: fix more links

* docs: fix link to playground

* docs: change docs build

* docs: changed formatting for warning

* docs: properly change notices for docusaurus

* docs: fix linting
  • Loading branch information
Topener authored Nov 29, 2023
1 parent f32d52b commit 3253800
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/advanced/offline/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Offline tools

!> **WARNING** These features are considered **experimental** and are **subject to breaking changes outside of the normal release cycle.**
:::warning Experimental
These features are considered **experimental** and are **subject to breaking changes outside of the normal release cycle.**
:::

The app platform provides some support for PWA features, including a `manifest.json` file for installability and service worker which can provide offline caching. In addition to those features, the app runtime provides support for ["cacheable sections"](./CacheableSections.md), which are sections of an app that can be individually cached on-demand. The [`useCacheableSection` hook](./CacheableSections.md#usecacheablesection-api) and the [`CacheableSection` component](./CacheableSections.md#cacheablesection-api) provide the controls for the section and the wrapper for the section, respectively. The [`useCachedSections` hook](./CacheableSections.md#usecachedsections-api) returns a list of sections that are stored in the cache and a function that can delete them.

Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/offline/useOnlineStatus.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# useOnlineStatus

!> This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md) is usually better for that reason, and is therefore recommended.
:::info Internet Only
This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md) is usually better for that reason, and is therefore recommended.
:::

The `useOnlineStatus` returns whether the client is online or offline. It debounces the returned values by default to prevent rapid changes of any UI elements that depend on the online status.

Expand Down
4 changes: 3 additions & 1 deletion docs/advanced/services.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Services

!> **NOTE**<br/>Services are purely a concept **internal** to `@dhis2/app-runtime` - you don't need to care about them to use it.
:::caution Note
Services are purely a concept **internal** to `@dhis2/app-runtime` - you don't need to care about them to use it.
:::

Internally, `@dhis2/app-runtime` is composed of several functionally-isolated **services**. Each of these services is a private (unpublished) npm package which is bundled into the final `@dhis2/app-runtime` library at build-time. Each services exposes a relevant Context provider as well as various Hook and Component interfaces which are re-exported by the `@dhis2/app-runtime` public package. There are currently only 2 services, but more will be added soon.

Expand Down

0 comments on commit 3253800

Please sign in to comment.