IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
284 stars 110 forks source link

Common Settings Dialog Box #336

Open Aradiv opened 4 years ago

Aradiv commented 4 years ago

A lot plugins have various settings that you are usally only changing once in a while after you have configured them once initially.

It would be great to have an common extendible dialog for all the settings.

Since we have jquery-ui included anyway we could just use Tabs

The dialog could then look something like this:

image

Plugins should be able to register a new tab ( eg "Bookmarks Opt") or just add another option to an existing tab (eg "Tokens").

johnd0e commented 4 years ago

@Aradiv I'd prefer much simpler implementation, without common dialog. E.g. dropdown list, containing options items of current #toolbox.

Aradiv commented 4 years ago

this can already be done with the "Free Sidebar" Plugin from Zaso.

The advantage of a common "settings" mechanism is that it allows for future things like sync settings or import/export entire settings.

johnd0e commented 4 years ago

@Aradiv Free sidebar is similar. But it transfers all the items to common list. And for this issue we only need specific items: 'DrawTools Opt', 'Bookmarks Opt', 'LinkDirection Opt', etc.

Aradiv commented 4 years ago

Yes thats why i don't consider "Free Sidebar" and the "Common Settings" to be the same thing.

for the settings we just need to find a place where it should be placed so it isn't distracting since most of the times you shouldn't need to change anything in there. so placing it directly under the layer chooser (one of the more frequented places) is probably a bad idea

Examples for stuff that could be in the settings: various settings (like MAX_IDLE_TIME, ON_MOVE_REFRESH , REFRESH, CHAT_REQUEST_SCROLL_TOP, CHAT_SHRINKED, etc etc) Various plugin specific settings like: sync folder (where to actually store stuff), missions limit (how many missions should be displayed) various tokens (multiple map providers require you to have an token that you need to set and having a seperate dialog for each of them is pretty overkill)

johnd0e commented 4 years ago

Examples for stuff that could be in the settings: various settings (like MAX_IDLE_TIME, ON_MOVE_REFRESH , REFRESH, CHAT_REQUEST_SCROLL_TOP, CHAT_SHRINKED, etc etc)

That is awesome idea that definitely deserves separate issue. We should not discuss it here.

johnd0e commented 4 years ago

Or opposite, let discuss it here, but leave alone all other stuff (like already existent dialogs - DrawTools Opt etc)

for the settings we just need to find a place where it should be placed so it isn't distracting [...]

Sure. Like some collapsible element (which may stay in toolbox). Or icon.

johnd0e commented 4 years ago

To summarize.

  1. We need some UI for easy changing of various hidden constants and parameters of iitc and plugins (e.g. #228).
  2. We need to somehow organize numerous settings dialogs (from different plugins) to avoid toolbox clutter.
    • one of possible ways could be common setting dialog, incorporating all individual plugins settings, dividing by tabs. That is definitely not easy to create and support such complex dialog, and plugins have to apply some special api (requiring further handling) for that.
    • another proposed way is just separate all current settings entries (often marked as '... Opt') into own list (preferably dropdown or collapsible).

@Aradiv It is unproductive to discuss such wide range of questions in single issue. Please choose one subject to continue discuss here.

Aradiv commented 4 years ago

The Titel of the tabs is probably not well choosen as most of the "Opt" things from drawtools and bookmarks aren't really settings (except the draw color but this shouldn't be in settings as it is regulary changed)

What would be under the DrawTools Settings could be stuff like: "auto snap enabled" "draw width" "field opacity" "storage-key"

(similar for bookmarks)

The settings should be stuff that changes (almost) never changes once it is configured everything that needs to be changeable during "working" with intel doesn't belong into the settings area.

Everything that is only configured once and then left alone unless you really want to change things should be in settings.

johnd0e commented 4 years ago

@Aradiv But look, I may want regularly change all mentioned draw-tools options (except storage key). And anyway, we need some place to hold other draw-tools items, so why should we put them in different places? What benefits would we get from such separation?

Aradiv commented 4 years ago

they options where examples if they are changed regularaly then they aren't settings for the settings dialog. And not every Plugin might have Settings. TBH i assume only a few plugins will need it.

If we put "everything" into settings they get pretty cluttered and you will end up having to click a lot more to do your normal workflows. It is ment to have an easy and entendible way for settings that don't regulary change where a lot plugins only have a few (if any at all) API Tokens, Storage-Keys, etc etc. Things you change during your normal worklfow should be reachable as fast and easy as possible.

johnd0e commented 4 years ago

OK, so we are more likely going to discuss (1) of https://github.com/IITC-CE/ingress-intel-total-conversion/issues/336#issuecomment-587379280. UI for parameters that are currently hidden.