Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

all/new #157: add range widget. #171

Merged
merged 3 commits into from
Jul 25, 2017
Merged

Conversation

issa-tseng
Copy link
Member

  • also spruce up bindDisplayIf to check against things other than bools.
  • also spruce up validation to not validate if the property isn’t shown.
  • still need to update opendatakit/build2xlsform for this feature.

* also spruce up bindDisplayIf to check against things other than bools.
* also spruce up validation to not validate if the property isn’t shown.
* still need to update opendatakit/build2xlsform for this feature.
@issa-tseng
Copy link
Member Author

issa-tseng commented Jul 15, 2017

Also: getodk/build2xlsform@349d441

@issa-tseng
Copy link
Member Author

Hmmmm I bet if one entered 0 for step it'll happily and erroneously accept it as Math.floor(Infinity) === Infinity evaluates to true. I'll have to add a check for that.

@lognaturel
Copy link
Member

When I choose a style other than textbox, I don't seem to be able to export to XML! No error in Build or on the console.

* default values were floats rather than strings. when one edits the
  textbox it drops strings in, so we should emulate that.
* zero and negative values should not be permitted for step.
@issa-tseng
Copy link
Member Author

Ha, that was subtle. Only happens if you accept the default values. I also fixed step to reject zero or less. Should be ready for re-review.

@lognaturel
Copy link
Member

Ooh, it didn't occur to me to try changing the defaults. Fun bugs!

build2xlsform looks great. There's one more thing I realize I forgot to mention for the XML. There is an expectation of a type on the bind. In XLSForm it's inferred from the arguments and I think Build should do the same. And also, I'm sorry, I know it seems it shouldn't be necessary but there you go...

… type.

* so infer int or decimal from the step.
* we already validate that the step is a positive number that divides
  the range evenly so don’t bother rechecking that.
* should close out this PR.
@issa-tseng
Copy link
Member Author

type is now inferred and added to the binding.

@lognaturel lognaturel merged commit 5b455bb into getodk:master Jul 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants