DYN-4783: Do not allow non integer input in integer slider node - #17213
Draft
ivaylo-matov wants to merge 4 commits into
Draft
DYN-4783: Do not allow non integer input in integer slider node #17213ivaylo-matov wants to merge 4 commits into
ivaylo-matov wants to merge 4 commits into
Conversation
+ a small clean-up + reworded comments
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-4783
- pass time stamp to IntegerInputPattern - static methods in DynamoSlider
|
ivaylo-matov
marked this pull request as draft
July 16, 2026 14:56
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.



Purpose
DYN-4783: Do not allow non-integer input in Integer Slider node.
IntegerSlider64Bit's Min/Max/Step/Value fields currently accept decimals and letters without validation (silently coercing or parsing with a too-narrowint.TryParse), with no feedback to the user. This PR fixes that with two changes:IntegerSlider64Bit.UpdateValueCore: strict integer-literal validation. Non-integer input (decimals, letters) is rejected: the last valid value is kept. A well-formed integer literal that's simply too large/small forInt64is still accepted and clamped toInt64.MaxValue/MinValue(preserving existing behavior), with the existing range-overflow message.DynamoSlider.xaml.cs: blocks non-integer keystrokes/paste at the UI level, scoped toIntegerSlider64Bitonly (this control is shared withDoubleSliderand the legacy 32-bitIntegerSlider, both intentionally left unaffected).Changes:
src/Libraries/CoreNodeModels/Input/IntegerSlider.cs(IntegerSlider64Bitonly) : validation/clamp logic above; removed dead code (UpdateNodeInfo,SliderBase.IsValueInt64).src/Libraries/CoreNodeModelsWpf/Controls/DynamoSlider.xaml.cs: keystroke/paste filter.IntegerSliderNonIntegerInputMessage: "The input must be an integer.".test/DynamoCoreWpf3Tests/SliderTests.csand newtest/DynamoCoreWpf3Tests/DynamoSliderTests.cs. ExistingSliderMaxResetsToIntMax/SliderMinResetsToIntMin/TestIntSliderInfoStatestill pass unmodified since clamping is preserved.Declarations
Check these if you believe they are true
Release Notes
Integer Slider no longer accepts decimal or non-numeric text in its Min/Max/Step/Value fields; invalid input is blocked and an info message is shown. Values that are valid integers but exceed the supported range are still clamped to the nearest supported value, as before.
Reviewers
@DynamoDS/eidos
@johnpierson
@RobertGlobant20
FYIs
@dnenov
@jnealb
@eamiri