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

Enhancement: zulip:// URI Scheme for electron #470

Open
stone212 opened this issue Apr 3, 2018 · 20 comments · May be fixed by #1407
Open

Enhancement: zulip:// URI Scheme for electron #470

stone212 opened this issue Apr 3, 2018 · 20 comments · May be fixed by #1407

Comments

@stone212
Copy link

stone212 commented Apr 3, 2018

When I receive a missed message email from my Zulip, I see a link to read the thread. When I click on it, it opens my browser.

But I view zulip with electron.

Can electron register a new URI scheme (zulip://) on the system it is installed on?

To be really useful you would couple this with a change in the back-end email messages so that there is an option to:

Click here to log in to Zulip and view your new messages.

OR

Click here to open your new messages in your dedicated Zulip client.

@akashnimare
Copy link
Member

Interesting request. Quite possible since Slack have this deep linking feature.

@abhigyank
Copy link
Collaborator

This would an interesting feature to add. I think we can use app.setAsDefaultProtocolClient()) to set zulip://. However it has different implementation ways for different OSes that needs to be looked at.
Documentation

@akashnimare
Copy link
Member

akashnimare commented Apr 3, 2018

Few things we need to add to make it work -

  • Need to add open message in the desktop app button in the missed message email
  • Pass the protocol (just need to add the protocol this in the package.json)
  • Validate the passed parameter which is basically the server address.

@kanishk98
Copy link
Collaborator

@zulipbot claim

@kanishk98
Copy link
Collaborator

This seems to be fairly simple for a macOS implementation. Since the app.on('open-url') event getting fired sends the entire URL to the app, things get easy for a proper implementation there.
I can't find any info in the docs about Windows or Linux about the same level of functionality though, apart from maybe using the makeSingleInstance method, which is now deprecated. Not sure how to proceed here?

@akashnimare can we get some ideas from Slack's implementation of the same functionality here?

@zulipbot
Copy link
Member

zulipbot commented Feb 17, 2019

Hello @kanishk98, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@kanishk98
Copy link
Collaborator

Working.
To keep the maintainers posted, I've been looking into Mattermost's implementation of their mattermost:// scheme, but I've run into a couple of build issues when packaging the app for distribution on my Windows system. Will ask a question on the czo boards if it persists.

@stone212
Copy link
Author

@kanishk98 What about just creating the URI handler/prefix and allowing (requiring) users to add it manually? Some OS might prompt the user to add it automatically, others would require manual. It would be ideal if the electron app could detect and register but it's not absolutely necessary.

@stone212
Copy link
Author

@kanishk98
Copy link
Collaborator

@stone212 thanks a ton for your help.

What about just creating the URI handler/prefix and allowing (requiring) users to add it manually?

I'm lost on what you're saying here. Could you give me an example?

Also you are aware of this information? https://support.shotgunsoftware.com/hc/en-us/articles/219031308-Launching-applications-using-custom-browser-protocols

I am, thanks! I checked Electron's repo and they seem to be using the stuff in the referenced link for their implementation of the setAsDefaultProtocolClient() method. I don't think this should require significant effort from our side, and we can always change to using electron-builder's functionality and defining our protocols in package.json itself if this doesn't work.

I think an Electron-only solution would be the best, of course, provided it works on all 3 platforms. :)

@stone212
Copy link
Author

@kanishk98

No I can't give an example but what I am saying is that one solution could be that the server sends links to zulip content two ways. One is a link to the web page and the other starts with zulip://. Then the Electron app knows how to find the data based on the URI that follows.

And the user must manually add the zulip:// handler to the OS.

The alternative option is to make the Windows app add the handler for Windows, the MacOS app add the handler for MacOS, and the Linux app to check which display manager the user has and add the handler for that display manager (in all cases only after asking the user). That is a good final goal but it would be okay to do the first option first. Anyway you have to do those things even if you choose the second option so it is not a bad idea to start with that maybe?

@akashnimare
Copy link
Member

@kanishk98 let me know if you need any help here.

@kanishk98
Copy link
Collaborator

let me know if you need any help here.

Thanks. I just resumed work on this bug, had been busy with some other issues. Looking to solve #578 along with this.

@KazimirPodolski
Copy link

This is an incredibly annoying problem and one of the reasons why zulip is still inferior to slack/mattermost in terms of user's everyday productivity.

Also issues like this (and many others) make it very hard to advocate for migration to zulip: it's been 5 years, 3 of them with "high priority", probably never will be done, no clear status. You just can't tell your manager "let's migrate to zulip" when it's repo cries "this software is poorly managed and chaotically developed". I don't mean to disrespect, but this is how it looks from outside.

@grutherford
Copy link

I just wanted to add that the lack of this feature is a daily annoyance for our users, we have a link from our internal system to Zulip in a structured format and instead of it opening on the electron app. I can't give them a good reason as to why it can't open in the app as it's a pretty basic feature of other platforms.

@KazimirPodolski
Copy link

I can't give them a good reason...

That's exactly the problem. I just cannot give the team moral high ground and lack of intangible risks as a reason to fight work chat daily. Even fucking Slack had less friction in my experience everywhere I had it than Zulip introduced to an open-minded team. I hope I don't need to explain how exactly friction kills productivity and motivation...

@avijitdas126
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Feb 5, 2025

Welcome to Zulip, @avijitdas126! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-desktop/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

avijitdas126 added a commit to avijitdas126/zulip-desktop that referenced this issue Feb 8, 2025
Added deep linking support with zulip://, registered the protocol handler, and implemented a dialog to choose between opening the link in the app or browser.
@avijitdas126 avijitdas126 linked a pull request Feb 8, 2025 that will close this issue
15 tasks
avijitdas126 added a commit to avijitdas126/zulip-desktop that referenced this issue Feb 8, 2025
Added deep linking support with zulip://, registered the protocol handler, and implemented a dialog to choose between opening the link in the app or browser.
@avijitdas126
Copy link
Collaborator

@akashnimare could you please review this PR?

@avijitdas126
Copy link
Collaborator

@zulipbot abandon

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

Successfully merging a pull request may close this issue.

8 participants