-
Notifications
You must be signed in to change notification settings - Fork 697
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
Changing nick in the UI #551
Conversation
Not a fan of persistent pencil icon, good implementation though. |
We can improve that later, but in the meantime it's better than nothing (and the icon can always be hidden in CSS :D). Not displaying it or just on hover or right click are way less-than-ideal solutions. Also, I'm thinking about the same mechanism to solve #179. @maxpoulin64, mind reviewing this (and #540 as well, which will improve this PR)? I'm open to advice regarding the second item, but worst case I'm thinking it's not a big deal and there is probably nothing to do there... |
I agree with @xPaw. What about something like this; |
#nick button#submit_nick, | ||
#nick:not(.editable) #save-nick-tooltip, | ||
#nick button#cancel_nick, | ||
#nick:not(.editable) #cancel-nick-tooltip { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should both use dashes, not underscores. Will update.
@williamboman, hiding actions by default is not good in terms of usability (think discoverability) and accessibility (like conditions involving memory loss) so I'm 👎 to put this by default but 👍 to give the ability to do so. As with other things, I suggest having it there (dimmed) by default, and giving ways to remove it if users don't like/want it, in the shape of custom CSS recipes:
Does that sound reasonable? |
bf00501
to
d1be9aa
Compare
d1be9aa
to
3625d06
Compare
What about having a shiny animation on it? Something like this but less... bad? |
Like, always? I can wrap this in |
BTW, as said on IRC, the thing I'll do next as soon as this makes it into master is to have a way to cycle through nicks on mobile. Posting it here because I know this PR is going to mess with @maxpoulin64's hack. |
I'm personally fine with the pencil; I agree with @astorije that having a 'hidden' feature like this could lead to a lot of confusion (especially on mobile). |
I was initially against a pencil showing all the time because I thought it was a tad verbose, I still do to an extent, however it does massively improve discoverability, and it looks like it'll be easy to hide if that's the user's intent 👍 |
3625d06
to
96b2835
Compare
Any chance this can be reviewed and merge to land in 2.1.0? We can improve UI afterwards, but the logic is there and ready :-) (Rebased with master and fix conflicts) |
96b2835
to
1d40ba4
Compare
The PR is 👍 but I fixed a couple of things. Merge it when you review them.
I don't think that rule is even needed anymore. |
1d40ba4
to
024369d
Compare
Indeed, thanks to your last commit. Awesome set of commits btw, thanks for these! 👍 |
Changing nick in the UI
This PR gives a nice UI integration for letting users change their nicks.
TODO (help needed)contenteditable
box, I am currently leaving the saved value there, assuming that saving will just work. If the nick already exists, or if an invalid character is used, or if any other reason prevents IRC to change the nick, the label will keep the saved value until browsing among channels. 2 solutions:When saving, value of the label stays the saved value. If an error pops up, we rollback to the previous nick. This has the benefits of looking clean, but in practice it means we need to listen to the correct IRC errors, which might not be easy. For example, I recently noticed that a nick could not be saved, with a super generic, like "Failed action" or something like that. Not sure howirc-framework
handles this, but it might just be not possible./nick newnick
. I actually prefer that solution! It looks less polished, but it's the smallest source of bugs. One caveat is that upon saving a new nick, users will see the old nick in a flash, then the new nick, but that can be easily handled by delaying the revert by a few seconds. I think I will go with this option unless I see a compelling argument not to.~~~#form #nick:empty { visibility: hidden; }
. Now that there are other elements in the box,#nick:empty
will never be true. I am not sure how to fix this really. I could add someif
s to check when the connection is not established, or if there is an error or whatever, but the advantage of setting this with CSS was that we didn't need to bother about the why and just hide the item as a whole. Any smart idea?Result