In order to show the autocompletion it was needed to type at least
another character after "@", so only the mentions that matched that
character were shown. Now the autocompletion is shown as soon as "@" is
typed, which shows all the possible mentions.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
"OC.dirname" removes everything after the last "/", so a path without
slashes is returned without changes. "result.path" does not include
leading nor trailing "/", so when the path is for a file or folder in
the base folder "OC.dirname(result.path)" returns "result.path".
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The contacts menu was triggered only when the avatar or the name of the
user were clicked. Due to this, clicking on certain (small) areas of a
mention (like the right end, or the space between the avatar and the
name) did not show the contacts menu. Now the contacts menu is shown
when any area of the mention is clicked.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The avatar should be shown immediately after the avatar to be able to
accurately define the space between them using only CSS rules.
Note that in the case of the "atwho" menu it is not really needed, as a
whitespace removal seems to be done automatically by the plugin, but it
was modified for its displayed elements too for consistency.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Visually it makes no difference, but as the ".avatar" element is inside
a "span" element it can not be a block element to be compliant with the
HTML specification.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
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>
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>
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>
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>
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>
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>
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>