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

Should Button variants be runtime validated? #1189

Closed
davep opened this issue Nov 16, 2022 · 1 comment · Fixed by #1195
Closed

Should Button variants be runtime validated? #1189

davep opened this issue Nov 16, 2022 · 1 comment · Fixed by #1195
Labels
question Further information is requested

Comments

@davep
Copy link
Contributor

davep commented Nov 16, 2022

Related to #1188, it seems that Button has a method for validating variants but the code is never used. As seen in #1188 it's possible for someone -- especially if they're not making use of type checking -- to accidentally set a variant that may have an unintended consequence (see the disabled example in the other issue).

Should validate_variant be put to use and an exception be thrown if an unsupported variant is set by the caller?

@github-actions
Copy link

Did we solve your problem?

Glad we could help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant