-
Notifications
You must be signed in to change notification settings - Fork 43
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
auto-suggestion of username done differently #112
Comments
hello, can you specify what you mean? Do you not want the auto-suggestion, or make it in a way where it doesn't actually generate your username, only writes it somewhere for you to "get inspired by"...? |
I guess @lkocman wants autosuggestion, but a different one, isn't it? So for "Lubos Kocman" the suggestion should be lkocman instead of luboskocman. For long names, I am unsure. In SUSE I am igonzalezsosa (from Imobach González Sosa) which is rather long but works. |
And when creating a new user name, I always use "lukas". So, not so simple :D |
I think this is now kind of stale good-first-issue. So let me try to move it on 😉 About which one should be the right suggestion, I believe that Agama is the perfect excuse for trying to think a bit different and do not fill the username input text automatically. Firstly, if the input gets filled with a suggestion the user does not like it, we are just adding a not needed extra step: remove it before writing the desired one. Not a big deal, though, but completely avoidable. Second, autofilling the input limits the suggestion to only one. A bit poor considering how cheap would be for us, as developers, to provide a few suggestions instead. For me, the question is how to provide them to the user through the UI. Good news is that I have two ideas 😄
Please, don't think too much about wording or styling in the screenshots above, but rather focus on your feedback about which one might be better. Try to keep the A11y in mind when thinking about them: not everyone uses a mouse, and some users need screen readers that must announce these options. Wording and styling something we can discuss once we have a plan for introducing the username suggestions features. |
I like the most your first suggestion, where the suggestion badges are placed below the username input field
So, this one: My second choice would be this:
While I like the least the option where suggestions are placed above the username input field. However, when addressing accessibility maybe the least intrusive and at the same time the most familiar way of doing this is For example, if the user decides to type the password after typing the Full name, she/he would get stuck in the suggestion badges in both cases (being above or below the input field), this wouldn't be the issue for the dropdown solution. This is probably an unlikely scenario 😄 , but maybe something to consider. |
Thanks for your quick feedback, appreciated. I you ask me, although I put the three options my preferred is the last one. I think it is the less intrusive not only because the "focus trap" but also because it does not involve "moving fields" when appears or dissappesrs. I.e., the form height doesn't change and everything still in the same place since the suggestions would be in a fly-out menu that is shown/announced automatically when the input gets the focus and would disappear as soon as the user start typing (i.e., ignoring the suggestions). BTW,
|
Agreed. I do like the look of those badges, but the dropdown seems to be a smart choice 😄 |
I like it too. We could reserve the space forthem in attempt to avoid the other elements changing their position. But,
Definitely, I'd give it a try. I believe it could help to ship the feature in an almost "transparent" way at the same time that avoids all the mentioned "inconvenients". |
If you haven't already done some work on this, I could take this on as well? However, judging by those screenshots you did 😄 |
No, I haven't useful code. These screenshots are just in place mockups I did for illustrating the ideas I had in mind. But you wouldn't like to see how dirty the code is. And I wouldn't show it 😜 In any case, displayed suggestions were hardcoded text, so it's needed
So, you can go ahead if you wish. But my personal recommendation is to address issues one by one instead of working simultaneously in them. But that's just my opinion :) |
Agreed. I'd work on this after #872 is done. So, I am just making a reservation 😄. Of course, if there is some need for speed 🚀 here, I can give it up. |
## Problem As described in issue #112 this PR addresses the suggestion of username for user account creation based on full name input. ## Solution Usernames are suggested based on the given full name in the following manner: - Just the first word of the given name - The first letter of the first word + all other full words - The full first word + first letters of all other words - First letters of all words except last + full last word - All words of a name joined without white spaces Also, all suggestions with less than 3 characters are filtered out. This PR fixes #112 ## Testing - Manually tested - Added unit tests in `web/src/components/users/utils.test.js` ## Screenshots ![image](https://github.com/openSUSE/agama/assets/112288843/e018d7f5-ef5a-4709-9154-6b05a63e481b)
I love freedom (unlike in windows user generation) where I'm stuck initially with what they decide. However I was quite unhappy about the username generation in the old installer which usually generated luboskocman and I have to always do a correction otherwise I'd have to extensively use .ssh/config to override user etc.
This auto-suggestion feature is something I missed in the first-time user experience with the installer.
Fedora and other distros would suggest lkocman. Which would be my personal preference as well.
I think this should be our preferred generation as 99% of SUSE employees have such account anyway.
I'm not sure what the rules is for complex names like "Homer Jay Simpson" etc.
The text was updated successfully, but these errors were encountered: