-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
Feat: zulip:// URI Scheme for electron #470 #1407
Feat: zulip:// URI Scheme for electron #470 #1407
Conversation
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.
Hello @avijitdas126, it seems like you have referenced #470 in your pull request description, but you have not referenced them in your commit message description(s). Referencing an issue in a commit message automatically closes the corresponding issue when the commit is merged, which makes the issue tracker easier to manage. Please run An example of a correctly-formatted commit:
To learn how to write a great commit message, please refer to our guide. |
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.
This reverts commit 44b3d6f.
3324969
to
3d6ea80
Compare
@akashnimare could you please review this PR? |
To register a custom protocol for your Electron application across all platforms (Windows, macOS, and Linux), you can define it in the build section of your package.json file using the protocols property provided by electron-builder.
55222f2
to
5b5c380
Compare
To register a custom protocol for your Electron application across all platforms (Windows, macOS, and Linux), you can define it in the build section of your package.json file using the protocols property provided by electron-builder.
if (response.response === 0) { | ||
mainWindow.webContents.send("open-url", url); | ||
} else { | ||
await shell.openExternal(url); // Open in browser | ||
} |
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.
What are you expecting this to accomplish, in either case? Neither an Electron webContents
nor an external web browser knows anything about zulip: URLs.
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.
What are you expecting this to accomplish, in either case? Neither an Electron
When a URL is received, the application presents a dialog to the user. If the user confirms (response.response === 0), the app sends an open-url event to the main window's webContents, allowing the app to handle the URL internally. If the user declines, the URL is opened in the default web browser using shell.openExternal(url).
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.
Please don’t waste the time of open source maintainers with AI generated slop. If you don’t understand what’s going on well enough to see that this completely failed to address my question, then this is not the project for you.
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.
No sir, I cannot solve this issue using AI.I solved this issue using electron deeplinking documentation. When user hit zulip://
endpoint when open a dialog box if user want to open on the desktop click on open with desktop verify response.response===0
go to desktop using mainWindow.webContents.send("open-url", url);
otherwise open with browser await shell.openExternal(url);
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.
Fixes: #470
Platforms this PR was tested on:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: