Skip to content
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

Opening browser causes a change in the window title #36

Closed
thany opened this issue Jan 4, 2022 · 4 comments
Closed

Opening browser causes a change in the window title #36

thany opened this issue Jan 4, 2022 · 4 comments

Comments

@thany
Copy link

thany commented Jan 4, 2022

When opening a browser tab, the title of the window where the process runs, changes to Windows PowerShell.

This is undesirable, because:

  1. It's too generic to recognize on the task bar among other command prompt windows.
  2. The application had changed it priorly to something meaningful, in my case.

This problem was first reported in #16192 @ Storybook.

TLDR: there is no way to change it back to what I meant for it to be, and there shouldn't need to be a way if better-opn left the window title alone.

@michaellzc
Copy link
Owner

Please see my response at #37 (comment)

@thany
Copy link
Author

thany commented Jan 23, 2022

This issue is not specific to Storybook, better-opn - if I read the source code correctly - literally opens powershell.exe to open a browser tab. Just don't? 🤷🏻‍♂️ You don't need powershell just to open a browser tab.

If I type on the command prompt:

start https://duckduckgo.com

It will open a tab in my favourite/default browser to go there. Job done. This doesn't need X-many different approaches on Windows.

This will solve similar problems in other packages as well. Not just Storybook.

(In hindsight, I shouldn't have mentioned Storybook maybe. I imagine you took it as reporting a problem here, that existed there, but this problem is NOT specific to Storybook, just to get that clear as day)

@michaellzc
Copy link
Owner

michaellzc commented Jan 23, 2022

better-opn is created to do one thing and one thing only (that solved my pain point when working on some side projects with GatsbyJS gatsbyjs/gatsby#6550), reuse browser tab on macOS otherwise fallback to the upstream open package. I do not intent or have the bandwidth to maintain a fork of open and implement new features.

Therefore, what you're proposing is out of the scope this project. Would you kindly move the discussion into the upstream open project instead?

@thany
Copy link
Author

thany commented Jan 23, 2022

So you're saying on Windows and Linux, better-opn simply doesn't need to exist? That does confirm my finding that I've never seen it reusing any browser tab.

This might be important to know for users of this package.

But even so, I do like to know: why bother with powershell? If this is a macOS-minded package, why do you bother with a Windows feature that isn't even needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants