Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Lee-WonJun
Copy link
Contributor

@Lee-WonJun Lee-WonJun commented May 13, 2021

Implement quick browser open in PT-run

What is this about:
Added quick default browser launch function in Uri plugin

What is include in the PR:
source code

How does someone test / validate:
Type only direct activation phrase (by default "//") in PT run and check if the item that open default browser is displayed.

Quick browser
image

Original plugin
image

review plz!

Quality Checklist

Contributor License Agreement (CLA)

A CLA must be signed. If not, go over here and sign the CLA.

@Lee-WonJun Lee-WonJun changed the title Implement quick browser open in PT-run [PT Run] Implement quick browser open in PT-run May 13, 2021
@htcfreek
Copy link
Collaborator

htcfreek commented May 13, 2021

@Lee-WonJun
I know the following suggestion a bit out of PR's scoope:

  • Should we update the subtitle to Open in default browser?
  • And I think we don't need the subtitle on the result for // or we can maybe optimize it. (Otherwise we have same result name and subtitle.)

@htcfreek htcfreek added Run-Plugin Manager Issues with the PowerToys Run plugin manager Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Run-Plugin Manager Issues with the PowerToys Run plugin manager labels May 13, 2021
@Lee-WonJun
Copy link
Contributor Author

@Lee-WonJun
I know the following suggestion a bit out of PR's scoope:

* Should we update the subtitle to `Open in default browser`?

* And I think we don't need the subtitle on the result for `//` or we can maybe optimize it. (Otherwise we have same result name and subtitle.)

I agree with your opinion.
Which title and subtitle would you like?
I also thought about removing the subtitle. However, I didn't find any elements without subtitle in other plugins.
It seems to be unity that this is had subtitle

@htcfreek
Copy link
Collaborator

htcfreek commented May 13, 2021

@Lee-WonJun
I know the following suggestion a bit out of PR's scoope:

* Should we update the subtitle to `Open in default browser`?

* And I think we don't need the subtitle on the result for `//` or we can maybe optimize it. (Otherwise we have same result name and subtitle.)

I agree with your opinion.
Which title and subtitle would you like?
I also thought about removing the subtitle. However, I didn't find any elements without subtitle in other plugins.
It seems to be unity that this is had subtitle

I suggest:

  • uri result: Open in default browser

  • // result: name=<browser name> and subtitle=Open default browser

@Lee-WonJun
Copy link
Contributor Author

Lee-WonJun commented May 14, 2021

@Lee-WonJun
I know the following suggestion a bit out of PR's scoope:

* Should we update the subtitle to `Open in default browser`?

* And I think we don't need the subtitle on the result for `//` or we can maybe optimize it. (Otherwise we have same result name and subtitle.)

I agree with your opinion.
Which title and subtitle would you like?
I also thought about removing the subtitle. However, I didn't find any elements without subtitle in other plugins.
It seems to be unity that this is had subtitle

I suggest:

  • uri result: Open in default browser
  • // result: name=<browser name> and subtitle=Open default browser

good,
But there is one problem.
When I get the path of the default browser
Then I am able to get the name of the exe also.
But it also depends on the exe file name. (Example: "Firefox" is displayed "firefox", "Microsoft Edge" is displayed "msedge")
In my opinion, it is good that the title is just displayed as the "Default Browser".
However, the problem is that the difference between subtitles and titles disappears.

Have a good opinion?

Another idea of ​​mine is that it prints "Open Default Browser" in the title and the browser path in the subtitle.

@htcfreek
Copy link
Collaborator

htcfreek commented May 14, 2021

@Lee-WonJun
I know the following suggestion a bit out of PR's scoope:

* Should we update the subtitle to `Open in default browser`?

* And I think we don't need the subtitle on the result for `//` or we can maybe optimize it. (Otherwise we have same result name and subtitle.)

I agree with your opinion.
Which title and subtitle would you like?
I also thought about removing the subtitle. However, I didn't find any elements without subtitle in other plugins.
It seems to be unity that this is had subtitle

I suggest:

  • uri result: Open in default browser
  • // result: name=<browser name> and subtitle=Open default browser

good,
But there is one problem.
When I get the path of the default browser
Then I am able to get the name of the exe also.
But it also depends on the exe file name. (Example: "Firefox" is displayed "firefox", "Microsoft Edge" is displayed "msedge")
In my opinion, it is good that the title is just displayed as the "Default Browser".
However, the problem is that the difference between subtitles and titles disappears.

Have a good opinion?

Another idea of ​​mine is that it prints "Open Default Browser" in the title and the browser path in the subtitle.

Let's go with your second idea: path in subtitle or we add an blank line as subtitle/remove it.

@Lee-WonJun
Copy link
Contributor Author

@mykhailopylyp @htcfreek
I changed the source code. Check plz

123123

However, here are the following additional issues.

  1. Since Regedit is used, the default browser does not change until re-login.
  2. No support for UWP browser apps

@mykhailopylyp
Copy link
Contributor

@Lee-WonJun

  1. Since Regedit is used, the default browser does not change until re-login.
  2. No support for UWP browser apps

These issues apply to the plugin not just to this issue. So we don't have to fix it in this PR. Feel free to open a new issue for it.

Copy link
Contributor

@mykhailopylyp mykhailopylyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested, works as expected. Thank you for your contribution!

@htcfreek
Copy link
Collaborator

@Lee-WonJun
Great.

The path for default browser looks strange. Does your local uses an other character instead of \?

@htcfreek
Copy link
Collaborator

@Lee-WonJun
Can you plz replace the gif in PR rescription with two screenshots. Thank you.

@Lee-WonJun
Copy link
Contributor Author

Lee-WonJun commented May 14, 2021

@Lee-WonJun
Great.

The path for default browser looks strange. Does your local uses an other character instead of \?

yes, in my country (Korea), Currency symbol ( KRW/ U+20A9) is same the ''
image

@Lee-WonJun
Can you plz replace the gif in PR rescription with two screenshots. Thank you.

Yes, I modified the description. Did I understand it correctly?

@htcfreek
Copy link
Collaborator

@Lee-WonJun

Can you plz replace the gif in PR rescription with two screenshots. Thank you.

Yes, I modified the description. Did I understand it correctly?

yes

Copy link
Collaborator

@htcfreek htcfreek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last small nit. Thanks for your contribution.

Copy link
Collaborator

@davidegiacometti davidegiacometti left a 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.

@crutkas crutkas merged commit de9b777 into microsoft:master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Idea-Enhancement New feature or request on an existing product Product-PowerToys Run Improved app launch PT Run (Win+R) Window Run-Plugin Things that relate with PowerToys Run's plugin interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants