Граф коммитов

2065 Коммитов

Автор SHA1 Сообщение Дата
Ivan Sein 5d962c22a1 Fix check for guest's display name.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2018-05-04 10:56:18 +02:00
Nextcloud bot 5ec84c875d
[tx-robot] updated from transifex 2018-05-04 00:34:40 +00:00
Ivan Sein e59a669dd4
Merge pull request #845 from nextcloud/feature/noid/limit-unread-counter-to-99plus
Limit unread message counter to "99+"
2018-05-03 13:11:30 +02:00
Joas Schilling ffb65b468e
Limit unread message counter to "99+"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-03 11:18:22 +02:00
Nextcloud bot c81bbec815
[tx-robot] updated from transifex 2018-05-03 00:33:50 +00:00
Ivan Sein 2751fc194d
Merge pull request #739 from nextcloud/feature/noid/add-changelog
Update changelog with current patches
2018-05-02 19:01:00 +02:00
Joas Schilling 56bf6707ca
Merge pull request #841 from nextcloud/disable-contacts-menu-for-mentions-in-the-public-view
Disable contacts menu for mentions in the public view
2018-05-02 18:50:17 +02:00
Daniel Calviño Sánchez 04bd307910 Do not show pointer cursor on mentions without contacts menu
Mentions in the public view and mentions in the new message form do not
show the contacts menu when clicked, so the cursor should be the default
one instead of the pointer cursor.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 18:09:55 +02:00
Daniel Calviño Sánchez f042b623bf Disable contacts menu for mentions in the public view
The contacts menu can be shown only in user sessions; in the public view
it just fails and shows an error message instead of any useful option,
so now it is disabled for mentions in the public view.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 18:08:34 +02:00
Joas Schilling c431752568
Merge pull request #838 from nextcloud/fix-scrolling-in-chat-view
Fix scrolling in chat view
2018-05-02 18:04:38 +02:00
Joas Schilling 69c51bb4fb
Update screenshots
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-02 17:56:17 +02:00
Joas Schilling abb90c1534
Update final changlog
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-02 17:26:35 +02:00
Daniel Calviño Sánchez 6453be1bb5 Fix scroll position when detaching chat view
When an element is detached and then attached again its scroll position
is reset to the top. Now the chat view provides the "saveScrollPosition"
and "restoreScrollPosition" methods to save the scroll position before
detaching its element and then restoring it when attached again.

Note that the position can not be exactly restored, as the size of the
chat view may have changed due to switching it from the main view to the
sidebar, and thus the visible messages can not be the same in both
cases. Due to this, restoring the scroll position just ensures that the
last message that was partially visible when it was saved will be fully
visible when it is restored.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Daniel Calviño Sánchez 985bf93f91 Do not take margins into account for the container scroll height
The scroll area covers the top and bottom padding of an element, but not
its top and bottom margins, so the margins should not be taken into
account in the scroll calculations.

Currently this does not cause any difference in the behaviour, as the
message lists does not have any margin, but it is fixed just in case it
is added in the future.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Daniel Calviño Sánchez b11b8425b1 Fix handling of negative top margins
When an element has a negative top margin jQuery returns its top
position as the position in where the element would be if it had no
margin. In a similar way, when there is a negative margin the returned
height is not the actual height of the element, but its height without
that margin.

The message list is expected to scroll to the newest message if the last
one is partially visible, but due to the jQuery behaviour the message
list did not scroll when the last message was grouped and less than 20px
(the negative top margin) of the content of that message was visible.
Now the negative margin is taken into account and the message list
always scrolls to the newest message if the last one is partially
visible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 16:15:54 +02:00
Joas Schilling 77a957605c
Merge pull request #833 from nextcloud/remove-support-for-newest-on-top-chat-layout
Remove support for newest on top chat layout
2018-05-02 16:07:55 +02:00
Joas Schilling aa2fe25d62
Merge pull request #834 from nextcloud/bugfix/829/return-room-name-on-creation
Return the room name on creation
2018-05-02 16:05:10 +02:00
Daniel Calviño Sánchez 50afe74a96 Remove support for newest on top chat layout
When the oldest on top layout was added it was enabled by default,
although the original newest on top layout was also kept as an option.
However, the newest on top layout has not been used since then, and it
is not expected to be used ever again. To make the chat view more
maintainable and ease adding new features this commit removes the
original newest on top chat layout.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-05-02 14:42:35 +02:00
Joas Schilling 35d7fea9fa
Return the room name on creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-02 14:04:56 +02:00
Daniel Calviño Sánchez 8335f2611e Remove unused CSS rules for ".oldestOnTopLayout"
When the chat view used the oldest on top layout the "oldestOnTopLayout"
CSS class was suppossed to be added to its main element. However, when
the "className" method was executed the "initialize" method had not been
executed yet, so there was no "_oldestOnTopLayout" attribute even if it
was included in the options, so the CSS class was never set and thus the
CSS rules were never used.

The support for the newest on top layout is going to be removed, and the
common CSS rules were already being used for the oldest on top layout
without problems; due to this, instead of fixing the setting of the CSS
class, the specific CSS rules for the oldest on top layout were simply
removed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 18:42:17 +02:00
Ivan Sein f4e2d2251c
Merge pull request #831 from nextcloud/fix-pointer-cursor-shown-for-guests-and-in-new-message-form
Fix pointer cursor shown for guests and in new message form
2018-04-30 16:18:36 +02:00
Ivan Sein 1566f75338
Merge pull request #830 from nextcloud/fix-appearance-of-grouped-author-row-when-showing-the-date
Fix appearance of author row when showing the date
2018-04-30 16:06:12 +02:00
Ivan Sein 914b662fd4
Merge pull request #808 from nextcloud/bugfix/noid/adjust-grouping
Only group up to 10 messages and only for up to 15 seconds
2018-04-30 16:03:37 +02:00
Daniel Calviño Sánchez 9a520fba0d Do not show pointer cursor in the author rows of the public view
The contacts menu is not shown in the public view for any user, so the
default cursor should be used for all the author rows.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 15:16:56 +02:00
Daniel Calviño Sánchez 19ed71a605 Do not show pointer cursor in the author row of guest users
Note that "currentUser" is not set in the author row of guest users, but
this is not a problem; that CSS class is used only to show the default
cursor instead of the pointer cursor, but as all the author rows of
guest users show the default cursor it makes no difference if
"currentUser" is set for them or not.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 15:05:04 +02:00
Daniel Calviño Sánchez cdda7379fb Do not show pointer cursor in the author row of the new message form
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 14:52:45 +02:00
Daniel Calviño Sánchez a93ae19ca1 Move "currentUser" CSS class to wrapper div
Instead of adding the "currentUser" CSS class to ".avatar" and ".author"
elements now it is added to their wrapping ".authorRow" element.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 14:03:58 +02:00
Daniel Calviño Sánchez 44d8033cb6 Fix appearance of author row when showing the date
When a message shows the date separator its author row is explicitly
shown. This is needed to ensure that the author row will always be shown
in that case, even if the message is a grouped message. In normal
messages (those that are not grouped and do not show the date separator)
the author row is shown using "display: inline-flex", so the same value
should be used too for messages that show the date separator.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-30 12:55:04 +02:00
Ivan Sein 99907e81b4
Merge pull request #827 from nextcloud/fix-working-icon-position-when-sending-a-message
Fix working icon position when sending a message
2018-04-27 17:06:29 +02:00
Daniel Calviño Sánchez 90a43ffc1a Remove unneeded CSS rule
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-27 15:42:49 +02:00
Ivan Sein 25423d9ef3
Merge pull request #824 from nextcloud/bugfix/noid/make-unread-count-more-obvious
Make the unread count more obvious
2018-04-27 08:17:41 +02:00
Nextcloud bot b87929008f
[tx-robot] updated from transifex 2018-04-27 00:34:01 +00:00
Daniel Calviño Sánchez d609fa064b Fix working icon position when sending a message
When a message is being sent the submit icon is hidden and the working
icon is shown instead. However, the working icon was not placed at the
same position as the icon it replaced; the CSS rules for the submit icon
were modified in some previous commit, but the CSS rules for the working
icon were not appropriately updated. Now the CSS rules were rewritten so
both elements use the same placement rules; this fixes the issue and
should make it less likely to happen in the future if the placement is
modified again.

Also, now the size is explicitly set to ensure that both elements have
the same size; before it depended on other rules, and which rules
affected the size were different for each element due to being of
different types.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-26 21:58:23 +02:00
Joas Schilling fad03fbb4b
Make the unread count more obvious
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 15:33:00 +02:00
Joas Schilling 2864dc83be
Merge pull request #812 from nextcloud/feature/noid/chat-autocomplete-suggestions
Autocomplete for mentions
2018-04-26 15:14:18 +02:00
Joas Schilling d8c56b4608 Add a comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 1f6c2be0ed Fix typo in docs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 993647faed Add tests for the search
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 44b47ef315 Add unit tests for the controller
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 982bf986ba Add docs for the /mentions endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 4cf756fbe6 Make the search case-insensitive
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 37dad5b037 Do not suggest the current user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Daniel Calviño Sánchez 3244c2a9a9 Add formatted mentions to messages being composed
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>
2018-04-26 12:50:20 +02:00
Joas Schilling 85cd8181e5 Add basic UI for autocompletion
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>
2018-04-26 12:49:24 +02:00
Daniel Calviño Sánchez 790bddd06d Add At.js and dependencies
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:46:58 +02:00
Joas Schilling 63831a4455 Sort suggestions by last chat message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:46:58 +02:00
Joas Schilling 1472935fb5 Start autocomplete for mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:46:58 +02:00
Joas Schilling dad8c1fdf8
Merge pull request #814 from nextcloud/fix-pointer-cursor-not-shown-on-message-authors
Fix pointer cursor not shown on message authors
2018-04-26 12:23:57 +02:00
Ivan Sein 1968038505
Merge pull request #813 from nextcloud/make-mentions-more-prominent
Make mentions more prominent
2018-04-26 10:05:11 +02:00
Daniel Calviño Sánchez 6effa97a1e Fix pointer cursor not shown on message authors
Clicking on a message author shows the contacts menu (provided the
author is not the current user); in those cases the cursor should be a
pointer so the user knows that an interaction with those elements is
possible.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-26 00:49:41 +02:00