Server: Handle right-click properly so it’s a shortcut for action menus

Created on 20 Dec 2018  Â·  10Comments  Â·  Source: nextcloud/server

These days more and more web apps handle right-click because people are somehow used to it from the desktop. It feels weird that when you right-click in Nextcloud, this browser menu with totally unrelated items comes up.

It’s like if we wouldn’t have changed Ctrl-S in our text editor to save the document instead of giving the default "Save page as …" dialog, or if we wouldn’t default Ctrl-F to our integrated search.

We need to make sure this works across the board. Essentially:

When you are on an element with a menu, right-click should open the 3-dot-menu popover, but in the place of the cursor.

For example:

  • Right-click on files in the Files app should open the action menu
  • The menu in the Talk app left bar
  • Share recipients in the Files app sidebar
  • On cards in the Deck app https://github.com/nextcloud/deck/issues/800
  • On mail accounts in the Mail app, and on mails in the list
  • On the header menus (more apps, contacts, notifications, user) it would simply show the menu just like on click

And when you right-click on an element which has no action menu associated, like the Files app navigation bar? Initially we can simply show the default browser menu.

What do you think @nextcloud/designers @nextcloud/javascript?

1. to develop enhancement help wanted overview

Most helpful comment

@stefan-niedermann the question we need to ask is, how many user really need the browser right click.
I mean, open a link to a new tab? Translate? Print?
All what's left are never used or for devs. So the real question is, why would it be frustrating?
Example: on youtube, their player is sometimes bugged for me. They added a dedicated right click menu, so if I want to inspect, I have to click twice. Though, why would anyone right click on the youtube player?

I think it's perfectly ok to have a right click on dedicated elements. Especially if they don't open a new menu on the cursor but just an element of the ui (e.g. the already existing menu of the file).
And on a second note, people are used to it now. Drive, dropbox, MS they all do it. Not to be a :sheep: but I think it's a nice addition. :)

All 10 comments

My 2 cents

  1. Don't do it. Context menus are hard to descover, often used by tech people to "live" open source: inspecting, chaning, yes: i am thinking about developer tools.
  2. We should not make the browser default menus inaccessable. This will lead to further issues (think about ctrl + f, at least we have a fallback there by hitting ctrl + f two times but many people are still confused, can not find the default browser search and some are opening issues about this topic). there are some default entries that might be useful, like copy, paste, native share dialogs and so on which we would destroy. (and you can not know which entries you are destroying, it depends heavily in the platform)

I'm using this app https://github.com/NastuzziSamy/files_rightclick which exactly does this for files but actually does not support NC15. So I would like to see native support for it. (also for a equal experience across the whole Nextcloud universum)
I think at most places users don't need the browser context menu, but would expect Nextcloud options to pop up there on right click.

there are some default entries that might be useful, like copy, paste, native share dialogs and so on which we would destroy.

If we don't overwrite it for input dialogs, native copy/paste is still usable there. Also I don't think native share dialogs make sense inside Nextcloud, because these links would be unusable for not logged in users anyway.

@stefan-niedermann the question we need to ask is, how many user really need the browser right click.
I mean, open a link to a new tab? Translate? Print?
All what's left are never used or for devs. So the real question is, why would it be frustrating?
Example: on youtube, their player is sometimes bugged for me. They added a dedicated right click menu, so if I want to inspect, I have to click twice. Though, why would anyone right click on the youtube player?

I think it's perfectly ok to have a right click on dedicated elements. Especially if they don't open a new menu on the cursor but just an element of the ui (e.g. the already existing menu of the file).
And on a second note, people are used to it now. Drive, dropbox, MS they all do it. Not to be a :sheep: but I think it's a nice addition. :)

I think it makes sense as an addition and optional way to interact.

I agree with Frank - if, like Jan proposes, this opens the ... menu, no discoverability or touch-screen usability is lost but it does what most users would expect. I agree that the default browser menu isn't useful for 99% of the users (heck most of the time not even for us) and those options are available in the browsers' menu anyway.

And who’s up for handling the implementation here? :) We can also put it to 17 for now, depending on how much time it takes. cc @skjnldsv @juliushaertl

Maybe @NastuzziSamy would be interested in getting involved here, as the developer of the files_rightclick app?

Hey, that's a great news ! I wanted to open an issue after releasing the new version of FilesRightClick app to ask for a direct incorporation of a framework to create quickly and easely context menus as I did for the Files app.

It would be cool for many reasons:

  • Native support for custom context menus
  • Surely apps like Deck will integrate (a) context(s) menu(s)
  • Same context menu design for every apps
  • A Nextcloud API to communicate, handle interactions
  • What is more desktop immersive if not that ?

As a good example, the FilesRightClick is really used (for Files but it could be used as framework also).

Do not hesitate to contact me, I would be thankfull to participate with you.

Good stuff @NastuzziSamy! You should come to our next Contributor Week in Stuttgart in March: https://nextcloud.com/blog/the-contributor-week-is-over-time-to-plan-for-the-next-one/
Contributors like you can apply for travel/accomodation funding!

Would be great to sit together there about how to integrate it properly. :slightly_smiling_face:

@jancborchardt thank you !

Count on me to be present ! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blackcrack picture blackcrack  Â·  3Comments

juliushaertl picture juliushaertl  Â·  3Comments

rullzer picture rullzer  Â·  3Comments

Django-BOfH picture Django-BOfH  Â·  3Comments

georgehrke picture georgehrke  Â·  3Comments