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.
You might to review this PR with whitespace changes hidden. Prettier went wild in some places.
Changes:
false | true
will now bebool
, and small integer intervals will now be unfolded (e.g.1 | int(3..4)
->1 | 3 | 4
).null
from type.The last point needs a bit more explanation. The issue was that a number input always retained its previous value if the input id was the same as the in the previously looked-at node. E.g. go to Crop Edges and then to Crop Offsets and Width and Height were set to 0 (which is invalid). This was a bug in
NumberInput
and I fixed it.But that wasn't good enough for me. Input still reset to their default values when we show example nodes. This changes the global node state, which really isn't ideal here. So to prevent future bugs, I changed the way groups and
SchemaInput
(= the abstraction layer on top of input components) set input data. They previously gotsetNodeInputValue
from global node state, but now they get asetInputValue
function passed in as a prop. This allows us to control the wayinputData
is modified. In the case of doc examples, we manage our owninputData
state separate from global node state.