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

Support matrix URI scheme #16875

Open
turt2live opened this issue Apr 6, 2021 · 16 comments
Open

Support matrix URI scheme #16875

turt2live opened this issue Apr 6, 2021 · 16 comments
Labels
A-Share A-Timeline Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ Help Wanted Extra attention is needed O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement Z-AccountResurrection Delight - cycle Z-Papercuts Visible. Impactful. Predictable to action. Z-Spec-Compliance An area where Element doesn't correctly implement the spec

Comments

@turt2live
Copy link
Member

turt2live commented Apr 6, 2021

matrix-org/matrix-spec-proposals#2312

The MSC has been accepted and will be in an upcoming version of the spec.

@KitsuneRal
Copy link

KitsuneRal commented Apr 6, 2021

I guess adoption of Matrix URIs will look like follows:

  1. Element (and other) clients catch up with recognising Matrix URIs and converting them to matrix.to links. Conversion from matrix.to to matrix: is also implemented but is off by default.
  2. Once sufficient portion of the client ecosystem does step 1, the switch in clients flips to translation of matrix.to URLs to Matrix URIs on the wire, while still recoding them back to matrix.to links for displaying (so that integration with web browsers is not broken, e.g.).
  3. Independently from above, matrix: becomes recognised as a safe URI scheme by web browsers at some point, so that web clients could register themselves as handlers for matrix: links.
  4. Widespread adoption; clients start using Matrix URIs for hyperlinks in the UI and stop recoding between matrix.to and Matrix URIs in general cases. The ability to generate matrix.to links when requested by the user is retained for back-compatibility. At this point I expect matrix.to and matrix: links to co-exist on (almost) equal foot, with the default URL form gradually turning to matrix:.

  5. If/when web browsers become able to natively deal with matrix: URIs, they will automatically direct either to the client of choice (if already registered - as implemented in step 3), or show some basic data on the Matrix resource pointed to by the URI along with links to full-blown clients, web or not (effectively incorporating a matrix.to service page). That would mean implementing a very small extension for browsers with the sole purpose of retrieving a Matrix resource by the URI or just rewriting the Matrix URI as a matrix.to URL.

@jryans jryans added A-Share A-Timeline T-Enhancement X-Needs-Product More input needed from the Product team labels Apr 8, 2021
@turt2live
Copy link
Member Author

From TWIM, some useful links:
https://bugzilla.mozilla.org/show_bug.cgi?id=1688030
https://bugs.chromium.org/p/chromium/issues/detail?id=1169258

@bwindels
Copy link
Contributor

bwindels commented Apr 24, 2021

Also see matrix-org/matrix.to#191, including my thoughts on being able to switch to matrix: for generating share links.

@Mikaela

This comment has been minimized.

@aaronraimist
Copy link
Collaborator

@Mikaela this issue is only for Element Web and Desktop.

element-hq/element-ios#4297
element-hq/element-android#3268

@Mikaela
Copy link
Contributor

Mikaela commented Dec 3, 2021

Are this (and #18655) planned in near future? I have been using both more or less in production since August and I understand them to be part of the spec (at least #18655 is) and I kind of have to tell people to not use the Matrix flagship client, Element, as it's missing these features of Matrix with the unsupported links being significant and more often encountered problem (due to matrix-org/matrix-spec-proposals#3386).

If Matrix URI support is not going to happen in Element, will they at least be converted to matrix.to URLs internally alongside matrix-org/matrix.to#191 ?

@KitsuneRal
Copy link

I hate to say that but with the spec PR merged and quite a few (also Web-based) clients supporting the URI scheme Element (across platforms) becomes a laggard holding the scheme from wider adoption. I'm not even talking about full-blown support as yet but at the very least the top bullet from the list I laid out in the first comment is not contentious at all, is it?

@kittykat kittykat added Z-Papercuts Visible. Impactful. Predictable to action. O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist Help Wanted Extra attention is needed and removed X-Needs-Product More input needed from the Product team labels Dec 31, 2021
@jryans jryans added the Z-Spec-Compliance An area where Element doesn't correctly implement the spec label Jan 13, 2022
@Mikaela
Copy link
Contributor

Mikaela commented Jan 31, 2022

Should this issue be closed or is there something remaining undone?

Parse matrix-schemed URIs (#7453).

@turt2live
Copy link
Member Author

the checkboxes on #16875 (comment) are what we're keeping this open for

@turt2live
Copy link
Member Author

It's already been approved for work on the clients, so shouldn't need a cross-client tracking issue I don't think.

@tgr
Copy link

tgr commented Jan 6, 2023

Element desktop should register itself as the matrix: protocol handler in an OS-appropriate way (e.g. via XDG), and then probably have some means to find an already-running instance and notify it to open the room. Should that be a separate issue?

@bkil
Copy link

bkil commented May 30, 2023

Possible duplicate #16124
Related #23960 #23395

@MTRNord
Copy link
Contributor

MTRNord commented Oct 5, 2023

Hi these days nheko and neochat register matrix: in the browser but element-web doesn't. Any chance adding a registerProtocolHandler setup could be triaged? :)

image

@HarHarLinks
Copy link
Contributor

HarHarLinks commented Oct 5, 2023

does not appear to be supported on Desktop Safari yet https://caniuse.com/mdn-api_navigator_registerprotocolhandler, which I think is a blocker for adoption replacing matrix.to?
Also mobile Chrome/ium isn't supported, I don't know if it can be done on mobile in another way, registering apps to open custom URI protocols rather than just http/s URLs

@MTRNord
Copy link
Contributor

MTRNord commented Oct 5, 2023

The mobile apps can and should use the native handlers which both android and ios provide afaik.

@Johennes Johennes added the Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ label Oct 24, 2023
@KitsuneRal
Copy link

I feel like we try to run ahead of the curve here, and some things can be done even before matrix: scheme registration (step 5 in the first comment to this issue). Namely, we can start pushing matrix scheme as the standard for Matrix URIs on the wire (step 2). Element and other web-based clients can still convert those to matrix.to URLs for the pills if they choose; while desktop clients can resolve matrix URIs internally and only generate matrix.to links on demand when the user asks (step 4 from the list).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Share A-Timeline Hacktoberfest Issues which are suitable for Hacktoberfest PRs: https://hacktoberfest.digitalocean.com/ Help Wanted Extra attention is needed O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Minor Impairs non-critical functionality or suitable workarounds exist T-Enhancement Z-AccountResurrection Delight - cycle Z-Papercuts Visible. Impactful. Predictable to action. Z-Spec-Compliance An area where Element doesn't correctly implement the spec
Projects
None yet
Development

No branches or pull requests