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

Automatically redirect to your main client #355

Open
ineiti opened this issue Oct 18, 2024 · 0 comments
Open

Automatically redirect to your main client #355

ineiti opened this issue Oct 18, 2024 · 0 comments

Comments

@ineiti
Copy link

ineiti commented Oct 18, 2024

Having had another bad onboarding experience during a discussion about not using MS Teams (I sent the "Copy room link" from the element web client), I thought about how to make this experience better.

Going a bit through the archives (#15 #197 #16 #74 flaki@7eeadc4 #23 and others), I see that there are already quite some options, but neither of which makes it as easy as "click on the link"...

Proposition

Preparation of the web clients (e.g., element-web):

  1. add a default_client_storage configuration option to element-web to point to a "matrix.to" server - by default it's off
    a) there can be a per-user configuration option which overrides the global setting either way (on -> off; off -> on; override the URL)
    b) for this to work, the inviter and the follower need to have the same default_client_storage
  2. if the configuration is set, the element-web regularly opens a page from the default_client_storage server with an URL like:
    ${default_client_storage}#mymatrix.mydomain.mytld in the background. This is necessary, because the localStorage is private to a domain
  3. This page from the default_cliet_storage stores the data after the # in the localStorage of the browser

Sharing a room

  1. click the three dots on the room and choose "Copy room link - default client" (or make this the default if default_client_storage is set)
  2. the link points to the default_client_storage server with an additional tag, e.g., ?use_default_server
  3. if the page from default_client_storage detects a stored client in the localStorage of the browser, it shows a countdown (5 seconds) to redirect to the default client
    a) if multiple default clients are stored, it could redirect to the most used after 5 seconds, but display the other ones

Commets

  • For mobile clients, matrix.to would need to recognize that it's running on mobile, and propose a rewritten matrix:// scheme

Problems

  • need to open the link in the open tab, else the element web client complains that it's already open in another tab
  • will not work with the desktop apps, as the matrix:// protocol is not implemented yet, from what I gather
  • this breaks my first idea of getting the web-client to store data in a privacy-preserving way (using an iFrame to store data in the localStorage): https://developers.google.com/privacy-sandbox/cookies/storage-partitioning

Do you think this would be an acceptable extension to matrix.io and element-web?

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

No branches or pull requests

1 participant