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:
View.onKeyDown is only triggering for modifier keys (MacOS only?). This
requires a hack that we have to delete the inserted tab instead of preventing
preventing it entirely.
Menu.popup() does not allow you to specify a location, so the users list
appears at the mouse cursor, instead of the text caret.
There is no way to show the "pretty" user name at the moment. In a future
version, we could potentially show the username as usual, while keeping
track of the its string position, then render a highlight on top -- and
finally re-process the message on send to inject the stored <@id>.
This does not yet implement UAX44-LM3, so if you want to look up a user named ère, you'll have to type @èr not @er.
Using
onKeyUp
, if key isTab
, and@
exists before the caret, use that entire string to look up a user by theirname
. ie.@foo bar
will find userFoo Bar
,@foo
will find bothFoo Bar
andfooman
.Also removes initializing
deleted
users inSlackAccount.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:
View.onKeyDown
is only triggering for modifier keys (MacOS only?). This requires a hack that we have to delete the inserted tab instead of preventing preventing it entirely.Menu.popup()
does not allow you to specify a location, so the users list appears at the mouse cursor, instead of the text caret.<@id>
.ère
, you'll have to type@èr
not@er
.