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

Open matrix.to link in existing browser tab I already have open with Element #16899

Open
MadLittleMods opened this issue Apr 9, 2021 · 3 comments
Labels
A-Matrix.to O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement Z-AccountResurrection Delight - cycle

Comments

@MadLittleMods
Copy link
Contributor

Issue originally opened at matrix-org/matrix.to#198

Is your feature request related to a problem? Please describe.

When I go through the matrix.to link flow for a permalink, it asks me whether I want to continue via browser or desktop app. I use Element in my browser and already have a tab open. When I press Continue in browser, it opens yet another tab of Element to show the message.

Describe the solution you'd like

Open the permalink in my existing tab of Element instead of a new one which takes forever to load.

When Matrix.to sends you off to app.element.io, we could use some of the cross-tab communication in browsers and have a script run at the very beginning of page-load which would communicate the permalink location to the other tab instance and close itself.

Describe alternatives you've considered

Copy paste the permalink and use the /goto https://matrix.to/#/!xxx:matrix.org/$oIfQnLVKFwRE_Rme0Z5AvqzaYvHTuTtxqBYnnbR1yN8 slash command in your Element instance.

Or just use the desktop app which will always point to one instance.

Dev notes

There are multiple ways we can communicate but I was thinking of using broadcast channels. Here is a nice concise video where I was introduced to it: https://www.youtube.com/watch?v=kBut8LqVgYE. To be clear, I was thinking of doing the communication on the app.element.io side. Matrix.to -> New app.element.io page that posts to the broadcast channel (BC) right when it starts up(before the main app loads at all) of where we need to go and closes -> my existing Element tab picks up that information from the BC goes to the place.

Other ways from a quick Google: https://blog.bitsrc.io/4-ways-to-communicate-across-browser-tabs-in-realtime-e4f5f6cbedca

@MadLittleMods
Copy link
Contributor Author

Related to MSC1716

@MadLittleMods MadLittleMods added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely labels Apr 27, 2022
@t3chguy
Copy link
Member

t3chguy commented Nov 10, 2022

The proposed approach is likely going to be made redundant via the matrix:// scheme handler https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler

@bkil
Copy link

bkil commented May 30, 2023

Related #16393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Matrix.to O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement Z-AccountResurrection Delight - cycle
Projects
None yet
Development

No branches or pull requests

6 participants