-
Notifications
You must be signed in to change notification settings - Fork 132
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
Icons spec #319
Merged
Merged
Icons spec #319
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6df006b
add app metadata icon spec
6f2761b
add Icon TS files
2db6846
add mention of fq url
c915be1
improve explanation
be082ad
fixes typo
358a7ac
Merge remote-tracking branch 'upstream/master' into icon-spec
c881229
update medatada.md
e73c755
fix link
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
id: Icon | ||
sidebar_label: Icon | ||
title: Icon | ||
hide_title: true | ||
--- | ||
# `Icon` | ||
|
||
```typescript | ||
interface Icon { | ||
src: string; | ||
size: string; | ||
type: string; | ||
} | ||
``` | ||
|
||
App Metadata icon's description. | ||
|
||
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" | ||
} | ||
] | ||
``` | ||
|
||
## 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`](AppMetadata) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* Copyright 2019 FINOS FDC3 contributors - see NOTICE file | ||
*/ | ||
|
||
export interface Icon { | ||
/** The icon url */ | ||
readonly src: string; | ||
|
||
/** The icon dimension */ | ||
readonly size?: string; | ||
|
||
/** The icon media type */ | ||
readonly type?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -347,9 +347,15 @@ components: | |
Icon: | ||
description: Icon holder | ||
properties: | ||
icon: | ||
src: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a breaking change. Considering that this is meant to be part of the "2.0" release I thought that it would be I acceptable.
|
||
type: string | ||
description: Icon URL | ||
size: | ||
type: string | ||
description: Icon dimension formatted as "<height>x<width>" | ||
type: | ||
type: string | ||
description: Image media type. If not present the Desktop Agent may use the src file extension | ||
AppImage: | ||
description: App Image holder | ||
properties: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that in the PWA manifest spec the url may be relative. However in the context of FDC3 I couldn't find where a Desktop agent may retrieve the base url of an application so that when given a relative url it could construct the fully qualified url.
That is the reason why only fully qualified url are allowed here.