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

Support buttons of arbitrary atomic type #3270

Open
adubovik opened this issue Feb 27, 2025 · 0 comments
Open

Support buttons of arbitrary atomic type #3270

adubovik opened this issue Feb 27, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request _priority_2

Comments

@adubovik
Copy link
Contributor

Currenly only buttons of the number type are supported.

It would be great to support other atomic types: integer, string, boolean:

integer
{
    "title": "Configuration title",
    "type": "object",
    "properties": {
        "int_button_field": {
            "description": "Button description",
            "title": "Int Button Field",
            "type": "integer",
            "dial:widget": "buttons",
            "oneOf": [
                {
                    "const": 10,
                    "title": "Title1",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                },
                {
                    "const": 20,
                    "title": "Title2",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                }
            ]
        }
    },
    "additionalProperties": false
}
string
{
    "title": "Configuration title",
    "type": "object",
    "properties": {
        "int_button_field": {
            "description": "Button description",
            "title": "Int Button Field",
            "type": "string",
            "dial:widget": "buttons",
            "oneOf": [
                {
                    "const": "A",
                    "title": "Title1",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                },
                {
                    "const": "B",
                    "title": "Title2",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                }
            ]
        }
    },
    "additionalProperties": false
}
boolean
{
    "title": "Configuration title",
    "type": "object",
    "properties": {
        "int_button_field": {
            "description": "Button description",
            "title": "Int Button Field",
            "type": "boolean",
            "dial:widget": "buttons",
            "oneOf": [
                {
                    "const": true,
                    "title": "Title1",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                },
                {
                    "const": false,
                    "title": "Title2",
                    "dial:widgetOptions": {
                        "confirmationMessage": null,
                        "populateText": null,
                        "submit": false
                    }
                }
            ]
        }
    },
    "additionalProperties": false
}
@IlyaBondar IlyaBondar added _priority_2 enhancement New feature or request labels Feb 27, 2025
@Gimir Gimir moved this to In Progress in AI DIAL Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request _priority_2
Projects
Status: In Progress
Development

No branches or pull requests

3 participants