Commit Graph

25 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez 0db3a413b3 Fix mentioned user not clickable after posting or editing a comment
The contactsMenu plugin was called on avatar elements from
_postRenderItem, which is called when a new comment is added to the
collection. Due to this contactsMenu was not called when messages were
edited; when a new comment is posted _postRenderItem is called, but at
that time the "mentions" attribute is not filled yet, so "@username" is
not replaced by avatars in the message and thus contactsMenu has no
avatars to be called on.

Calling contactsMenu was moved to a new method, _postRenderMessage,
which is called from _postRenderItem and from the success callback when
fetching the model in _onSubmitSuccess (which replaces "@username" by
avatars in the message after posting or editing a comment).

Fixes #4555

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-08 22:24:33 +02:00
Daniel Calviño Sánchez 002018d8ad Add missing unit tests for comments with mentions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-05-08 21:55:22 +02:00
Georg Ehrke 6d7714f182
fix CommentsTabsView js test
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:28:15 +02:00
Joas Schilling d4200a08cc
Get the user folder of the correct user
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-09 21:07:37 +01:00
Morris Jobke 200a28255e
Always enable avatars
* we introduced this setting in the begining because our
  avatar support caused some performance issues, but we
  fixed them and should only provide one way how Nextcloud
  looks

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-13 17:53:33 -06:00
Joas Schilling bb84db02cb
Cleanup comment tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-09 12:03:34 +01:00
Joas Schilling d2489ebee4
Adjust tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-23 11:31:35 +01:00
Joas Schilling 041dd937cf
Update test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-18 16:51:50 +01:00
Arthur Schiwon b12b52b73b
fix JS test and introduce tests for rendering mentions to displaynames
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-25 18:33:59 +02:00
Arthur Schiwon fea3e20a80
move mention extraction to (I)Comment and report mentions via DAV
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:33:55 +02:00
Morris Jobke 96f8f209b9 Merge pull request #1449 from nextcloud/comments-user-mention
Notifications for simple @-mentioning in comments
2016-10-17 09:30:47 +02:00
Arthur Schiwon 70c7781aa8
apply some polish
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-14 15:36:05 +02:00
Arthur Schiwon 1bcd2ca8e3
emit pre-update event for comments
* notifications can be cleaned up, no polluted DB
* updating comments will re-notify users or remove notifications, depending on the message

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-12 18:06:22 +02:00
Arthur Schiwon a9671a4dc2
adjust wording of the notification
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-08 01:17:51 +02:00
Arthur Schiwon a35d4e7b44
remove notifications of deleted comments from the DB
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-08 01:10:49 +02:00
Arthur Schiwon 006da9afd7
use different files route/controller
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-07 17:27:33 +02:00
Arthur Schiwon e1073cf442
Notificacations for simple @-mentioning in comments
(WIP) notify user when mentioned in comments

Fix doc, and create absolute URL for as notification link.

PSR-4 compatibility changes

also move notification creation to comments app

Do not notify yourself

unit test for controller and application

smaller fixes

- translatable app name
- remove doubles in mention array
- micro perf optimization
- display name: special label for deleted users, keep user id for users that could not be fetched from userManager

Comment Notification-Listener Unit Test

fix email adresses

remove notification when triggering comment was deleted

add and adjust tests

add missing @license tags

simplify NotificationsController registration

appinfo simplification, php docs

make string easier to translate

adjust test

replace dispatcher-based listeners with a registration method and interface

safer to not pass optional data parameter to setSubject for marking as processed. ID and mention suffices

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

update comment

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-07 17:11:19 +02:00
Roeland Jago Douma c83b3e6bd5
Fix js test 2016-10-04 13:07:44 +02:00
Roeland Jago Douma 0d96478758
Fix js unit test 2016-08-17 11:48:26 +02:00
Vincent Petry 142a2dd2eb Limit comment size to 1000 in UI
Whenever the limit is almost reached (90% of the length), a tooltip will
appear.

Once the limit is exceeded, the "Post" button will be disabled and the
field will become red.
2016-02-05 15:45:30 +01:00
Vincent Petry 2e46576e83 Special label for deleted users in comments list 2016-02-04 11:26:11 +01:00
Vincent Petry 805ba20bae Added unit tests for edit/delete comments 2016-02-03 21:06:55 +01:00
Vincent Petry 85bec3ffcb Reset comments read marker after loading comments 2016-02-03 16:18:14 +01:00
Vincent Petry 8bb1437e24 Add file row indicator for unread comments 2016-02-03 13:00:55 +01:00
Vincent Petry 03f4b49ecc Added JS unit tests for comments 2016-02-02 18:01:15 +01:00