brrd/electron-tabs

Add Tab Options (Context Menu)

SudoVanilla opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Requested for Penpot Desktop: https://code.korbsstudio.com/KorbsStudio/Penpot-Desktop/issues/24

Describe the solution you'd like
It would be a good idea to add a context menu to tabs when a user right-clicks on a tab.

brrd commented

Thanks for this feature request.

I don't think we should handle this in electron-tabs. Context menu options are specific to the application. By instance the "copy link" and "reload tab" options in you example would not be relevant in a text editor application.

Since this menu will be very different for each application we should probably let app creators develop it as they want. There are tons of javascript libraries which already allow you to do this easily.

Furthermore having a different context menu management for each component (tabs, panels, main content...) in your application sounds like a bad idea to me. Instead I would suggest to use a single library (or piece of code) to handle all context menus in your application.