h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.98k stars 327 forks source link

Add color option for ui.choice #2084

Open gaborfodor opened 1 year ago

gaborfodor commented 1 year ago

Is your feature request related to a problem? Please describe

Currenltly an option could be either disabled or enabled. It would be nice in some cases to highlight certain options. One way could be to change the fontcolor.

image

Describe the solution you'd like

Add a new optional color to ui.choice to be able to set fontcolor.

mturoci commented 1 year ago

Thanks for the feature suggestion @gaborfodor. This is currently possible only via custom CSS, although not recommended.

It would be nice in some cases to highlight certain options.

What's the use case for such a highlight? I have only seen such radio buttons to be equal - same styling.

gaborfodor commented 1 year ago

@mturoci for Label Genie we have classification annotation tasks where a pretrained model has probablities about the most likely option. We wanted to highlight that option.

mturoci commented 1 year ago

In that case, I would go for an Option label (most likely) + make it appear as the first.

gaborfodor commented 1 year ago

Currently we have a workaround indicating the probability of each option in the label text.

Reordering would not be ideal as it would increase confusion. Fix buttons help with repetitive annotations.

mturoci commented 1 year ago

Reordering would not be ideal as it would increase confusion

I thought the options are ordered from most likely to least likely, isn't it the case?

Fix buttons help with repetitive annotations.

Not sure what you meant here.

gaborfodor commented 1 year ago

The order of the options is fix. For example it helps if you always have to click to the same area for positive/negative reviews.

image

mturoci commented 1 year ago

Thanks for providing the example, that helps!

The order of the options is fix. For example it helps if you always have to click to the same area for positive/negative reviews.

Fully agree.

I think what you have is good enough. One more improvement I would suggest is to select the highest probability option as default. This would convey the "most likely option" information + make the user's life easier as it is what they wanted to select probably anyway.