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

Generate relevant UI when API includes choices as radio type #5

Closed
landlessness opened this issue Oct 8, 2014 · 2 comments
Closed

Comments

@landlessness
Copy link
Contributor

When the API returns type radio, it would be helpful if the Zetta browser presented an affordance in the UI that allowed the user to select one of the options. See the attached screenshot generated from the API below.

Screenshot of UI generated from the API response below:
screen shot 2014-10-08 at 6 00 32 pm

the API response with radio type that generated UI above:

{"class":["device"],"properties":{"id":"34a213d0-5ed4-499b-a26a-35cd7cadb5a8","type":"text-to-speech","name":"Text to Speech","state":"silent"},"actions":[{"name":"say","method":"POST","href":"http://0.0.0.0:1337/servers/976268fd-9b31-4076-a78e-f285cd05a772/devices/34a213d0-5ed4-499b-a26a-35cd7cadb5a8","fields"[{"name":"words","type":"text"},
  {"name":"voice","type":"radio","value":
    [
      {"name":"Agnes","locale":"en_US","example":"Isn't it nice to have a computer that will talk to you?"},
      {"name":"Albert","locale":"en_US","example":"I have a frog in my throat. No, I mean a real frog!"},
      {"name":"Paola","locale":"it_IT","example":"Salve, mi chiamo Paola e sono una voce italiana."}]},
      {"name":"action","type":"hidden","value":"say"}
    ]
  }
],"links":[{"rel":["self"],"href":"http://0.0.0.0:1337/servers/976268fd-9b31-4076-a78e-f285cd05a772/devices/34a213d0-5ed4-499b-a26a-35cd7cadb5a8"},{"title":"Brians-MacBook-Air.local","rel":["up","http://rels.zettajs.io/server"],"href":"http://0.0.0.0:1337/servers/976268fd-9b31-4076-a78e-f285cd05a772"},{"title":"state","rel":["monitor","http://rels.zettajs.io/object-stream"],"href":"ws://0.0.0.0:1337/servers/976268fd-9b31-4076-a78e-f285cd05a772/events?topic=text-to-speech%2F34a213d0-5ed4-499b-a26a-35cd7cadb5a8%2Fstate"},{"title":"logs","rel":["monitor","http://rels.zettajs.io/object-stream"],"href":"ws://0.0.0.0:1337/servers/976268fd-9b31-4076-a78e-f285cd05a772/events?topic=text-to-speech%2F34a213d0-5ed4-499b-a26a-35cd7cadb5a8%2Flogs"}]}
@landlessness
Copy link
Contributor Author

Confer with the zetta-discuss topic with @alanguir @kevinswiber and @mdobson about this issue: https://groups.google.com/forum/#!msg/zetta-discuss/vYyuIZwr8yE/WjVZAMXok0EJ

@13protons
Copy link
Contributor

Closed by #23

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

No branches or pull requests

2 participants