Skip to content

Add chips style for ChoicePicker#2

Open
elishateng wants to merge 2 commits into
dalihub:mainfrom
elishateng:Add_chips_style_for_choicepicker_260612
Open

Add chips style for ChoicePicker#2
elishateng wants to merge 2 commits into
dalihub:mainfrom
elishateng:Add_chips_style_for_choicepicker_260612

Conversation

@elishateng

@elishateng elishateng commented Jun 12, 2026

Copy link
Copy Markdown
  1. Add chips style for ChoicePicker
  2. Reduce duplicated codes

The ChoicePicker has two styles chips and checkbox in A2UI version 0.9, but currently a2ui-dali only support checkbox style.

a2ui-dali chips style snapshot:
image

@elishateng elishateng requested a review from lwc0917 June 12, 2026 01:32
Comment thread src/renderer/a2ui-renderer.cpp Outdated
Comment thread src/renderer/a2ui-renderer.cpp Outdated
Comment thread src/renderer/a2ui-renderer.cpp Outdated
@lwc0917

lwc0917 commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

@elishateng hello.

The A2UI-DALI structure has been updated. We would appreciate it if you could update your code based on the updated version.

@elishateng elishateng force-pushed the Add_chips_style_for_choicepicker_260612 branch from b461c6e to 96d596b Compare June 16, 2026 07:04
@elishateng

Copy link
Copy Markdown
Author

@elishateng hello.

The A2UI-DALI structure has been updated. We would appreciate it if you could update your code based on the updated version.

Hi Mr. Lee,
Updated.

Snapshot

Chips style:

image

Checkbox style:

image

Test json:

[
    {
        "version": "v0.9",
        "createSurface": {
            "surfaceId": "hello",
            "catalogId": "basic"
        }
    },
    {
        "version": "v0.9",
        "updateComponents": {
            "surfaceId": "hello",
            "components": [
                {
                    "id": "root",
                    "component": "Column",
                    "children": [
                        "movie_filters"
                    ]
                },
                {
                    "id": "movie_filters",
                    "component": "Column",
                    "children": [
                        "filter_title",
                        "duration_row"
                    ]
                },
                {
                    "id": "filter_title",
                    "component": "Text",
                    "text": {
                        "path": "/filters/title"
                    },
                    "variant": "h1"
                },
                {
                    "id": "duration_row",
                    "component": "Row",
                    "children": [
                        "duration_image",
                        "duration_label",
                        "duration_options_picker"
                    ],
                    "align": "center"
                },
                {
                    "id": "duration_image",
                    "component": "Image",
                    "url": {
                        "path": "/filters/duration_image"
                    },
                    "fit": "contain",
                    "variant": "icon"
                },
                {
                    "id": "duration_label",
                    "component": "Text",
                    "text": "Duration",
                    "variant": "body",
                    "align": "center"
                },
                {
                    "id": "duration_options_picker",
                    "component": "ChoicePicker",
                    "options": [
                        {
                            "label": "Under 30 min",
                            "value": "under 30 min"
                        },
                        {
                            "label": "About 1 hour",
                            "value": "about 1 hour"
                        },
                        {
                            "label": "1.5-2 hours",
                            "value": "1.5-2 hours"
                        },
                        {
                            "label": "Over 2 hours",
                            "value": "over 2 hours"
                        }
                    ],
                    "value": {
                        "path": "/filters/duration"
                    },
                    "variant": "mutuallyExclusive",
                    "displayStyle": "chips"
                }
            ]
        }
    },
    {
        "version": "v0.9",
        "updateDataModel": {
            "surfaceId": "hello",
            "path": "/filters",
            "value": {
                "title": "Light-hearted Movie Recommendations",
                "duration_image": "../res/schedule_24dp.png",
                "duration": ["1.5-2 hours"]
            }
        }
    }
]

@elishateng elishateng force-pushed the Add_chips_style_for_choicepicker_260612 branch from 96d596b to 0c34eaa Compare June 16, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants