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

feat: List format options for ui.labeled_value #1137

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ericlln
Copy link
Contributor

@ericlln ericlln commented Mar 14, 2025

  • Implements Intl.ListFormat for use in ui.labeled_value. Currently it is only supported in LabeledValue, but it could be used in components that might support it in the future.

Test Snippet

from deephaven import ui


@ui.component
def labeled_value_list_formatting():

    return [
        ui.labeled_value(
            label="Interests",
            value=["Travel", "Hiking", "Snorkeling", "Camping"],
            format_options={"type": "conjunction"},
        ),
        ui.labeled_value(
            label="Travel Destination",
            value=["Paris", "Tokyo", "New York", "Sydney"],
            format_options={"type": "disjunction"},
        ),
        ui.labeled_value(
            label="Clothing Sizes",
            value=["XS", "S", "M", "L", "XL"],
            format_options={"type": "unit", "style": "narrow"},
        ),
    ]


my_labeled_value_list_formatting = labeled_value_list_formatting()

@ericlln ericlln self-assigned this Mar 14, 2025
Copy link

ui docs preview (Available for 14 days)

Copy link

ui docs preview (Available for 14 days)

@ericlln ericlln marked this pull request as ready for review March 14, 2025 17:55
@ericlln ericlln requested review from a team and jnumainville and removed request for a team March 14, 2025 17:55
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.

1 participant