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

Quota Slide Bar - Minor Bug #2843

Open
1 of 3 tasks
koskit opened this issue Jun 1, 2023 · 4 comments
Open
1 of 3 tasks

Quota Slide Bar - Minor Bug #2843

koskit opened this issue Jun 1, 2023 · 4 comments
Assignees
Labels
type/bug Bug. Not working as intended

Comments

@koskit
Copy link

koskit commented Jun 1, 2023

Environment & Version

Environment

  • docker compose
  • kubernetes
  • docker swarm

Version

  • Version: 2.0

Description

Hello everyone!
I believe the following is a minor UI bug. I just document it since there was no other issue on this from what I searched:

The quota bar, both in pages when creating a new domain and you can set the default quota for the users, but also in a specific user edit page, adjusts it's position relative to the textbox on the left that says the quota.

That, in the end, doesn't behave as expected because the textbox goes back and for in width according to the text inside it (saying X GB etc), and when that text adds/removes characters (for example goes from 4.90 GB -> 5 GB -> 5.10 GB), the sliding bar also changes dimensions.

That makes it really annoying to set the desired GB in case it's a full number (e.g. 1 GB instead of 1.50 GB).

Replication Steps

Go to a page that has a quota control and simply slide it.

Observed behaviour

quotagif

Other notes

Just as an aside, if it's possible, make the textbox editable so we can input the number of Mb/Gb we want as quota and not mess with the sliding bar at all.

@elandorr
Copy link
Contributor

elandorr commented Jun 1, 2023

You can use the keyboard and the CLI if that's relevant to you.

The UI peculiarity is by design:

if (num.endsWith('.00')) num = num.substr(0, num.length - 3);

I won't PR a removal before someone tells me everyone wants it.

if it's possible, make the textbox editable

I asked the same thing years ago but didn't know enough of the used fws to deal with it. I guess it's fairly trivial, but these things love to turn from '5-min edit' into 'whatthefuckistheinternet', and this is not important enough to bother. It probably takes longer to read about the deployment process and to set up a test environment than the actual change.

Personally, I'd prefer a fully JS-free environment to begin with. It looks fancy, but I never use the slider anyway. K.I.S.S. in my book.

@Diman0 Diman0 added the type/bug Bug. Not working as intended label Jun 5, 2023
@Diman0
Copy link
Member

Diman0 commented Jun 5, 2023

This indeed is a minor UI bug. An easy solution could be to set a specific width for the text box with the quota size. Modifying the the JavaScript that 1 is displayed as 1.00 is also an option, but this might have side effects on other locations that use this functionality.

@elandorr
Copy link
Contributor

elandorr commented Jun 5, 2023

Increasing width like
image
still has the problem on the numbers.

image
Like this also has it of course.

This would work
image
but have hard-coded decimals, or more needless JS. And it's kind of the same as just removing the line I linked.

My personal vote goes to no-JS and just
image

Just some ideas. Of course everything else is more important than fussing over UI details.

@fabianunterstell
Copy link

Please also make the quota field editable so you can type in the quota number as an alternative to the slider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bug. Not working as intended
Projects
None yet
Development

No branches or pull requests

5 participants