Skip to content
Merged
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
19 changes: 19 additions & 0 deletions specification/v0_9/json/catalogs/minimal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal A2UI Catalog

This folder contains a minimal A2UI component catalog (`minimal_catalog.json`) to be used as a test bed for testing new renderer implementations.

## Purpose

The basic A2UI catalog is comprehensive and features many components, functions, and layout primitives. Building a new renderer from scratch to support the entire catalog can be overwhelming. The minimal catalog reduces the surface area to a core set of fundamental components:

- **Text**: For rendering text strings.
- **Row**: For horizontal flex layouts.
- **Column**: For vertical flex layouts.
- **Button**: For basic interactivity and action dispatching.
- **TextField**: For two-way data-bound user inputs.

By targeting this minimal catalog first, new renderer implementations can establish a solid foundation—covering layout algorithms, component nesting, data binding, and event handling—before scaling up to the full basic catalog.

## Examples

The `examples/` directory contains 5 JSON arrays of layout messages (`server_to_client_list` format) demonstrating various UI scenarios using only the components defined in this minimal catalog. They serve as basic integration tests.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "example_1",
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "example_1",
"components": [
{
"id": "root",
"component": "Text",
"text": "Hello, Minimal Catalog!",
"variant": "h1"
}
]
}
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It's a standard convention to end files with a newline character. Some tools and systems expect this and may not process the file correctly without it. I've noticed this in all the new JSON files in this pull request.

Suggested change
]
]

Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "example_2",
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "example_2",
"components": [
{
"id": "root",
"component": "Row",
"children": ["left_text", "right_text"],
"justify": "spaceBetween",
"align": "center"
},
{
"id": "left_text",
"component": "Text",
"text": "Left Content",
"variant": "body"
},
{
"id": "right_text",
"component": "Text",
"text": "Right Content",
"variant": "caption"
}
]
}
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Please add a newline at the end of the file. It's a standard convention that helps prevent issues with some file processing tools.

Suggested change
]
]

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "example_3",
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "example_3",
"components": [
{
"id": "root",
"component": "Column",
"children": ["title", "action_button"],
"justify": "center",
"align": "center"
},
{
"id": "title",
"component": "Text",
"text": "Click the button below",
"variant": "body"
},
{
"id": "action_button",
"component": "Button",
"child": "button_label",
"variant": "primary",
"action": {
"event": {
"name": "button_clicked",
"context": {}
}
}
},
{
"id": "button_label",
"component": "Text",
"text": "Click Me"
}
]
}
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Please add a newline at the end of the file. It's a standard convention that helps prevent issues with some file processing tools.

Suggested change
]
]

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "example_4",
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json",
"sendDataModel": true
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "example_4",
"components": [
{
"id": "root",
"component": "Column",
"children": ["form_title", "username_field", "password_field", "submit_button"],
"justify": "start",
"align": "stretch"
},
{
"id": "form_title",
"component": "Text",
"text": "Login",
"variant": "h2"
},
{
"id": "username_field",
"component": "TextField",
"label": "Username",
"value": { "path": "/username" },
"variant": "shortText"
},
{
"id": "password_field",
"component": "TextField",
"label": "Password",
"value": { "path": "/password" },
"variant": "obscured"
},
{
"id": "submit_button",
"component": "Button",
"child": "submit_label",
"variant": "primary",
"action": {
"event": {
"name": "login_submitted",
"context": {
"user": { "path": "/username" },
"pass": { "path": "/password" }
}
}
}
},
{
"id": "submit_label",
"component": "Text",
"text": "Sign In"
}
]
}
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Please add a newline at the end of the file. It's a standard convention that helps prevent issues with some file processing tools.

Suggested change
]
]

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"version": "v0.9",
"createSurface": {
"surfaceId": "example_5",
"catalogId": "https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json"
}
},
{
"version": "v0.9",
"updateComponents": {
"surfaceId": "example_5",
"components": [
{
"id": "root",
"component": "Column",
"children": ["header", "form_row", "footer"],
"justify": "spaceBetween",
"align": "stretch"
},
{
"id": "header",
"component": "Text",
"text": "User Profile Form",
"variant": "h1"
},
{
"id": "form_row",
"component": "Row",
"children": ["first_name", "last_name"],
"justify": "start",
"align": "start"
},
{
"id": "first_name",
"component": "TextField",
"label": "First Name",
"value": { "path": "/firstName" },
"weight": 1
},
{
"id": "last_name",
"component": "TextField",
"label": "Last Name",
"value": { "path": "/lastName" },
"weight": 1
},
{
"id": "footer",
"component": "Text",
"text": "Please fill out all fields.",
"variant": "caption"
}
]
}
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Please add a newline at the end of the file. It's a standard convention that helps prevent issues with some file processing tools.

Suggested change
]
]

Loading
Loading