-
Notifications
You must be signed in to change notification settings - Fork 7
Render method to enable card-like displays in wallets and displayers #39
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
base: main
Are you sure you want to change the base?
Conversation
| [=verifiable credential=] into a standardized JSON card format. This format | ||
| enables wallets to display credentials in a responsive card layout with key | ||
| data highlighted and configurable additional fields. Wallets that implement | ||
| this method can render the standardized JSON output into their own card UI |
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.
| this method can render the standardized JSON output into their own card UI | |
| this method can render the standardized JSON output in their own card UI |
| </p> | ||
|
|
||
| <p> | ||
| The template is a JSON object that matches the json-card output structure. |
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.
| The template is a JSON object that matches the json-card output structure. | |
| The template is a JSON object that matches the `json-card` output structure. |
| processing the template, JSON pointer strings are evaluated against the | ||
| credential data and replaced with the resolved values. The template MUST | ||
| conform to the JSON template schema defined below, and the resulting output | ||
| MUST conform to the json-card output schema. Compound data across multiple |
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.
| MUST conform to the json-card output schema. Compound data across multiple | |
| MUST conform to the `json-card` output schema. Compound data across multiple |
| </pre> | ||
|
|
||
| <p> | ||
| The following example shows a valid json-card template with JSON pointer |
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.
| The following example shows a valid json-card template with JSON pointer | |
| The following example shows a valid `json-card` template with JSON pointer |
| </table> | ||
|
|
||
| <p> | ||
| The following example shows a valid json-card output: |
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.
| The following example shows a valid json-card output: | |
| The following example shows a valid `json-card` output: |
| </ol> | ||
| </li> | ||
| <li> | ||
| Validate the resulting JSON object against the json-card output schema. If |
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.
| Validate the resulting JSON object against the json-card output schema. If | |
| Validate the resulting JSON object against the `json-card` output schema. If |
msporny
left a comment
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.
At a high level, this looks useful to me. A couple of suggestions:
- Perhaps we can call this the "Summary" or "Card" render suite? I don't know what a "json-card" is and what this is actually doing is providing a fallback summary display.
- What is the Internationalization and Accessibility story here? I don't think we'll pass the i18n and a11y reviews without one.
| "issueDate": "/validFrom", | ||
| "expirationDate": "/validUntil" |
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.
I don't understand the purpose of these properties?
| "label": "Institution", | ||
| "value": "/issuer" |
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.
| "label": "Institution", | |
| "value": "/issuer" | |
| "label": "Institution", | |
| "language": "en", | |
| "value": "/issuer" |
We could do this for i18n?
|
+1 to the concept in this PR. I think if any VC has both a "Summary Card JSON" render method and a (forthcoming PR) sandboxed-HTML render method, it should cover the vast majority of rendering cases. The "Summary Card JSON" rendering is useful for interfaces that want to have significant control over their own UX and integrate perhaps many different VCs at once into a unified view (lists, tables, cards, etc.) and the sandboxed-HTML render method provides the issuer's preferred custom view of a single VC (potentially even interactive!). |
For discussion and consideration, I don't have any particular product that aims to use this concept imminently. Feel free to edit.
The concept is:
fields, and detail views could display all of thefields.Preview | Diff