-
Notifications
You must be signed in to change notification settings - Fork 437
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
Autocomplete for mentions #812
Autocomplete for mentions #812
Conversation
Sorting should be by best match rather than alphabetic. Last chat message is already a good metric for "best match". :) |
@danxuliu Can you help copying the UI/UX changes from https://github.com/nextcloud/server/pull/6982/files
|
js/views/chatview.js
Outdated
this._autoCompleteRequestCall.abort(); | ||
} | ||
this._autoCompleteRequestCall = $.ajax({ | ||
url: OC.linkToOCS('apps/spreed/api/v1/chat', 2) + 'dshwd9uv' /* FIXME this.token */ + '/autocomplete', |
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.
🙈 we don't seem to have access to the room info in this view?
a9133d5
to
679f08f
Compare
@nickvergessen For consistency with the Comments app, the author should not be suggested in the autocompletion. Also it seems that matching by display name is case sensitive; it should be case insensitive. |
679f08f
to
79db8da
Compare
@nickvergessen Unless I have missed something the UI should be ready. |
Ready for review @Ivansss |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
CSS styles were directly copied from "apps/comments/css/autocomplete.scss". JavaScript code in the chat view was slightly simplified from "apps/comments/js/commentstabview.js". Currently mentions are not formatted when a message is being composed; "@" followed by the user name is added to the message so it can be directly sent without further processing. Formatted mentions will be introduced in another commit. Signed-off-by: Joas Schilling <coding@schilljs.com>
The server expects mentions to be in plain text, so the formatted mentions have to be converted to "@" followed by the user name before the message is sent to the server. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
090e87d
to
d8c56b4
Compare
I have rebased on master and amended the CSS file to solve the "conflict" with #814 (it was not really a conflict, but the CSS rules were not properly sorted due to the automatic merging). |
Handle guests=> Does not work, because they have no unique user id