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

Add Value Coercion to ConstrainedBox #4169

Conversation

michael-hawker
Copy link
Member

Fixes #4166 too

Adds Value Coercion to the properties to ensure they're within a valid range.

Also fixes the issue with MultipleX/Y not triggering layout updates.

Debating whether to add more tests to this PR or not still... 🤔

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Can specify any values for properties.

What is the new behavior?

Will reset/bound properties to expected values if out-of-range.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

@michael-hawker michael-hawker added bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ improvements ✨ testing 🏗️ labels Aug 9, 2021
@michael-hawker michael-hawker added this to the 7.1 milestone Aug 9, 2021
@ghost
Copy link

ghost commented Aug 9, 2021

Thanks michael-hawker for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from azchohfi and Rosuavio August 9, 2021 22:54
@michael-hawker michael-hawker marked this pull request as draft August 9, 2021 22:54
@michael-hawker michael-hawker marked this pull request as ready for review August 10, 2021 23:43
@michael-hawker
Copy link
Member Author

Alright added all the tests, should be descent coverage for now until we get real-world scenarios of usage. This PR ready to review.

@ghost
Copy link

ghost commented Aug 12, 2021

This PR has been marked as "needs attention 👋" and awaiting a response from the team.

@michael-hawker
Copy link
Member Author

@chingucoding know you had called out the Value Coercion initially, so let me know if you want to review or not?

@marcelwgn
Copy link
Contributor

Sure @michael-hawker , I would love to review this in the next few days!

@michael-hawker michael-hawker merged commit 5171b99 into CommunityToolkit:main Aug 16, 2021
@Rosuavio Rosuavio removed their assignment Sep 25, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MultipleX and MultipleY are missing the ConstraintPropertyChanged callback
4 participants