Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(manifest): Update manifest member pages to follow the same format #35557

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions files/en-us/web/manifest/background_color/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,9 @@ browser-compat: html.manifest.background_color

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>String</code></td>
</tr>
</tbody>
</table>

The `background_color` member defines a placeholder background color for the application page to display before its stylesheet is loaded. This value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded.
The `background_color` member defines a placeholder background color for the application page to display before its stylesheet is loaded.

This value is used by the user agent to draw the background color of a shortcut when the manifest is available before the stylesheet has loaded.

Therefore `background_color` should match the {{cssxref("background-color")}} CSS property in the site's stylesheet for a smooth transition between launching the web application and loading the site's content.

Expand Down
13 changes: 3 additions & 10 deletions files/en-us/web/manifest/categories/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,15 @@ browser-compat: html.manifest.categories

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>Array</code> of <code>String</code>s</td>
</tr>
</tbody>
</table>
The `categories` member is an array of strings defining the names of categories that the application supposedly belongs to.

The `categories` member is an array of strings defining the names of categories that the application supposedly belongs to. There is no standard list of possible values, but the W3C maintains [a list of known categories](https://github.com/w3c/manifest/wiki/Categories).
There is no standard list of possible values, but the W3C maintains [a list of known categories](https://github.com/w3c/manifest/wiki/Categories).

> **Note:** `categories` are used only as hints for catalogs or stores listing web applications. Like search engines and meta keywords, catalogs and stores are free to ignore them.

> **Note:** `categories` values are lower-cased by the stores and catalogs before processing, so "News" and "news" are treated as the same value. Developers are encouraged to use lower case in the first place.

## Example
## Examples

```json
"categories": ["books", "education", "medical"]
Expand Down
9 changes: 0 additions & 9 deletions files/en-us/web/manifest/description/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ browser-compat: html.manifest.description

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>String</code></td>
</tr>
</tbody>
</table>

The `description` member is a string in which developers can explain what the application does. `description` is directionality-capable, which means it can be displayed left to right or right to left based on the values of the [`dir`](/en-US/docs/Web/Manifest) and [`lang`](/en-US/docs/Web/Manifest) manifest members.

## Examples
Expand Down
103 changes: 32 additions & 71 deletions files/en-us/web/manifest/display_override/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,84 +9,45 @@ browser-compat: html.manifest.display_override

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>Array</code></td>
</tr>
</tbody>
</table>

The [`display`](/en-US/docs/Web/Manifest/display) member is used to determine the developer's preferred display mode for a website. It follows a process where the browser falls back to the next display mode if the requested one is not supported. In some advanced use cases, this fallback process might not be enough.

The `display_override` member solves this by letting the developer provide a sequence of display modes that the browser will consider before using the `display` member. Its value is an array of display modes that are considered in-order, and the first supported display mode is applied.

## Values
### Values

Display override objects are display-mode strings, the possible values are:

<table class="fullwidth-table standard-table">
<thead>
<tr>
<th scope="col">Display Mode</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>browser</code></td>
<td>
The application opens in a conventional browser tab or new window,
depending on the browser and platform. This is the default.
</td>
</tr>
<tr>
<td><code>fullscreen</code></td>
<td>
All of the available display area is used and no user agent
{{Glossary("chrome")}} is shown.
</td>
</tr>
<tr>
<td><code>minimal-ui</code></td>
<td>
The application will look and feel like a standalone application with
a minimal set of UI elements for controlling navigation. The
elements will vary by browser.
</td>
</tr>
<tr>
<td><code>standalone</code></td>
<td>
The application will look and feel like a standalone application. This
can include the application having a different window, its own icon in
the application launcher, etc. In this mode, the user agent will exclude
UI elements for controlling navigation, but can include other UI
elements such as a status bar.
</td>
</tr>
<tr>
<td><code>tabbed</code></td>
<td>
The application can contain multiple application contexts inside a single OS-level window. Supporting browsers can choose how to display these contexts, but a common approach is to provide a tab bar to switch between them.
</td>
</tr>
<tr>
<td><code>window-controls-overlay</code></td>
<td>
This display mode only applies when the application is in a separate PWA
window and on a desktop operating system. The application will opt-in to
the Window Controls Overlay feature, where the full window surface area
will be available for the app's web content and the window control buttons
(maximize, minimize, close, and other PWA-specific buttons) will appear
as an overlay above the web content.
</td>
</tr>
</tbody>
</table>

## Example
- `browser`

- : The application opens in a conventional browser tab or new window, depending on the browser and platform.
This is the default.

- `fullscreen`

- : All of the available display area is used and no user agent {{Glossary("chrome")}} is shown.

- `minimal-ui`

- : The application will look and feel like a standalone application with a minimal set of UI elements for controlling navigation.
The elements will vary by browser.

- `standalone`

- : The application will look and feel like a standalone application.
This can include the application having a different window, its own icon in the application launcher, etc.
In this mode, the user agent will exclude UI elements for controlling navigation, but can include other UI elements such as a status bar.

- `tabbed`

- : The application can contain multiple application contexts inside a single OS-level window.
Supporting browsers can choose how to display these contexts, but a common approach is to provide a tab bar to switch between them.

- `window-controls-overlay`

- : This display mode only applies when the application is in a separate PWA window and on a desktop operating system.
The application will opt-in to the Window Controls Overlay feature, where the full window surface area will be available for the app's web content and the window control buttons (maximize, minimize, close, and other PWA-specific buttons) will appear as an overlay above the web content.

## Examples

In the example below, the browser will consider the following display-mode fallback chain in this order: `fullscreen` → `minimal-ui` → `standalone`.

Expand Down
52 changes: 13 additions & 39 deletions files/en-us/web/manifest/file_handlers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@ browser-compat: html.manifest.file_handlers

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>Array</code></td>
</tr>
</tbody>
</table>

The `file_handlers` member specifies an array of objects representing the types of files an installed [progressive web app (PWA)](/en-US/docs/Web/Progressive_web_apps) can handle.

The `file_handlers` member is read by the browser when the PWA is installed and used to associate the application with a given set of file types at the operating system level.
Expand All @@ -27,39 +18,22 @@ For example, a PWA can be registered to handle files that match the `text/plain`
> [!NOTE]
> While the `file_handlers` member is used to register a PWA with a given set of file types, this only results in the operating system launching the PWA when a matching file is opened. The PWA then needs to actually handle the file using JavaScript code. See [Handling the files](#handling_the_files) for more information.

## Values
### Values

An array of objects. Each object in the array must contain the following values (`action` and `accept` are required):

<table class="fullwidth-table standard-table">
<thead>
<tr>
<th scope="col">Member</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>action</code></td>
<td>
A string containing the URL to navigate to when a file is handled.<br>
This URL must be within the navigation scope of the PWA, which is the set of URLs that the PWA can navigate to. The navigation scope of a PWA defaults to its <a href="/en-US/docs/Web/Manifest/start_url"><code>start_url</code></a> member, but can also be defined by using the <a href="/en-US/docs/Web/Manifest/scope"><code>scope</code></a> member.
</td>
</tr>
<tr>
<td><code>accept</code></td>
<td>
An object. For each property in the object:
<ul>
<li>The property key is a MIME type.</li>
<li>The property value is an array of strings representing file extensions associated with that MIME type.</li>
</ul>
</td>
</tr>
</tbody>
</table>

## Example
- `action`

- : A string containing the URL to navigate to when a file is handled.
This URL must be within the navigation scope of the PWA, which is the set of URLs that the PWA can navigate to. The navigation scope of a PWA defaults to its [`start_url`](/en-US/docs/Web/Manifest/start_url) member, but can also be defined by using the [`scope`](/en-US/docs/Web/Manifest/scope) member.

- `accept`

- : An object. For each property in the object:
- The property key is a MIME type.
- The property value is an array of strings representing file extensions associated with that MIME type.

## Examples

In this example, a web app manifest declares one file handler that registers the app to handle audio files. Other manifest members such as `name`, or `icons` are not included in this example for brevity:

Expand Down
9 changes: 0 additions & 9 deletions files/en-us/web/manifest/id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ browser-compat: html.manifest.id

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>String</code></td>
</tr>
</tbody>
</table>

The `id` member is a string that represents the _identity of the web application_ — the unique identifier for the web application. If the web application ID does not match an existing ID, the application will be treated as a unique identity even if it is from the same URL.

A valid `id` needs to be same-origin with `start_url`. If the `id` is a relative URL, it is resolved using the origin of [`start_url`](/en-US/docs/Web/Manifest/start_url). The fragment is always ignored.
Expand Down
48 changes: 13 additions & 35 deletions files/en-us/web/manifest/launch_handler/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,24 @@ browser-compat: html.manifest.launch_handler

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}{{SeeCompatTable}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>Object</code></td>
</tr>
</tbody>
</table>

The `launch_handler` member defines values that control the launch of a web application. Currently it can only contain a single value, `client_mode`, which specifies the context in which the app should be loaded when launched. For example, in an existing web app client containing an instance of the app, or in a new web app client. This leaves scope for more `launch_handler` values to be defined in the future.

## launch_handler item values
### Values

`launch_handler` objects may contain the following values:

<table class="fullwidth-table standard-table">
<thead>
<tr>
<th scope="col">Member</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>client_mode</code></td>
<td><p>A string, or comma-separated array of strings, which specifies the context in which the app should be loaded when launched. If an array of strings is provided, the first valid value is used. Possible values are:</p>
<dl>
<dt><code>auto</code></dt>
<dd>The user agent decides what context makes sense for the platform to load the app in. For example, <code>navigate-existing</code> might make more sense on mobile, where single app instances are commonplace, whereas <code>navigate-new</code> might make more sense in a desktop context. This is the default value used if all the provided values are invalid.</dd>
<dt><code>focus-existing</code></dt>
<dd>If the app is already loaded in a web app client, it is brought into focus but not navigated to the launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, <code>navigate-new</code> behavior is used instead.</dd>
<dt><code>navigate-existing</code></dt>
<dd>If the app is already loaded in a web app client, it is brought into focus and navigated to the specified launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, <code>navigate-new</code> behavior is used instead.</dd>
<dt><code>navigate-new</code></dt>
<dd>The app is loaded inside a new web app client. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented.</dd>
</dl>
</td>
</tr>
</tbody>
</table>
- `client_mode`

- : A string, or comma-separated array of strings, which specifies the context in which the app should be loaded when launched. If an array of strings is provided, the first valid value is used.
Possible values are:</p>
- `auto`
- : The user agent decides what context makes sense for the platform to load the app in. For example, `navigate-existing` might make more sense on mobile, where single app instances are commonplace, whereas `navigate-new` might make more sense in a desktop context. This is the default value used if all the provided values are invalid.
- `focus-existing`
- : If the app is already loaded in a web app client, it is brought into focus but not navigated to the launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, `navigate-new` behavior is used instead.
- `navigate-existing`
- : If the app is already loaded in a web app client, it is brought into focus and navigated to the specified launch target URL. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented. If the app is not already loaded in a web app client, `navigate-new` behavior is used instead.
- `navigate-new`
- : The app is loaded inside a new web app client. The target URL is made available via {{domxref("Window.launchQueue")}} to allow additional custom launch navigation handling to be implemented.

## Examples

Expand Down
11 changes: 1 addition & 10 deletions files/en-us/web/manifest/orientation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,14 @@ browser-compat: html.manifest.orientation

{{QuickLinksWithSubpages("/en-US/docs/Web/Manifest")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">Type</th>
<td><code>String</code></td>
</tr>
</tbody>
</table>

The `orientation` member defines the default orientation for all the website's top-level {{Glossary("Browsing context", "browsing contexts")}}.

> **Note:** `orientation` and/or its specific values might not be supported by a user agent on various display modes because supporting them does not make sense for the particular context.

> [!NOTE]
> The orientation can be changed at runtime via the [Screen Orientation API](/en-US/docs/Web/API/Screen_Orientation_API).

## Values
### Values

`orientation` can take one of the following values:

Expand Down
Loading