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

Multiple inputs #23

Merged
merged 5 commits into from
Oct 27, 2014
Merged

Multiple inputs #23

merged 5 commits into from
Oct 27, 2014

Conversation

13protons
Copy link
Contributor

@landlessness can you please test-drive this browser update? form field rendering in the browser is much better than before, esp for the desktop-size view. There are still some visual issues to work out with smaller/mobile size and pinning.

@landlessness
Copy link
Contributor

testing with text to speech on mac, I see an empty drop down list (see attached). my hunch is that I'm not sending the right data out. is there an example of what the config/API ought to look like? Right now, I'm doing this:

config.map('say', this.say, [
    { name: 'words', title: 'Words to Speak', type: 'text'},
    { name: 'voice', title: 'Voice Persona', type: 'radio',
      value: this._availableVoices},
    { name: 'device', title: 'Audio Output Device', type: 'radio',
      value: this._availableDevices},
    { name: 'rate', title: 'Rate of Speech', type: 'range',
      min: 90, max: 720, step: 1, units: 'words per minute'}
  ]);

where _availableDevices is an array of objects.

the API for the device field looks like this:

{
    "name": "device",
    "title": "Audio Output Device",
    "type": "radio",
    "value": [
        {
            "id": "39",
            "name": "AirPlay"
        },
        {
            "id": "47",
            "name": "Built-in Output"
        }
    ]
}

screen shot 2014-10-28 at 3 04 34 am

@13protons
Copy link
Contributor Author

Yes, remapping 'name' to 'value' should do it. Take a look at how Adam modified your code here:

https://github.com/AdamMagaluk/zetta-text-to-speech-osx-driver/commit/bc965a49041355eb25eb42be87cb6c908c10b54b

Alan Languirand
@13protons // @apigee // zettajs.org
+12404166531

On Tue, Oct 28, 2014 at 3:21 AM, brian mulloy [email protected]
wrote:

testing with text to speech on mac, I see an empty drop down list (see attached). my hunch is that I'm not sending the right data out. is there an example of what the config/API ought to look like? Right now, I'm doing this:

config.map('say', this.say, [
    { name: 'words', title: 'Words to Speak', type: 'text'},
    { name: 'voice', title: 'Voice Persona', type: 'radio',
      value: this._availableVoices},
    { name: 'device', title: 'Audio Output Device', type: 'radio',
      value: this._availableDevices},
    { name: 'rate', title: 'Rate of Speech', type: 'range',
      min: 90, max: 720, step: 1, units: 'words per minute'}
  ]);

where _availableDevices is an array of objects.
the API for the device field looks like this:

{
    "name": "device",
    "title": "Audio Output Device",
    "type": "radio",
    "value": [
        {
            "id": "39",
            "name": "AirPlay"
        },
        {
            "id": "47",
            "name": "Built-in Output"
        }
    ]
}

screen shot 2014-10-28 at 3 04 34 am

Reply to this email directly or view it on GitHub:
#23 (comment)

@AdamMagaluk
Copy link
Contributor

We are using value as the value that is returned to zetta when submitting the form, this fits the same way we are doing radio button values in the robot arm. You can specify text to create a display name, if text is not provided value is used.

{
    "name": "device",
    "title": "Audio Output Device",
    "type": "radio",
    "value": [
        {
            "value": "39",
            "text": "AirPlay"
        },
        {
            "value": "47",
            "text": "Built-in Output"
        }
    ]
}

@landlessness
Copy link
Contributor

I tested the new stuff. It looks pretty good. I created 1 bug and 2 enhancements based off current state.

API Response in Zetta Browser doesn't include values of action fields
#27

Zetta Browser should render objects
#28

For radio field values, Zetta Browser should send whole JSON objects
#29

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