Skip to content
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

Merged
merged 12 commits into from
Apr 26, 2018

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Apr 25, 2018

bildschirmfoto von 2018-04-26 13-02-33

@nickvergessen nickvergessen added 2. developing backport-request design enhancement feature: chat 💬 Chat and system messages feature: api 🛠️ OCS API for conversations, chats and participants labels Apr 25, 2018
@nickvergessen nickvergessen added this to the 4.0 (Nextcloud 14) milestone Apr 25, 2018
@jancborchardt
Copy link
Member

Sorting should be by best match rather than alphabetic. Last chat message is already a good metric for "best match". :)

@nickvergessen
Copy link
Member Author

nickvergessen commented Apr 25, 2018

@danxuliu Can you help copying the UI/UX changes from https://github.com/nextcloud/server/pull/6982/files

  • Make it a beautiful dropdown
  • Correctly add mentions into the text while writing
  • Submitting the chat with the actual @uid instead of displayname

this._autoCompleteRequestCall.abort();
}
this._autoCompleteRequestCall = $.ajax({
url: OC.linkToOCS('apps/spreed/api/v1/chat', 2) + 'dshwd9uv' /* FIXME this.token */ + '/autocomplete',
Copy link
Member Author

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?

@danxuliu danxuliu force-pushed the feature/noid/chat-autocomplete-suggestions branch from a9133d5 to 679f08f Compare April 25, 2018 17:37
@danxuliu
Copy link
Member

@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.

@danxuliu
Copy link
Member

@nickvergessen Unless I have missed something the UI should be ready.

@nickvergessen
Copy link
Member Author

Ready for review @Ivansss

nickvergessen and others added 11 commits April 26, 2018 12:46
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>
@danxuliu danxuliu force-pushed the feature/noid/chat-autocomplete-suggestions branch from 090e87d to d8c56b4 Compare April 26, 2018 10:52
@danxuliu
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review design enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages help wanted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants