Skip to content

Change float log slider default format to .3g #2014

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

Merged
merged 2 commits into from
Mar 23, 2018

Conversation

jasongrout
Copy link
Member

After playing with the float slider for a bit, I realized it is very easy to get very small or large orders of magnitude (duh!). These formats are much more readable using .3g rather than .2f as the default format.

Also, I added it to the widget list doc page.

CC @sebasguts - what do you think about changing the default format? For example, FloatLogSlider(min=-10, max=10, readout_format='.2f') has a huge number of values that are either difficult to understand (at the max) or just plain not visible (at the min). Changing the format to .3f makes both cases much easier to understand.

@jasongrout jasongrout added this to the 7.2 milestone Mar 23, 2018
@sebasguts
Copy link
Contributor

I like this a lot. Specially with orientation=vertical, using .2f does not completely display the values in that setting, whereas .3g does.

@jasongrout
Copy link
Member Author

Great, thanks!

@jasongrout jasongrout merged commit 20466b7 into jupyter-widgets:master Mar 23, 2018
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants