How do people currently support numeric range inputs in get_schema()? There’s no int or float input, nor slider. Do you do a text input and perform some sort of validation? If so, how do you provide response back to the user?
How do you test schema configuration before publishing?
I just save a bunch of different configs and use those as regression tests. If the tests don’t work as intended, that’s when I know something went wrong with my change. Again tell me if there’s a different/easier way.
If the range of values is small you could use a schema.Dropdown control with all the possible options.
The other option is to do what you said and use two text inputs. Retrieve and validate the numbers in the main function, if anything is wrong you can render a screen (return render.Root…) with an error message.
For testing, just use the pixlet serve command and use the simulator, it let’s you tweak the configuration like the mobile app.
I’ve got a third Schema question. I would think a Generated schema section would appear in the order in which it’s defined in the schema, but instead it seems to be appended to the end. Is there any way to group the generated schema with it’s associated triggering options?
And a fourth! I decided to create a “Quick” option, where one of the options is “Advanced.” This reveals the rest of the settings. That’s fine, but one of the settings has another schema.Generated field, which now displays “Unsupported type: generated” where the additional field data would go. Does this mean that Schema does not support more than one Generated field type?
Is there any way to group the generated schema with it’s associated triggering options?
Nope, it always appends the generated fields to the end
Does this mean that Schema does not support more than one Generated field type?
You can have more than one Generated field in the Schema, but they need to be independent of each other. They need to be “siblings” in the schema. In your case, you’re trying to make one Generated field return another one, and this is not possible