Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-6678 integer slider improvement. #15093

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

reddyashish
Copy link
Contributor

Purpose

Task: https://jira.autodesk.com/browse/DYN-6678

Consistent precision on the number slider, by considering the step value of the slider.

numberslider fix

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Consistent precision on the number slider when using the slider.

Reviewers

@QilongTang @zeusongit

{
var invariantString = formattableval.ToString(null,CultureInfo.InvariantCulture);
model.UpdateValue(new Dynamo.Graph.UpdateValueParams(nameof(Value), invariantString));
var sliderValue = Math.Round(decimal.Parse(invariantString), decimalPoints);
model.UpdateValue(new Dynamo.Graph.UpdateValueParams(nameof(Value), sliderValue.ToString()));
}
else
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anyone know in which case the else block here gets triggered? I am thinking if we should round the value there as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of any. I believe int, float, double, long, are all IFormattable.

Copy link

github-actions bot commented Apr 5, 2024

UI Smoke Tests

Test: success. 2 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests - net8.0

@QilongTang QilongTang added this to the 3.1 milestone Apr 5, 2024
@QilongTang QilongTang merged commit 50554b2 into DynamoDS:master Apr 8, 2024
22 checks passed
@QilongTang QilongTang changed the title integer slider improvement. DYN-6678 integer slider improvement. Apr 9, 2024
@QilongTang QilongTang mentioned this pull request Apr 9, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants