You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add JSDoc of proposed coupling between RangeInput validationStates
* COMPASS 235: DV - Full range component
Start by turning on the range component in the GUI again.
Also unskip tests that only work properly when integrated due to the nature of the test API we have built.
* Add RuleCategoryRange unit and Rule integration tests
* Add failing test for the empty range state
* Update RangeInput.value to no longer be isRequired
Fixes warning with 'none' dropdown state:
/Users/pzrq/Projects/compass/node_modules/fbjs/lib/warning.js:36 Warning: Failed prop type: Required prop `value` was not specified in `RangeInput`.
in RangeInput (created by RuleCategoryRange)
in RuleCategoryRange (created by Rule)
in form (created by Form)
in Form (created by Rule)
in td (created by Rule)
in tr (created by Rule)
in Rule (created by RuleBuilder)
in tbody (created by RuleBuilder)
in table (created by Table)
in Table (created by RuleBuilder)
in div (created by Col)
in Col (created by RuleBuilder)
in div (created by Row)
in Row (created by RuleBuilder)
in div (created by Grid)
in Grid (created by Editable)
in div (created by Editable)
in div (created by Editable)
in div (created by Editable)
in Editable (created by RuleBuilder)
in RuleBuilder (created by Validation)
in div (created by Grid)
in Grid (created by Validation)
in div (created by Validation)
in Validation (created by ConnectedValidation)
in StoreConnector (created by ConnectedValidation)
in ConnectedValidationprintWarning @ /Users/pzrq/Projects/compass/node_modules/fbjs/lib/warning.js:36
* Mostly working, but for some reason renders the stale value...
* Refactor componentWillMount into the constructor
https://facebook.github.io/react/docs/react-component.html#componentwillmount
* Refactor onRangeInputBlur to the end of validate
* Remove 10 from parseFloat
parseFloat does not take a second argument, unlike parseInt :)
* Drop unused RangeInput.onChange prop
It can't possibly work with the combined range input unless you added multiple IDs somehow which would be a much bigger component refactoring.
* Be clearer which store
* Call validate after changing the dropdownOp value
So it appears to start in an invalid state if switching from a 'none' state.
* Remove componentWillReceiveProps
It seems to confuse the component, leading to a bizarre cache issue.
The best kind of bug fix - when deleting code makes things work better :)
* ESlint
* Fix race where validationState is not allowed to be empty string
react-bootstrap/react-bootstrap#1926
* Finally, playing with the (unvalidated) component works correctly
* Refactor into validateCombinedParams
So I can reuse it shortly.
* Finally get comboValidationState working
So we can put the common user error of mixing up the lower and upper bounds into the category of being reported by our Compass GUI, but still allow the user to proceed if they choose to.
* Add a regex to warn the user they cannot enter expressions like 10+5
parseFloat will truncate them later, but the user doesn't see it unless they switch to JSON view or reload the page...this is at least a little better in that they are warned, not sure what the behaviour should really be though. Not sure how to unit test this one as it's deep in the validation logic so it would be somewhere deep in Enzyme if it is testable.
* Handle and test the 0 case correctly
Thankfully the server already did, good thing I tried to record a demo video and check:
> db.runCommand({collMod: 'validation', validator: {"age": {$gt:0, $lt:500}}});
{ "ok" : 1 }
> db.getCollectionInfos()[1].options.validator
{ "age" : { "$lt" : 500, "$gt" : 0 } }
# Server also supports null which we don't because it gets mangled between my code and Thomas' code so meh until someone cares for it
> db.runCommand({collMod: 'validation', validator: {"age": {$gt:null, $lt:500}}});
{ "ok" : 1 }
> db.getCollectionInfos()[1].options.validator
{ "age" : { "$gt" : null, "$lt" : 500 } }
* Improve comments
This particular state is no longer rejected by the Rule Builder GUI, just shown highlighted in red as something we highly doubt a user would intentionally create, for the reasons outlined in `npm run ci` like the range being empty or easily hard-code-able as an application-level constant.
* Add better regex to handle exponential float forms
* Fix translating regexes fail (the |, vertical bar ASCII code 0x7c should not be accepted)
Though incoming hadron-type-checker should resolve this more completely (its DECIMAL_128_REGEX still accepts arbitrarily large exponents which it should not, but it's better than this one was).
* Add some Decimal128 tests
* Handle Decimal128 and drop clunky parseFloat uses
* Be more explicit that combined ranges of Decimal128s are not validated
* shrink range inputs, remove title labels.
* 👕 fix linter issue.
* don’t validate initially, fix tests.
* form validation. such difficult.
* [wip] up and downwards validation almost working
* fixing some edge cases, updating tests.
* Restore tests so accepts/rejects is clearer
Just needed to drop the comboValidationState.
* make rule id consistent (based on index of rule).
* store cancel always needs to call _updateState()
* range: disable bson type casting
* cancelChanges no longer takes a boolean.
* validation rewritten. only use single validate() method
* use componentWillReceiveProps where props are forked.
* force a redraw when cancel was pressed via key change
* 👕 fixing eslint issues.
* Drop HP_VERSION until COMPASS-294
* 💚 fix tests.
0 commit comments