microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.33k stars 6.55k forks source link

[Run][Plugin Manager] Plugin management section (enable / disable, ...) #5273

Closed htcfreek closed 3 years ago

htcfreek commented 4 years ago

We have different plugins for PowerToys Run and there are several issue where people asking for new plugins. Also we have no concept of integrating the settings for some plugins.

Here are my ideas with some additional descriptions. Please note that the mock ups are no real xaml windows. The are made with Word and Paint.

The back arrow on the sub pages is for navigating back to the parent page. While giving the user the ability to disable plugins, they can define which types of results they wan't to see in the result list.

CRUTKAS addition from #6770

For PT Run, we need a way to manage plugins

This should be dynamically loaded as well so when new plugins are added in, or a 3rd party plugin is there, it continues to work.

HTCFREEK added 2020-09-30

Images (from HTCFREEK)

Plugin section on main page

Maybe we can use a sub item in navigation view fo access the plugin management page.

image


image If no plugins are enabled the section looks like this.

Sub page with plugin list

image The default plugins which are installed with PT Run are non-removable!


image

image


image If all plugins are disabled you will see this message.

Sub page where the user can manage a plugin

image


If you'd like to see this feature implemented, add a 👍 reaction to this post.

htcfreek commented 4 years ago

Improvements for users with many plugins

Search field for plugin list

If we have many plugins it would be interesting to have a search field between page title and plugin list.

image

Import plugin section

If the user has many plugins installed it's not relay nice if he has to scroll down the long list to import an new plugin. Maybe it's better to have an import plugin section at the top of the page.

image


If you'd like to see this feature implemented, add a 👍 reaction to this post.

niels9001 commented 4 years ago

@htcfreek. I really like the concepts and how it reflects how Windows 10 Settings does these things!

It does introduce some complexity with multiple views etc. with a lot of functionality that might not be there in a first version. I wonder if something like this would suffice for a quick v1.

Basically listing all plug-ins that come with PT Run out-of-the-box with the possibility to turn them on or off with a switch?

Here's a mock of what that would look like:

image

This is based on the Apps & Websites W10 Settings page:

image

@crutkas is Plug-in management on the roadmap for V1? Or a V2 activity?

htcfreek commented 4 years ago

@crutkas is Plug-in management on the roadmap for V1? Or a V2 activity?

I think for the first step (v1) it's okay if only enable/disable works.

The other things need more work in fronted and backend. So I think we won't get it in for v1.

crutkas commented 4 years ago

I think it is something we'd like to do but not on roadmap. I feel like more and more we need it

crutkas commented 4 years ago

namely around the web search stuff

htcfreek commented 4 years ago

How about just a UI scaler? It seems pretty big for me. I'd like to be able to 50% size it to get more search results on-screen

These are design and functionality ideas. They are realized as images with image software. - So the proportions not final and maybe a bit incorrect.

gordonwatts commented 4 years ago

This would (eventually) provide a UI for adjusting the keyboard filter shortcuts - which is one big thing my pr #6129 is missing.

htcfreek commented 4 years ago

This would (eventually) provide a UI for adjusting the keyboard filter shortcuts - which is one big thing my pr #6129 is missing.

Yes. I have missed this setting in my concept images.

enricogior commented 3 years ago

This will not be done in 0.29.

davidegiacometti commented 3 years ago

Is this planned for 0.31? Since is a big work, would be nice to be able to enable/disable the plugins from settings as a first version.

enricogior commented 3 years ago

@davidegiacometti the core team doesn't have bandwidth for this in 0.31 or 0.33. We also need some specification for this work item. Community contributions are welcomed.

htcfreek commented 3 years ago

Is this planned for 0.31? Since is a big work, would be nice to be able to enable/disable the plugins from settings as a first version.

First we need a complete spec. I think this os the first and most important work item. If you are interested in creating one feel free to work on this and create a PR.

davidegiacometti commented 3 years ago

Of course we need better specification for this and priorities. This is from a small working POC I made this afternoon. I have some concerns:

image

niels9001 commented 3 years ago

@davidegiacometti Awesome :)! If we can do without a save button (amd save + update Run at runtime) that would be nice.. but not a bid deal :).

htcfreek commented 3 years ago

Of course we need better specification for this and priorities. This is from a small working POC I made this afternoon. I have some concerns:

  • What do we want to save in PT Settings for the plugins? In the POC I am saving plugin names but there will be also settings
  • Save button for restart Launcher or reload plugins at runtime? The POC require manual restart (disable/re-enable)

image

Great work.

jeremymeyers commented 3 years ago

(as a current Wox user), I feel strongly that there should be a visual delineation between first party (pre-installed and official add-on) and third-party (community) plugins especially as it applies to support.

The Extensions manager in Edge does this well, maybe some design can be pulled from that? (edge://extensions/)

Screenshot 2020-12-31 14 04 49

Also some plugins have individual settings so that would need to be accounted for in the design. I was unable to find another example in the settings app that adds this level, but i would think a gear icon would do it.

htcfreek commented 3 years ago

Of course we need better specification for this and priorities. This is from a small working POC I made this afternoon. I have some concerns:

  • What do we want to save in PT Settings for the plugins? In the POC I am saving plugin names but there will be also settings
  • Save button for restart Launcher or reload plugins at runtime? The POC require manual restart (disable/re-enable)

image

@davidegiacometti Here are some thoughts:

jeremymeyers commented 3 years ago

If plugins requre a restart of the app in order to load, and there isn't anything being kept in memory in a state of unsavedness (which i'm not actually positive about) is there a reason not to just restart the app every time a new plugin is installed (with appropriate messaging)? Is there a use case for installing a new plugin and not wanting it to be activated right away that couldn't be addressed within the settings on/off toggle?

crutkas commented 3 years ago

Spec in progress: https://github.com/microsoft/PowerToys/blob/dev/crutkas/spec/ptRunPlugin/doc/specs/PtRunPlugin.md

niels9001 commented 3 years ago

Spec in progress: https://github.com/microsoft/PowerToys/blob/dev/crutkas/spec/ptRunPlugin/doc/specs/PtRunPlugin.md

Should we provide feedback on the spec in this issue? If so:

crutkas commented 3 years ago

Good catch @niels9001

crutkas commented 3 years ago

I’ll whip up a PR and let’s do comments there

htcfreek commented 3 years ago

Spec in progress: https://github.com/microsoft/PowerToys/blob/dev/crutkas/spec/ptRunPlugin/doc/specs/PtRunPlugin.md

My feedback so far for the spec:

Other thoughts:

htcfreek commented 3 years ago

I’ll whip up a PR and let’s do comments there

Sory I saw this comment to late.

crutkas commented 3 years ago

https://github.com/microsoft/PowerToys/pull/9121 is PR

crutkas commented 3 years ago

@htcfreek all is addressed in spec, FYI

mykhailopylyp commented 3 years ago

@enricogior @crutkas In spec we have two options to configure action keys: 'include results in default list' and 'action key'. From plugin.json we can specify an array of action keys. Do we still need to keep an array of action keys for a plugin? At least at code? Deleting them would simplify code.

enricogior commented 3 years ago

@mykhailopylyp currently each plugin setting is in Program Files and looks like this:

{
    "ID":"CEA0FDFC6D3B4085823D60DC76F28855",
    "ActionKeywords": [ "*", "=" ],
    "Name":"Calculator",
    "Description":"Provide mathematical calculations.(Try 5*3-2 in PowerToys)",
    "Author":"cxfksword",
    "Version":"1.0.0",
    "Language":"csharp",
    "Website":"https://aka.ms/powertoys",
    "ExecuteFileName":"Microsoft.PowerToys.Run.Plugin.Calculator.dll",
    "IcoPath":"Images\\calculator.dark.png"
}

Are we going to leave this config file in Program Files and override the ActionKeywords from the values saved in appdata by the plugin manager? We still need to save two values if the plugin is included in the default results and it also has its own action key, so it would seems consistent to have the same (or similar) representation.

mykhailopylyp commented 3 years ago

@enricogior

Are we going to leave this config file in Program Files and override the ActionKeywords from the values saved in appdata by the plugin manager?

yes

We still need to save two values if the plugin is included in the default results and it also has its own action key, so it would seem consistent to have the same (or similar) representation.

Right now it is confusing because we have both ActionKeywords and ActionKeywoad settings. I want to get rid of one of them. The question is which one. If we do not plan to have more than one action key except global search it will be better to have ActionKeyword and IsGlobal settings as it is consistent with UI at this stage.

enricogior commented 3 years ago

@mykhailopylyp

it will be better to have ActionKeyword and IsGlobal settings as it is consistent with UI at this stage.

It sounds good, better binding with the UI.

mykhailopylyp commented 3 years ago

Notice: assigning the same action key to two plugins actually does not work. The last plugin that is registered with the same action key wins.

enricogior commented 3 years ago

@mykhailopylyp can you investigate how much work is needed to support it?

mykhailopylyp commented 3 years ago

can you investigate how much work is needed to support it?

So far it seems easy to achieve.

enricogior commented 3 years ago

@mykhailopylyp OK, let's do it since there are scenarios where it makes sense to support it.

mykhailopylyp commented 3 years ago

Notice: Do not have warning appear if Disable file drive warning is enabled and the Search plugin is disabled is achieved as the warning is added inside of the plugin' query method and it is not called when the plugin is disabled.

htcfreek commented 3 years ago

@crutkas, @enricogior If plugin manager is basically implemented we should not directly close this issue and (#9655). These issues include ideas for future enhancements like import third-party plugins, search in plugin list and define settings for third-party plugins (https://github.com/microsoft/PowerToys/issues/9655#issuecomment-780533534).

Before we close the issues it makes imo sense to open a new "thrid-party plugin" issue that track the ideas.

enricogior commented 3 years ago

@htcfreek we should open individual issues for future enhancement, and close this one and #9655.

htcfreek commented 3 years ago

@htcfreek we should open individual issues for future enhancement, and close this one and #9655.

I agree. Let's do this when 0.33 is released.

htcfreek commented 3 years ago

@enricogior All the new issues for each of the remaining remaining enhancement ideas in this issue are created. (I didn't create any issue for ideas which regarding 3rd-Party-Plugin features.)

enricogior commented 3 years ago

@htcfreek great work! Thanks.

crutkas commented 3 years ago

Great news! This was resolved in the newly released 0.33 version of PowerToys! Head to https://aka.ms/installpowertoys to grab latest.

garrulinae commented 3 years ago

Awesome, great work! Where is the weighting/ordering feature now being tracked? This issue and #3271 and #3371 are all closed.

crutkas commented 3 years ago

We were waiting on feedback for weight to see if this was enough. It adds a lot of complexity for debugging with community

enricogior commented 3 years ago

@crutkas @garrulinae the weighting algorithm was not working because of a bug, the initial request to allow manual weighting was assuming that the algorithm was working but not good enough.

For ordering, I think we should open a new issue since now that the plugin manager has been implemented, we can propose a specific UI for this feature.