Commit Graph

147 Commits

Author SHA1 Message Date
Morris Jobke 2dd55b0550
Brighter comments icon
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-07-25 20:28:49 +02:00
Joas Schilling 8c7969e730 Allow to search by comments
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-25 18:53:44 +02:00
Julius Härtl 6d29b36200
Limit small avatar rendering only to inline mentions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-25 14:26:04 +02:00
John Molakvoæ (skjnldsv) b7317a35e7
Focus the comment input on tab select/loading
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-24 12:34:02 +02:00
Julius Härtl 9771b70c8f
Fix inline avatar display for mentions in comments
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-18 20:28:02 +02:00
Abijeet 16bf9326cb Fixing failing test cases due to change in functionality.
Also fixes scrutinizer warnings.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 01:34:00 +05:30
Abijeet 01c5a31a4a Adds a tooltip for the submit / save button in comments.
Towards #7281

Also hiding the menu before triggering click action.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 00:49:34 +05:30
Abijeet 872853af58 Moves the edit and delete options into a dropdown menu.
Fixes #7281

- Added a new View to render the dropdown.
- Modified the existing code.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 00:49:34 +05:30
Abijeet 61b38a16fa Fixes the following UI issues,
1. Increased the size of the delete, edit, close and submit buttons to take up 44x44px.
2. Now showing the delete button at all times when editing to avoid usability issues with touch screens.
3. Edit icon is also shown at all times, rather than only on hover.
4. Reduced the gap between comments a wee bit.
5. Fixed issues with focus event now working properly for edit and delete.
6. Removed absolute positioning of elements for alignment.
7. Fixed issue with tooltips becoming too high due to padding around actions. Occurred due to my changes.
8. Changed the position of the submit and close icons.
9. Fixed issue with jumping of the delete icon in Firefox. Occurred due to my changes.
10. Fixed issue with wrapping of content due to long author names. Occurred due to my changes.
11. Fixed issue with longer comments not appearing properly. This might have occurred due to my changes.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 00:49:34 +05:30
Abijeet b3e1026cab Fixes div being added placed directly under ul during editing of comments.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 00:49:34 +05:30
Abijeet facd1cae2f Fixes issue where saving a non-modified comment kept the edit window open.
Now irrespective of the whether the comment has been modified we are going to go back to the view mode.

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
2018-03-27 00:49:34 +05:30
Joas Schilling dabd7291c3
Make the new autocomplete endpoint OCS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-21 09:46:52 +01:00
rakekniven b348cd170a
Update commentstabview.js
Changed typo reported at GitHub.
See https://www.transifex.com/nextcloud/nextcloud/translate/#de_DE/$/91002505?issue=yes
2018-03-01 20:53:50 +01:00
Arthur Schiwon 282567fced
format links in comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-03 13:11:20 +01:00
Roeland Jago Douma 4c0c3c0bef
Show max warning comment lenth again
Fixes #7414

Since we no longer use an input field we have to use text instead of
val.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-02 10:28:09 +01:00
Morris Jobke 5724e75827
Merge pull request #7252 from nextcloud/send-comment-on-enter
Submit comments with Enter and use Shift+Enter for new lines
2017-12-08 15:31:10 +01:00
Daniel Calviño Sánchez 9b1f3b969e Fix Enter sending comment instead of adding autocomplete item to message
When the autocomplete popover is shown the At.js plugin listens on the
message input field for key down events, and when Enter is pressed it
adds the selected item to the message. However, as "_onTypeComment" also
handles key down events for the message input field, when Enter was
pressed the comment was submitted and At.js had no chance to add the
item before that happened. Now when Enter is pressed and the
autocomplete popover is shown the comment is not submitted, and thus
At.js adds the selected item to the message as expected.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-12-07 15:38:46 +01:00
blizzz e428ef9d75
Merge pull request #7256 from nextcloud/fix-cursor-for-avatar-and-user-names-in-comments
Fix cursor for avatar and user names in comments
2017-11-27 15:14:40 +01:00
Morris Jobke cfae590ac9
Merge pull request #7266 from nextcloud/fix-input-field-not-disabled-while-a-comment-is-being-sent
Fix input field not disabled while a comment is being sent
2017-11-27 13:40:03 +01:00
Lukas Reschke d15ca9ffaf
Replace with non-deprecated JS call
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-11-27 11:53:24 +01:00
Daniel Calviño Sánchez ea4414f9bc Disable contacts menu for mentions to current user in comment messages
The contacts menu is not shown for avatars and user names in the author
row if they represent the current user. For consistency, and because the
contacts menu provides no value when shown for the current user, this
commit also disables the contacts menu for mentions to the current user.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-27 00:10:53 +01:00
Daniel Calviño Sánchez 8eb19a278c Disable contacts menu for mentioned users in comments being composed
The contacts menu does not provide too much value for users mentioned in
a message being composed, so it is now disabled in this case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-27 00:05:54 +01:00
Daniel Calviño Sánchez 107952ff00 Fix cursor for author row and avatars in comments
When it was on an author row the cursor was shown as a pointer, even if
clicking on the author row itself does nothing. On the other hand,
avatars used the default cursor, even if clicking on them either shows
the contacts menu (in the case of the author row, only when the avatar
is for a different user than the current one) or inserts a mention (for
avatars shown in the list of suggested mentions), depending on the case.

Now, the author row uses the default cursor, and avatars (and their
associated user name) use a pointer cursor if clicking on them will
trigger an action (either showing the contacts menu or inserting a
mention).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-26 23:56:03 +01:00
Daniel Calviño Sánchez 9bb2bb7870 Show delete working icon at the same position as the delete icon
When a comment was being deleted the submit working icon was shown. Now
the submit working icon is kept hidden in that case and a specific
delete working icon, which is shown at the same position as the delete
icon, is used instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-24 16:31:37 +01:00
Daniel Calviño Sánchez 5e6d4ad27c Disable elements while a comment is being deleted
When a comment is being deleted the "disabled" class is added to the
comment div, which causes it to look disabled. However, the input
elements and the content editable div were not truly disabled, and thus
it was still possible to interact with them. This commit ensures that
they are properly disabled while the comment is being deleted.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-24 13:17:55 +01:00
Daniel Calviño Sánchez bbe00079cc Fix input field not disabled while a comment is being sent
Since the change of the text area to a content editable div the input
field was no longer disabled while a new comment was being sent. It was
caused by still trying to disable the div using the "disabled" property,
which works only on real input fields; when using a content editable div
the way to disable it is by setting "contenteditable" to "false".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-23 14:34:09 +01:00
Daniel Calviño Sánchez 60a73bab1c Submit comments with Enter and use Shift+Enter for new lines
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-11-23 03:27:16 +01:00
Arthur Schiwon 2b4b3b1986
adjust jsunit tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-01 11:44:01 +01:00
Arthur Schiwon 582d2d36ee
fix avatar loading for generic placeholders
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-31 14:42:21 +01:00
Arthur Schiwon d0f2f5f1de
remove more vendor-imported files that aren't necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-31 14:06:16 +01:00
Arthur Schiwon bcfac75b06
simplify registration of manager in server container
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-31 13:55:03 +01:00
Arthur Schiwon 4b24dea6c7
only ship minimized js files
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-31 12:28:22 +01:00
Arthur Schiwon d5f1cef642
fix comment sorter
background: we have a flat hierarchy of comments, not a tree. therefore we
can also remove again the unnecessary additions.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-30 15:59:43 +01:00
Arthur Schiwon 61db8615f4
preserve line breaks
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-30 11:10:04 +01:00
Arthur Schiwon ca72c0150b
configurable amount of autocomplete results in comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 13:50:38 +02:00
Arthur Schiwon eace507043
apply our theming
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 00:32:47 +02:00
Arthur Schiwon aa2fd30775
autocomplete on demand
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-26 15:25:24 +02:00
Arthur Schiwon fb40afc4d4
enable autocomplete when editing comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-23 18:00:39 +02:00
Arthur Schiwon eb8f1247fe
fix unstable comment order
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-23 15:37:36 +02:00
Arthur Schiwon de8a475b0b
fix contactsmenu-popup
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:34 +02:00
Arthur Schiwon ccbcce978f
convert mentions after save to the plain format we use
also ensures proper rendering, even of edited comments

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:34 +02:00
Arthur Schiwon 8d9f485b35
when writing a comment, render mentions as they'd appear anywhere
i.e. avatar with displaymenu and contactsmenu-popover

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:33 +02:00
Arthur Schiwon ec5607544c
turn textarea to contenteditable div
we will need it for nice formatting of the mentioned user

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:33 +02:00
Arthur Schiwon d1afbedc5f
setup atwho autocomplete
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:33 +02:00
Arthur Schiwon 8e60a2bd28
add At.js and dependencies
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:14:33 +02:00
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
Georg Ehrke 897bd5cfef
add contactsmenu popover to comments
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:28:14 +02:00
Lukas Reschke bdd71b6081
Merge JS for comments
Shaves off 6 requests.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-03-24 19:49:43 +01:00
noveens 40228c0c2b
added quit option in commentstabview.js
added quit option in notif in app.js

added quit option in notif in file-upload.js

added quit option in notif in fileinfomodel.js

added quit option in notif in filelist.js

added quit option in notif in filelist.js

added quit option in notif in tagsplugin.js

added quit option in notif in statusmanager.js

added quit option in notif in external.js

added quit option in notif in versionstabview.js

added quit option in notif in notification.js

changes according to the latest review.

timeout removed since there is a button to close it

translation capability added

typo fixed

test files updated

small errors fixed

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-23 13:12:29 -06: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
Arthur Schiwon 754760fdbe
mention property to follow same style
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-23 17:01:58 +01:00
Michael Jobst 969c19b2e9
Fixed size issues on main detail view and disappearing of share recipients (#26603)
* fixed size issues on main detail view and disappearing of share recipients

* Changes due to code comments

* Moved reloadProperties() to FileInfoModel

* Solved Scrutinizer issues

* Bugfix: undefined value used on error

* check if options are set for FileInfoModel.initialize()

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-12-23 16:56:55 +01:00
Joas Schilling 8105ba9929
Move comments activities to the new API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 12:20:03 +01:00
Arthur Schiwon ab3954745c
avoid that all avatars are copied to the author row when editing comments
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-21 22:57:06 +02:00
Arthur Schiwon 763a99ec30
consolidate error handling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 13:56:49 +02:00
Arthur Schiwon bc18a2900e
fix avatar displaying after submit (either edit or new)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 12:47:53 +02:00
Arthur Schiwon 185433967e
display avatar (if enabled) alongside displaynames
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Arthur Schiwon 70bd6cafd4
fix regex
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Arthur Schiwon b21ce6ee5e
improve regex, fixes replacements of usernames with same trunk
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Arthur Schiwon 0e926efc9b
show displayname not uid in commit mentions
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2016-10-19 00:34:00 +02:00
Morris Jobke 675230f86d Merge pull request #1407 from nextcloud/multiline_comments
Bring back multiline comments
2016-10-11 16:17:51 +02:00
Joas Schilling 43265befac
Update file header
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-05 14:33:54 +02:00
Vincent Petry dba72a48cd
Fix activity rendering plugin name
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-05 14:21:26 +02:00
Joas Schilling ed70d4a2dc
Mark the methods as copied
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-05 14:21:26 +02:00
Joas Schilling 724cd50e52
Register a ActivityTabView plugin
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-05 14:21:25 +02:00
Roeland Jago Douma 5ca50d9f31
Add autosize to comments input
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-04 13:04:56 +02:00
Joas Schilling c9c64141ee
Fix comment count tooltip
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-28 10:54:37 +02:00
Joas Schilling 80e8d3db35
Use live timestamp on comments tab 2016-09-01 09:02:36 +02:00
Joas Schilling 28792a010c
Prevent parse error on editing an HTML comment 2016-08-29 14:18:34 +02:00
Joas Schilling 9f58e62925
Fix double ending quotes 2016-08-18 11:44:03 +02:00
Morris Jobke 869c841082
Improve layout of cancel button in the comments sidebar 2016-08-18 09:07:03 +02:00
Jan-Christoph Borchardt efd1cf57da
fix design details in comments sidebar 2016-08-17 11:12:49 +02:00
Vincent Petry 56ad4cdfec
Show error message when posting an invalid comment
When an internal server error occurs while creating or updating a
comment, display a proper error notification in the UI.
2016-06-24 10:17:12 +02:00
Vincent Chan 5f2a19e965 fixes indentation 2016-05-03 12:29:43 +02:00
Vincent Chan bc0d136511 adds functionality to submit comments with cmd+Enter 2016-05-03 12:26:05 +02:00
Vincent Chan 7ac1cb68f6 Submit comment on ctrl+Enter
closes #24302
2016-05-02 19:52:13 +02:00
Jan-Christoph Borchardt 6e97ab1b71 remove comments count because it is not that relevant to show directly 2016-02-25 20:48:19 +01:00
Thomas Müller 3a97a0ad7f Merge pull request #22475 from owncloud/fix-js-issues
Fixes code analysis issues
2016-02-18 10:14:31 +01:00
Morris Jobke d55cfb4f89 Fixes code analysis issues 2016-02-17 15:19:42 +01:00
Joas Schilling 077a407285 Show the comments and tags on the share filters 2016-02-16 11:24:44 +01:00
Vincent Petry 78864dc6fa Collapse long comments
Very crude a naive implementation that relies on length and number of
newlines. Should be good enough for most cases.

Clicking on such comments will expand them.
2016-02-08 10:05:03 +01: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 1caee3ac2e Move comment delete action into edit mode 2016-02-03 21:06:55 +01:00
Vincent Petry bbefe1ed64 Comment owner can now edit or delete 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 8b98cf5a5b Fixed report name 2016-02-02 18:06:16 +01:00
Vincent Petry 03f4b49ecc Added JS unit tests for comments 2016-02-02 18:01:15 +01:00
Vincent Petry 9028457ea2 Add spinner when submitting comments 2016-02-02 18:01:15 +01:00
Vincent Petry 3a6d065e50 Fix formatting messages with newlines 2016-02-02 18:01:15 +01:00
Vincent Petry 64ad99db70 Better comments pagination logic 2016-02-02 18:01:15 +01:00
Vincent Petry fdf555e814 Improve comments style, add avatars 2016-02-02 18:01:15 +01:00
Vincent Petry 67a36a2cca Use last comment's time for pagination 2016-02-02 18:01:15 +01:00
Vincent Petry 29386eccf9 Add pagination support for comments GUI 2016-02-02 18:01:15 +01:00
Vincent Petry d1518045ec Improve comment date format 2016-02-02 18:01:15 +01:00
Vincent Petry cca33942aa Comments GUI 2016-02-02 18:01:15 +01:00