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

Move icons property type definition into Types page in website #493

Merged
merged 3 commits into from
Nov 12, 2021
Merged
Changes from 1 commit
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
Next Next commit
Move icons property type definition into Types page in website
  • Loading branch information
kriswest committed Nov 9, 2021
commit 74bede3c5a108d226c3a99a577edf574752509cd
55 changes: 0 additions & 55 deletions docs/api/ref/Icon.md

This file was deleted.

12 changes: 6 additions & 6 deletions docs/api/ref/Metadata.md
Original file line number Diff line number Diff line change
@@ -61,12 +61,7 @@ In situations where a desktop agent connects to multiple app directories or mult

A desktop agent (typically for _system_ channels) may want to provide additional information about how a channel can be represented in a UI. A common use case is for color linking.

#### See also

* [`Channel`](Channel)
* [`DesktopAgent.getSystemChannels`](DesktopAgent#getsystemchannels)

### Properties
#### Properties

#### `name`

@@ -92,6 +87,11 @@ glyph: string;

A URL of an image that can be used to display this channel.

#### See also

* [`Channel`](Channel)
* [`DesktopAgent.getSystemChannels`](DesktopAgent#getsystemchannels)

## `ImplementationMetadata`

```typescript
49 changes: 49 additions & 0 deletions docs/api/ref/Types.md
Original file line number Diff line number Diff line change
@@ -88,3 +88,52 @@ or pass full app metadata, giving the desktop agent more information about the t
* [`DesktopAgent.raiseIntent`](DesktopAgent#raiseintent)
* [`DesktopAgent.raiseIntentForContext`](DesktopAgent#raiseintentforcontext)
* [`IntentResolution`](Metadata#intentresolution)


## `Icon`

```typescript
interface Icon {
src: string;
size?: string;
type?: string;
}
```

AppMetadata includes an icons property allowing multiple icon types to be specified. Various properties may be used by the Desktop Agent to decide which icon is the most suitable to be used considering the application chooser UI, device DPI and formats supported by the system.

#### Example

```js
"icons": [
{
"src": "https://app.foo.icon/app_icons/lowres.webp",
"size": "48x48",
"type": "image/webp"
},
{
"src": "https://app.foo.icon/app_icons/hd_hi.svg",
"size": "72x72",
"type": "image/svg+xml"
}
]
```

#### Properties

#### `src`

The fully qualified url to the icon.

#### `size`

The dimension of the icon using formatted as "<height>x<width>"

#### `type`

The media type of the icon. If not provided the Desktop agent may refer to the src file extension.



#### See also
* [`AppMetadata`](Metadata#appmetadata)