Open
Conversation
80a5417 to
eadcb2c
Compare
Fixes: zulip#1219 Two new IPC messages are introduced to implement this feature: 1. `"update-org-urls": (urls: string[]) => void` in `MainMessage` stores the list of urls for connected organizations. 2. `"navigate-to-org-url": (url: string) => void` in `RenderMessage` that opens the corresponding tab if the url points to a connected organization. If not, this is a no-op. Uses the list of urls from above to determine whether a url belongs to a connected organization.
eadcb2c to
f3ace06
Compare
Collaborator
|
Thanks! @shubham-padia Could you please review? |
Author
|
Gentle ping...? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #1219
Two new IPC messages are introduced to implement this feature:
"update-org-urls": (urls: string[]) => voidinMainMessagestores the list of urls for connected organizations."navigate-to-org-url": (url: string) => voidinRenderMessagethat opens the corresponding tab if the url points to a connected organization. If not, this is a no-op. Uses the list of urls from above to determine whether a url belongs to a connected organization.These should also help implement #1403.
I'm open to better ways of storing the urls in
update-org-urls. The current logic of storing the list of urls in a global variable works but I don't program enough in JavaScript to know if this is idiomatic.Surprising to me the current implementation works in an (imagined) corner case where the link points to an organization that was added after Zulip desktop was started. It seems like
reloadView()(which callsupdateOrgUrlsthroughinitTabs) is called every time a new organization is added? I couldn't find this in the code.Screenshots and screen captures:
Apologies for the half blank screen and missing cursor, still trying to figure out the situation on Wayland 😅
demo.mp4
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: