-
Notifications
You must be signed in to change notification settings - Fork 150
Support Range in :values #355
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
You'll need to update the error message in the exisiting test at api_test.exs:46.
|
Hi @davydog187! Thanks for the PR. Do you know if this requires any change in surface_catalogue and surface_site? Since both present the list of values in the docs, we need to make sure that not only it doesn't break anything but it also has to present them properly. |
|
@msaraiva yes it will! I mentioned it in the description, you may have missed it. I'll add those PRs now |
|
@davydog187 yes. I missed it. Sorry. 😁 |
miguel-s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @davydog187 ❤️
|
@davydog187 since this one sets the minimum version of Elixir to |
|
I have a similar one coming. No worries |
|
Updated the documentation surface-ui/surface_site#33 |
|
Hey @davydog187! Since we already have an "official" branch for Cheers. |
|
You got it! |
|
@davydog187 quick correction. Please use https://github.com/surface-ui/surface/tree/surface-next as the target for any PR that should be applied to |
|
I probably won't get to it until Monday. No worries, thanks for the update |
|
@msaraiva rebased with |
|
Once this is merged i'll do the same with my other PR as it will have merge conflicts |
|
@davydog187 thanks! ❤️ |

This PR adds support to prop
:valuessuch that a range can be used to communicate the possible values.Example
Considerations
This adds
is_struct/2as a guard, which was added in Elixir 1.11. I'm not sure which version we're looking to support. If we need to support earlier versions, then I believe I'll need to refactorvalidate_opt/7as the way it currently works only supports rejecting valuesFollow ups
If this PR is accepted, I will also PR to update the docs and the catalogue to support this new feature