JustArchiNET / ASF-ui

The official web interface for ASF
Apache License 2.0
257 stars 36 forks source link

Make eye button state coincide with current password visibility state #1666

Closed Botan626 closed 3 months ago

Botan626 commented 3 months ago

Checklist

Enhancement purpose

Currently they mismatch each other, which can be misleading and confusing. image If eye is crossed, password should be hidden, and vice versa, shouldn't it?

Abrynos commented 3 months ago

You can look at it the other way and interpret the icon as the "action to do" or "target state after the click"... so the crossed out eye means "hide" while the normal eye mans "show".

Botan626 commented 3 months ago

You can look at it the other way and interpret the icon as the "action to do" or "target state after the click"... so the crossed out eye means "hide" while the normal eye mans "show".

Or I can continue to look at it the other way and treat this eye as a switch, which should correctly indicate its current state.

MrBurrBurr commented 3 months ago

There is no "correct" here. Both scenarios are valid as long as they are implemented consistently. Look at the encrypt/hash function where the eye icon is normal when the password is masked (not visible) and switches to a crossed-out eye icon when the password is visible.

This approach indicates the action that’s performed when you press the icon.