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 percentage to FSRS spinner #3679

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Arthur-Milchior
Copy link
Contributor

@Arthur-Milchior Arthur-Milchior commented Dec 28, 2024

This commit add a percentage option in SpinBox and SpinBoxFloatRow, set to False by default.

If it's true, a percent symbol is added at the end of the line before the increase/decrease button.

While the value is represented as a percentage without decimal places, the internal representation is not changed. Which mean that a multiplier must used to compute the string value, indicate to the input field the min, max and step, and when updating the result.

Currently result is as this
image

I was able to obtain
image
but not to let it be very close to the number, nor to put it outside of the box on the left of the reset value.

If anyone knows their CSS well, that could be helpful here. At least the data part is correctly ported

This commit add a percentage option in SpinBox and SpinBoxFloatRow, set to False
by default.

If it's true, a percent symbol is added at the end of the line before
the increase/decrease button.

While the value is represented as a percentage without decimal places,
the internal representation is not changed. Which mean that a
multiplier must used to compute the string value, indicate to the
input field the min, max and step, and when updating the result.
@Expertium
Copy link
Contributor

Expertium commented Dec 28, 2024

I had in mind either this
image
Or this
image

The first one is probably more intuitive. Anyway, thank you for making the PR!

@Arthur-Milchior
Copy link
Contributor Author

As mentioned on discord if you know how to make the css, I'd love it.
Sadly I don't understand it enough to correct it

@abdnh
Copy link
Collaborator

abdnh commented Jan 2, 2025

The first one is probably more intuitive

First one looks tricky but the second should be easy to implement, and I think looks better than the current implementation.

@iamllama
Copy link
Contributor

iamllama commented Jan 6, 2025

@GithubAnon0000
Copy link

True, good point. Technically localization needs to be handled there as well.

@abdnh
Copy link
Collaborator

abdnh commented Jan 7, 2025

Related to localization: #3677

It's tricky here though because we have an input.

@Expertium
Copy link
Contributor

Expertium commented Jan 7, 2025

@dae I'd like you to add this to 25.01 milestones, please. Making desired retention a percentage, I mean.

@dae dae added this to the 25.01 milestone Jan 9, 2025
@dae
Copy link
Member

dae commented Jan 9, 2025

I don't object to the move to a percentage, but I find the current formatting to be pretty ugly I'm afraid. Until a CSS guru comes along with a simple+good looking solution, a simpler solution like removing the displayed '%' symbol from the right (while still showing 90 instead of 0.9) would unblock this.

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.

6 participants