-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pt run history plugin 19349 #19569
Pt run history plugin 19349 #19569
Conversation
@jefflord |
Is there a formal way to do this? Or just "hey @htcfreek please review this!" |
There is a menu on the github website on the right side of the pr description. |
Right, this is the mystery. I can just "at" someone that I know is working the PT Run area to see if they can help? @jaimecbernardo, can you help out? |
Sorry. Adding some reviewers in here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jefflord
Something is wrong. The output dir (...\plugins\history) for "Debug x64" is empty on my machine. I can't build the plugin. Building the plugin directly compiles the Powertys.Run binaries into the plugin folder.
This is the first plugin I have created and so maybe someone else could help trouble shoot a build issue. Though, I can say if the output dir is empty it must not be building, right? Try to get more information by changing the build settings in VS: Can you try doing a full clean and full rebuild on the entire solution? I will review the "new-plugin-checklist.md" and up you when there is new code to test, I might have missed something. To the other reviewers: @stefansjfw and @jaimecbernardo, |
Not sure. Based on log the project is build and the dll is generated. Maybe something with the build output path?!
Good idea. Will try later or tomorrow. Maybe it's because I select Launcher for debugging. (But in general this should work too.)
For me this feels like a core feature. So Microsoft should be okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all I was able to build it in a full and clean debug build of the whole solution. And the functionality of the plugin is great. This will be a big improvement.
There are a few things we should fix/improve:
- See the code review.
- The history entries for
shell
plugin needs a restart of PT Run to be available. - We need a more clear delete button image. The current one conflicts with WW plugin. The new image should contain the history symbol and a delete symbol. (Btw. WW plugin uses delete icon for kill process and remove icon for close window.)
- The tool tip of the delete button shouldn't contain the title as this can be to long. Please keep it short and simple.
Regarding the build process:
I saw that you referenced the PowerLauncher
project as include in your plugin project. Maybe this is the cause of all the problems:
- Plugin won't build/is ignored, if I build PowerLauncher project for direct debugging.
- On full solution build we have a second PowerLauncher.exe and other project files in the plugin folder were it shouldn't be.
@stefansjfw or @jaimecbernardo can you help here?
Additional idea:
A nice thing could be if we show the history on opening PT Run if ShowLastQuery
option is off and/or the search input is empty. This can be an optional setting.
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Main.cs
Outdated
Show resolved
Hide resolved
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx
Outdated
Show resolved
Hide resolved
@htcfreek wow, fantastic review. I will be digging in soon! Thank you! |
@jefflord |
This is a bummer, I cannot build anymore. I did update VS to 17.3. As an example issue, getting just an updated branch main, I cannot build "ApplicationUpdate".
Any clue on this? UPDATE: Reverted back to VS 17.2.7 and the build is OK again. hmmmmmm |
@htcfreek thanks again for the awesome review. I made all the code changes suggested. With regard to the other comments:
Fixed and should work better for other plugins.
I think we can only pick from these? https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font
True, done
Yes, because I need access to
What I will/did change this reference to NOT copy local, so we don't get a copy of the PowerLauncher assembly in the History output folder. |
I think these take care of all the rest, some you have seen. doc/devdocs/modules/launcher/plugins/history.md .pipelines/ESRPSigning_core.json docs/hub/powertoys/run.md This new-plugin process is "a bit" involved, but I guess it does not happen a lot and so that's OK. Please let me know what I missed (I know you will). |
@jefflord |
@htcfreek Soooo much thanks, wish me luck! |
@jaimecbernardo and @stefansjfw, please review at your convenience. Thanks |
You don't need luck because you did a very great job. 😉 |
@stefansjfw, the extra PRs are closed. I think everything we need is in this single PR now. Thanks. |
src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.History/Properties/Resources.resx
Outdated
Show resolved
Hide resolved
...Plugins/Microsoft.PowerToys.Run.Plugin.History/Microsoft.PowerToys.Run.Plugin.History.csproj
Outdated
Show resolved
Hide resolved
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\PowerLauncher\PowerLauncher.csproj"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw there is a discussion about this already. just want to note this to see if there is a way to go around it
</AdditionalFiles> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="StyleCop.Analyzers"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now included by default in all csprojects. You should rebase to the latest main.
<ItemGroup> | ||
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" /> | ||
<PackageReference Include="Mages" Version="2.0.1" /> | ||
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now included by default in all csprojects
I did a brief first review. Let's rebase on top of master and remove packages that are now included by default |
src/modules/launcher/PowerLauncher/ViewModel/ResultViewModel.cs
Outdated
Show resolved
Hide resolved
Overall, I like this plugin. It works pretty well. Nice work! I'm puzzled about this dependency, but I understand that there is no simpler way to do this. Talking about future work now... Maybe extracting Plugin manager would be the way to go. Not sure atm. |
@stefansjfw thanks, I think it's a neat plugin that poses a weird dependency question, but I think it's worth the effort.
Well, I don't know for sure what that means. I assume the goal is to get a version of the PR based on a newer version of main. Bit of git newb here. Help? I can update my main (sync my fork), then rebase this branch onto my main, and address conflicts. But then I have only updated my main. If this is what you mean, how to I go on from there with the updated main branch in my repo? I can also merge an updated main into my branch at jefflord:PTRun-History-Plugin-19349. Thanks in advance |
Then, just to make sure you have the latest code do: And then |
@stefansjfw OK, I was confused by the "rebase " suggestion here (#19569 (comment)). I just need to "merge an updated main into my branch at jefflord:PTRun-History-Plugin-19349." I usually do this by updating my/main with with msft/main via github "sync fork", but I like this option of directly adding msft as a remote to my local repo. Also, I am SOOO glad you asked for this to be done because there was a merge conflict and it was in a place of code I wrote for another PR (#19215) that was recently (7 days ago) already merged into main! |
@jaimecbernardo FYI: I didn't mean to remove any reviewer(s) from this. This happened inadvertently. |
@jaimecbernardo |
FYI, I'm fine with the code in general. The only thing to be discussed further here is the already mentioned dependency. I guess it can go in for now as it is and later we can figure out whether there is a better way to do this. |
Sweet, I agree, ship now and make changes as needed. There might be bug/enhancements that cause us to refactor sooner than later but we won't know until we ship it. |
Sorry for the delay and thanks for the ping. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you for the contribution! Regarding the dependency cycle, a new issue can be created after this PR is merged to refactor what's needed to a lib dependency.
Fantastic thanks a bunch to @jaimecbernardo and a special thanks to @htcfreek! |
@stefansjfw, @jaimecbernardo, @htcfreek Shower thoughts: Re: The "issue" where this plugin takes a dependency on PowerLauncher. I think all four of us were a little put off by this at first. But it just dawned on me. In a "true" plugin model, it's absolutely normal for the plugin to take a dependency on the plugin-host. And it's actually more rare for the plugin-host to take a dependency on the plugins. But maybe for PT Run, plugins are just the name for what's really "modules", since external plugins are not supported anyway, right? TLDR: |
Summary of the Pull Request
Create a system to access and use history in PT Run (for now just the history of selected items)
PR Checklist
Detailed Description of the Pull Request / Additional comments
Testing to see how well this can work as a plugin.
Validation Steps Performed