sindresorhus / electron-debug

Adds useful debug features to your Electron app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make the debug context menu an 'opt-in' feature

parro-it opened this issue · comments

After reasoning in #17 and #13, I think it could be an improvement to make this feature an opt-in.
I mean, users could just require the context-menu module in renderer process if they need the feature.
This way, we skip all issues related to require method availability and node-integration, and main module code will be further simplified.

I'd vote for separating convenience features into a separate project. Then it could add things like better error output, error detection, logging, live reload, etc. While keeping electron-debug keyboard oriented, without touching any user code (like menus), and really small (5kb-ish).

without touching any user code

Already possibly touching user code with the keyboard shortcuts.

and really small (5kb-ish).

This is not the browser. Whether it's 1kb or 100kb doesn't really matter.

That being said, I don't really find the context menu that useful personally, so wouldn't mind it being a separate project.

Ok, so I'll move it to a separate project.
Maybe I can add a note in electron-debug readme to notice other people that could find it useful?

Already possibly touching user code with the keyboard shortcuts.

It would be the same as Chrome shortcuts though, so they're probably not used by devs to mean something else in a Electron context. Adding/removing items to menu's I'd consider a different scenario.

Whether it's 1kb or 100kb doesn't really matter.

Absolutely, so if it was images or something then sure, but "convenience feature code" has to be pretty convenient and a 100kb "debug" library would be pretty daunting imho.

Glad to hear this can be split up. I really do like the small and simple module approach.

Feature moved to it's own repo.
Suggestions and star are welcomed there 😸
Removal PR is here

convenient and a 100kb "debug" library would be pretty daunting imho.

It's all relative. 100kb is small when your app is 1000x of that. But anyways. Not gonna this discuss this anymore ;)

@parro-it Can't think of anything right now, but many possibilities. You could browse through the Chrome developer extensions for some inspiration: https://chrome.google.com/webstore/category/ext/11-web-development

@sindresorhus good suggestion, thank you, I'll do... anyway, what I means is suggestion on presentation of the repo... descriptions of repo purpose etc...