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

Add readOnly setting for switch and slider components #151

Closed
tmrobert8 opened this issue Nov 2, 2018 · 4 comments
Closed

Add readOnly setting for switch and slider components #151

tmrobert8 opened this issue Nov 2, 2018 · 4 comments

Comments

@tmrobert8
Copy link

Would be really nice to have a switch that is display only. This is useful to show state where the user can't modify the state directly. Example: let's say I have a Kaleidescape system and am playing a movie. One of the attributes is whether the movie is a color movie or black/white. Would be nice for the user to add that to his display - but it's obviously not an editable item.

While I can get around it by using a text label - for binary type of items, the switch UI is much nicer and easier to understand. If we could add a 'configuration.editable' attribute (that defaults to true), then I can create a UI switch to represent this correctly..

@pfiaux
Copy link
Contributor

pfiaux commented Nov 2, 2018

I guess doing read only components would not only apply to the switch but also the slider.

In your description for the color vs black/white the flag would be static (readOnly: true) for that switch. That's probably a good start, I'm wondering if that's enough or if we should include "dynamic" read only mode (a switch or slider) might sometimes be read only, sometimes not. Doing it from the start should allow a more consistent API for both cases.

@pfiaux pfiaux changed the title Display only AddSwitch Add readOnly setting for switch and slider components Nov 2, 2018
@tmrobert8
Copy link
Author

I'm always in favor for more control on the UI. Ideally you'd want to do both - have it as a configuration option (set and forget) and have it as an API option (setDisabled callback). You can implement those as two distinct separate items or try to get both done at the same time. Really dependent on your schedule..

@neophob
Copy link
Contributor

neophob commented Nov 2, 2018

Sounds like a duplicate, see #28

@tmrobert8
Copy link
Author

lol - didn't event realize I already asked this. Closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants