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

Add setting for opening freetube:// links in new window #6242

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

OothecaPickle
Copy link
Contributor

@OothecaPickle OothecaPickle commented Nov 29, 2024

Add setting for opening freetube:// links in new window

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #1501
also relates to #6237

Description

Adds a toggle under General Settings to open freetube:// links in a new window rather than replacing the contents of an existing window.

Screenshots

openlinksinnewwindow

Testing

Test that freetube:// links opened from other applications are opened in a new window when the added setting is toggled on.

Desktop

  • OS: macOS
  • OS Version: 11
  • FreeTube version: e646a0f
    &
  • OS: Windows
  • OS Version: Windows 10 21H2
  • FreeTube version: e646a0f

Additional context

I used some code from @pakoito's #5592.

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 29, 2024
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 29, 2024 10:38
@PikachuEXE
Copy link
Collaborator

Are you talking about https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#overview ?
Maybe the preference name should be updated first

Also I am not sure how/if the doc mentions deep links and if users understand what is freetube:// links

@OothecaPickle
Copy link
Contributor Author

OothecaPickle commented Nov 29, 2024

@PikachuEXE

Are you talking about https://www.electronjs.org/docs/latest/tutorial/launch-app-from-url-in-another-app#overview ?

Yes.

Maybe the preference name should be updated first
Also I am not sure how/if the doc mentions deep links and if users understand what is freetube:// links

I agree, but I wasn't sure what else to name it. Do you have any suggestions?

src/renderer/App.js Outdated Show resolved Hide resolved
@PikachuEXE
Copy link
Collaborator

I found one place mentioning extensions but not sure how to call it
https://docs.freetubeapp.io/usage/browser-extension/

It shouldn't be called "YouTube links" on the preference coz there are many "YT" links in video description/comment etc.

Inviting more members to comment on this

@pakoito
Copy link

pakoito commented Nov 30, 2024

In Android land these are called "Intents" rather than "Links". But tbh I'd be sad if this feature is blocked on a label :D

@OothecaPickle OothecaPickle marked this pull request as draft December 1, 2024 09:54
auto-merge was automatically disabled December 1, 2024 09:54

Pull request was converted to draft

@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 1, 2024
@OothecaPickle OothecaPickle marked this pull request as ready for review December 1, 2024 11:33
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) December 1, 2024 11:33
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Dec 1, 2024
@@ -260,7 +260,7 @@ function runApp() {

const url = getLinkUrl(commandLine)
if (url) {
mainWindow.webContents.send(IpcChannels.OPEN_URL, url)
mainWindow.webContents.send(IpcChannels.OPEN_URL, { url: url, isLaunchLink: false })
Copy link
Member

Choose a reason for hiding this comment

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

Please use two separate parameters instead of using a single parameter with an object, that lets you avoid the destructuring on the other end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to always open a redirected video in a new FreeTube window / instance
4 participants