the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
924 stars 110 forks source link

Add a right-click menu #461

Closed Massedil closed 7 months ago

Massedil commented 1 year ago

It can be really practical to have a right-click menu with some options :

the-djmaze commented 1 year ago

There is the context event, but that has drawbacks:

So, somewhere in the past there was a great HTML5 feature contextmenu attribute. It allowed what you want: add items to the context menu! But it is obsolete because only Firefox supported it.

And now there's a problem: there is no good alternative to create a right-click menu :crying_cat_face:

jsonoctopus commented 1 year ago

And now there's a problem: there is no good alternative to create a right-click menu

Perhaps the well appreciated right click app for Nextcloud has interesting php code to look at ? https://apps.nextcloud.com/apps/files_rightclick

the-djmaze commented 1 year ago

@jsonoctopus sorry, that code is bad by design. It "disables" the browser context menu, as i said.

For example:

  1. view a message with images and/or links
  2. right click image/link to get the browser context menu options

Custom right-click menu:

  1. view a message with images and/or links
  2. right click image/link = No context menu
Massedil commented 1 year ago

it prevents the default context menu

I think you can always access the browser context menu with "Maj" + "Right click", without any plugin. Am I wrong ?

Maybe we can inform snappymail users with a one time message, the first time the new snappymail context menu is displayed, that explains :

And add in the new snappymail context menu interface a "help icon" that display again this message ?

What do you think about that ?

Massedil commented 1 year ago

right click image/link = No context menu

To improve user experience, maybe we can also display only the new context menu when the right click is on emails and disable it when it is inside email content ?

So that you always can right-click a link or an image.

the-djmaze commented 1 year ago

I think you can always access the browser context menu with "Maj" + "Right click", without any plugin. Am I wrong ?

No idea, i will test that option.

Mer0me commented 1 year ago

I can confirm that under firefox the shift-right-click allows to see the browser built-in context menu

ner00 commented 1 year ago

If implemented, ideally the context menu should only work while hovering specific areas of the webmail (message list, folder list, contact list, etc), somewhat like Roundcube's context menu plugin: https://github.com/johndoh/roundcube-contextmenu/

the-djmaze commented 7 months ago

Since it will not work on touch screens, i won't work on this.