Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make percentage input consistent #188

Closed
s3cur3 opened this issue Dec 16, 2024 · 1 comment
Closed

Make percentage input consistent #188

s3cur3 opened this issue Dec 16, 2024 · 1 comment

Comments

@s3cur3
Copy link

s3cur3 commented Dec 16, 2024

Hi there! Long-time happy FunWithFlags user here. ☺️

I recently started using the Percentage feature, and found the input somewhat error prone. For instance:

image

In the input field, I'd call a value between 0 and 1 a "ratio" or maybe "proportion" of users. Furthermore, the fact that previously-submitted values get displayed as an actual percentage ("5.0%") while new inputs must be a ratio makes it easy to accidentally scan the page and try to input, say, 10 to update the percentage.

To my mind, the right thing to do here is to accept input in the range (0, 100) while storing it in the database as the ratio [percentage] / 100. I'm happy to put together a PR if this is something you'd like addressed. 👍

@tompave
Copy link
Owner

tompave commented Feb 23, 2025

Thank you opening the issue.

Since in the meantime you've opened tompave/fun_with_flags_ui#43, and in fact this is a presentation issue with the UI repo rather than a logic issue with this core package repo, I'm going to respond there in the PR and close the current issue to keep things tidy and avoid duplication.

@tompave tompave closed this as completed Feb 23, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants