Skip to content

Conversation

@danxuliu
Copy link
Member

When it was on an author row the cursor was shown as a pointer, even if clicking on the author row itself does nothing. Also avatars used the default cursor, even if clicking on them shows the contacts menu (if the avatar is for a different user than the current one). Now the cursor is shown as a pointer on avatar and user names of users different than the current one.

There are still some changes pending based on what is decided in #7254 (right now the cursor used for mentions in messages being composed is the default one; changing it to a pointer would require removing .comment from #commentsTabView .comments .message... and also adding the currentUser class to the appropriate mentions through JavaScript).

@jancborchardt Besides that maybe the contacts menu should be completely disabled for mentions in messages being composed, as it does not provide too much value there (and, moreover, right now it does not appear in the proper position).

@danxuliu danxuliu added 2. developing Work in progress bug design Design, UI, UX, etc. feature: comments labels Nov 23, 2017
@danxuliu danxuliu added this to the Nextcloud 13 milestone Nov 23, 2017
@codecov
Copy link

codecov bot commented Nov 23, 2017

Codecov Report

Merging #7256 into master will decrease coverage by 0.1%.
The diff coverage is 91.66%.

@@             Coverage Diff              @@
##             master    #7256      +/-   ##
============================================
- Coverage     50.85%   50.75%   -0.11%     
- Complexity    24551    24622      +71     
============================================
  Files          1585     1585              
  Lines         93833    94046     +213     
  Branches       1354     1356       +2     
============================================
+ Hits          47719    47731      +12     
- Misses        46114    46315     +201
Impacted Files Coverage Δ Complexity Δ
apps/comments/js/commentstabview.js 80.06% <91.66%> (+0.12%) 0 <0> (ø) ⬇️
lib/private/legacy/image.php 28.71% <0%> (-10.21%) 280% <0%> (+68%)
lib/private/Files/Cache/Propagator.php 94.93% <0%> (-1.27%) 16% <0%> (ø)
lib/private/Server.php 82.62% <0%> (-0.69%) 126% <0%> (ø)
lib/private/legacy/app.php 54.06% <0%> (-0.12%) 221% <0%> (ø)
lib/private/Share20/Manager.php 86.55% <0%> (-0.1%) 235% <0%> (+1%)
lib/base.php 3.09% <0%> (-0.04%) 167% <0%> (ø)
core/Command/App/Install.php 0% <0%> (ø) 5% <0%> (ø) ⬇️
settings/ajax/updateapp.php 0% <0%> (ø) 0% <0%> (ø) ⬇️
core/ajax/update.php 0% <0%> (ø) 11% <0%> (ø) ⬇️
... and 13 more

@jancborchardt
Copy link
Member

@danxuliu yeah, we can remove the menu for comments being composed! :)

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>
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>
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>
@danxuliu danxuliu force-pushed the fix-cursor-for-avatar-and-user-names-in-comments branch from f83a6ca to ea4414f Compare November 26, 2017 23:13
@danxuliu
Copy link
Member Author

yeah, we can remove the menu for comments being composed! :)

Done! I have also disabled the contacts menu for mentions to the current user in final messages.

Also, after disabling the contacts menu for comments being composed and with some changes I made to the original CSS selectors this pull request no longer depends on what is decided in #7254; either way the contacts menu and the cursor will work as expected :-) (or at least I think so :-P )

With all that this pull request is now ready to be reviewed!

@danxuliu danxuliu added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 26, 2017
+ ' data-user-display-name="'
+ _.escape(displayName) + '"></div>';

var isCurrentUser = (uid === oc_current_user);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oc_current_user is deprecated?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me replace that with OC.getCurrentUser().uid

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works 👍

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Copy link
Member

@LukasReschke LukasReschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danxuliu Please check d15ca9f. THX :)

Copy link
Member

@blizzz blizzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works

@blizzz blizzz merged commit e428ef9 into master Nov 27, 2017
@blizzz blizzz deleted the fix-cursor-for-avatar-and-user-names-in-comments branch November 27, 2017 14:14
@danxuliu
Copy link
Member Author

(Yes, I am late to the party, but anyway)

Oops, I did not know that oc_current_user was deprecated, sorry!

@LukasReschke Your fix was perfect, thanks :-)

danxuliu added a commit that referenced this pull request Nov 28, 2017
Although #7256 was merged cleanly some of the changes really conflicted
with those introduced by the last commit of #7251, and this broke the
appearance of the author row of comments. This commit fixes those silent
conflicts and restores the appearance of the author row.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>

$.merge(avatar, strong).contactsMenu(avatar.data('user'), 0, appendTo);
var username = $(this).data('username');
if (username !== oc_current_user) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:( @danxuliu please adjust here too

rullzer added a commit that referenced this pull request Nov 29, 2017
…erging-7256-after-7251

Fix silent conflicts due to merging #7256 after #7251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug design Design, UI, UX, etc. feature: comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants