Mailu / Mailu

Insular email distribution - mail server as Docker images
https://mailu.io
Other
5.89k stars 832 forks source link

Quota Slide Bar - Minor Bug #2843

Open koskit opened 1 year ago

koskit commented 1 year ago

Environment & Version

Environment

Version

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 commented 1 year ago

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

The UI peculiarity is by design: https://github.com/Mailu/Mailu/blob/6f3ee32351800d165edc8cc7fd3189fb22cc2e54/core/admin/assets/assets/app.js#L95

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 commented 1 year ago

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 commented 1 year ago

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 commented 12 months ago

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