Skip to content

Conversation

@nan-yu
Copy link
Collaborator

@nan-yu nan-yu commented Feb 10, 2026

#605 accidentally broke the v0.9/standard_catalog.json.

This commit fixes the invalid JSON schema and reformats it.

Description

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. For larger changes, raising an issue first helps reduce redundant work.

Pre-launch Checklist

If you need help, consider asking for advice on the discussion board.

google#605 accidentally broke the
v0.9/standard_catalog.json. This commit fixes the invalid JSON schema
and reformats it.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an invalid JSON schema in standard_catalog.json by correcting the structure and reformatting the file. The changes look good and make the schema valid.

I've added a few suggestions to further improve the schema's correctness and maintainability:

  • In ChoicePicker, the type of the value property should depend on the variant to correctly handle single vs. multiple selections.
  • The min and max properties of the Slider component could be made dynamic to allow for more flexible UIs.
  • The duplicated definitions for min and max in DateTimeInput could be refactored into a reusable type in $defs to improve maintainability.

Comment on lines 783 to 790
"min": {
"type": "number",
"description": "The minimum value of the slider."
},
"max": {
"type": "number",
"description": "The maximum value of the slider."
},
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The min and max properties of the Slider component are currently defined as static numbers. To allow for more flexible UIs where the slider's range can be determined at runtime, consider changing them to DynamicNumber, similar to the value property. This would allow binding the range to the data model.

            "min": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The minimum value of the slider."
            },
            "max": {
              "$ref": "common_types.json#/$defs/DynamicNumber",
              "description": "The maximum value of the slider."
            }

Comment on lines 836 to 887
"min": {
"allOf": [
{
"$ref": "common_types.json#/$defs/DynamicString"
},
"then": {
"oneOf": [
{
"format": "date"
},
{
"format": "time"
},
{
"format": "date-time"
}
]
{
"if": {
"type": "string"
},
"then": {
"oneOf": [
{
"format": "date"
},
{
"format": "time"
},
{
"format": "date-time"
}
]
}
}
}
],
"description": "The minimum allowed date/time in ISO 8601 format."
},
"max": {
"allOf": [
{
"$ref": "common_types.json#/$defs/DynamicString"
},
{
"if": {
"type": "string"
],
"description": "The minimum allowed date/time in ISO 8601 format."
},
"max": {
"allOf": [
{
"$ref": "common_types.json#/$defs/DynamicString"
},
"then": {
"oneOf": [
{
"format": "date"
},
{
"format": "time"
},
{
"format": "date-time"
}
]
{
"if": {
"type": "string"
},
"then": {
"oneOf": [
{
"format": "date"
},
{
"format": "time"
},
{
"format": "date-time"
}
]
}
}
}
],
"description": "The maximum allowed date/time in ISO 8601 format."
],
"description": "The maximum allowed date/time in ISO 8601 format."
},
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The definitions for min and max in DateTimeInput are identical. To improve maintainability and reduce duplication, you could define a new reusable type DynamicDateTimeString in the $defs section of this file and reference it for both min and max.

Here's how you could define it in $defs:

"DynamicDateTimeString": {
  "allOf": [
    {
      "$ref": "common_types.json#/$defs/DynamicString"
    },
    {
      "if": {
        "type": "string"
      },
      "then": {
        "oneOf": [
          {
            "format": "date"
          },
          {
            "format": "time"
          },
          {
            "format": "date-time"
          }
        ]
      }
    }
  ]
}

And then use it in DateTimeInput:

"min": {
  "$ref": "#/$defs/DynamicDateTimeString",
  "description": "The minimum allowed date/time in ISO 8601 format."
},
"max": {
  "$ref": "#/$defs/DynamicDateTimeString",
  "description": "The maximum allowed date/time in ISO 8601 format."
}

@gspencergoog
Copy link
Collaborator

Closing because this was fixed in #607

@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants