yue / wey

Fast open source Slack desktop app
Other
1.67k stars 80 forks source link

Add @mentions in chat-box #64

Closed shahyar closed 6 years ago

shahyar commented 6 years ago

Using onKeyUp, if key is Tab, and @ exists before the caret, use that entire string to look up a user by their name. ie. @foo bar will find user Foo Bar, @foo will find both Foo Bar and fooman.

Also removes initializing deleted users in SlackAccount.ready.

This depends on https://github.com/yue/yue/pull/44 to actually work, but this code should not break anything without it merged (since the selected index will be -1 to -1).

Known issues:

shahyar commented 6 years ago

Here's a brief video showing how this works, and its caveats: https://imgur.com/a/KW9SQ2k

tuananh commented 6 years ago

@shahyar i love PR with video :D

zcbenz commented 6 years ago

It seems that #65 already includes this change, so I'm closing this one.