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

Fix edge case when float slider initial value is an integer #41

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

brentyi
Copy link
Collaborator

@brentyi brentyi commented May 31, 2023

No description provided.

@brentyi brentyi requested a review from chungmin99 May 31, 2023 03:16
@brentyi brentyi enabled auto-merge (squash) May 31, 2023 03:22
Copy link
Collaborator

@chungmin99 chungmin99 left a comment

Choose a reason for hiding this comment

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

It feels unintuitive that the return type == type(initial_value).

I'm wondering if it's better to enforce:
type(min) == type(max) == type(step) == type(initial_value)
, just so that the return type is consistent.

E.g., it's not clear what the behavior should be if we have:

min: 0
max: 10
step: 1
initial_value: 1.0

since in this case the slider's value type will be a float.

Copy link
Collaborator

@chungmin99 chungmin99 left a comment

Choose a reason for hiding this comment

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

LGTM

@brentyi brentyi merged commit 855947a into main Jun 1, 2023
@brentyi brentyi deleted the brent/fix_slider_int_edge_case branch June 1, 2023 00:31
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.

2 participants