Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The server half of
vec2- two numbers set together, because they are oneposition rather than two settings.
The client already renders it (a 2D pad plus two spin boxes, with drag, Ctrl for
a finer gesture, wheel and arrow keys) and nothing produced it. The generator
half is sadt-tools#24; this is what lets a schema declaring one load, and what
validates the value before
run()sees it.What it adds
VEC2_TYPEand_coerce_vec2inbase.py: a JSON array or thecomma-separated shorthand, exactly like the list and multichoice types.
x_range/y_rangeonArgSpec, andvec2in the schema vocabulary.x_labels/y_labels, which name the two ends of an axis: "0.8" says nothingabout where that is in a mouth, and "mid"/"out" does.
The ranges are not presentation
They are the one layout key that reaches
validate(). A request that skips thepanel would otherwise place a patch corner off the arch and be answered with a
success, which is the failure this repository keeps finding in other forms. A
mirrored axis is still written by inverting the range (
x_range: [15, -15]puts15 at the left end), and validation compares against the min and max rather than
the declared order - a test pins that.
Verified
An annotation through
describe.py, the generated schema through_argument_spec, andvalidate()refusingy = 9on an axis declared[-5, 5], naming the axis and the value. Then FlexReg's real schema through theclient's
formgen: five pads built from the schema alone, with the rightranges and no client-side code for it.
315 server tests.