Skip to content

When no websockets and multi-editors switch user rights to read-only #486

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

Closed
virgile-dev opened this issue Dec 9, 2024 · 11 comments · Fixed by #945
Closed

When no websockets and multi-editors switch user rights to read-only #486

virgile-dev opened this issue Dec 9, 2024 · 11 comments · Fixed by #945
Assignees
Labels
designed A UX/UI design has been proposed

Comments

@virgile-dev
Copy link
Collaborator

virgile-dev commented Dec 9, 2024

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
Here is the related issue : #456

Describe the solution you'd like
When a user has websockets blocked AND there are multiple possible editors (the document is shared with other people or there an edit link that allow collaboration) they should be able to only read the document and an alert banner should display to explain why.

Describe alternatives you've considered
This is until we implement some kind of alternative solution like polling. (#437)

Discovery, Documentation, Adoption, Migration Strategy
CleanShot 2024-12-09 at 18 26 13@2x
(full mockup in the "In progress" area.

@virgile-dev virgile-dev moved this to To do in Docs - La Suite Dec 9, 2024
@virgile-dev virgile-dev moved this from To do to Backlog in Docs - La Suite Dec 13, 2024
@AntoLC AntoLC linked a pull request Dec 18, 2024 that will close this issue
6 tasks
@qbey qbey moved this to Backlog in Docs - La Suite Jan 31, 2025
@virgile-dev
Copy link
Collaborator Author

virgile-dev commented Mar 11, 2025

So to recap the need associated with this issue.
For users who do not have access to websockets this is the desired behaviour :
If the user is the only editor of his doc the he can save its document to the server.
If not a banner is displayed explaining his config doesn't allow him to collaborate.

When a user opens a document he has been invited on he cannot edit the document and save new versions to the server even if he has been invited as an editor.

@sampaccoud are you ok with what's described above ? If yes @rl-83 can you provide us with a design ?

@virgile-dev
Copy link
Collaborator Author

Linked with #456

@rl-83
Copy link
Collaborator

rl-83 commented Mar 11, 2025

Here is my updated proposal.
The idea is to completely block editing functionality for users who do not have WebSockets.
Clicking on "learn more" opens a modal that explains in simple terms why it isn't working. In this explanatory text, I suggest mentioning: (1) that the user typically has editing rights on this specific document, but (2) that their network configuration does not allow collaboration, and therefore editing.

-> Waiting for the definitive text to update the prototype

@virgile-dev
Copy link
Collaborator Author

This is the text for the modal:
"The network configuration of your workstation or internet access does not allow collaborative editing. Docs uses WebSockets for real-time co-editing. WebSockets are a channel that enables a website and a server to exchange messages instantly and bidirectionally. You can contact your IT administrators to request that WebSockets be allowed."

"La configuration réseau de votre poste de travail ou de votre accès internet de ne permet pas d'utiliser l'édition collaborative.
Docs utilise les websockets la co-édition en temps réel. Les websockets est un canal qui permet à un site web et à un serveur d'échanger des messages instantanément et de façon bidirectionnel. Vous pouvez contacter à vos responsables informatiques pour leur demander d'autoriser les websockets."

@virgile-dev
Copy link
Collaborator Author

@sampaccoud is this ok for you ? if yes we'll start the dev

@virgile-dev virgile-dev moved this from Backlog to Doing next in Docs - La Suite Mar 12, 2025
@rl-83
Copy link
Collaborator

rl-83 commented Mar 14, 2025

Small grammatical corrections:

EN
The network configuration of your workstation or internet connection does not allow you to edit shared documents.
Docs uses WebSockets—a communication channel that enables instant, two-way message exchange between your browser and our servers—for real-time editing. To enable collaborative editing, please contact your IT administrators to allow WebSocket connections.

FR
La configuration réseau de votre poste de travail ou de votre connexion internet ne permet pas d’éditer des documents partagés.
Docs utilise les WebSockets pour permettre l'édition en temps réel. Ces canaux de communication permettent des échanges instantanés et bidirectionnels entre votre navigateur et nos serveurs. Pour accéder à l'édition collaborative, veuillez contacter votre service informatique afin d'autoriser les WebSockets.

-> It looks like this

Update: I specified that it was the shared documents that were not editable.

@virgile-dev virgile-dev moved this from Doing next to To do in Docs - La Suite Mar 14, 2025
@virgile-dev virgile-dev moved this from To do to Doing next in Docs - La Suite Mar 14, 2025
@virgile-dev virgile-dev moved this from Doing next to To do in Docs - La Suite Mar 14, 2025
@rl-83 rl-83 added the designed A UX/UI design has been proposed label Mar 20, 2025
@AntoLC
Copy link
Collaborator

AntoLC commented Apr 23, 2025

To summarize, user will switch to "Reader" mode if :

  • The user is online (has internet)
  • The user is not connected to the collaboration server
  • The doc has members or is "public editable" or "auth editable"

@jidhub
Copy link

jidhub commented Apr 23, 2025

The following sentence is wrong: "Pour accéder à l'édition collaborative, veuillez contacter votre service informatique afin d'autoriser les WebSockets."

My suggestion: "Pour accéder à l'édition collaborative, veuillez demander à votre service informatique de vous autoriser les WebSockets vers ${HOSTNAME_SERVER}."

@sampaccoud
Copy link
Member

To summarize, user will switch to "Reader" mode if :

  • The user is online (has internet)
  • The user is not connected to the collaboration server
  • The doc has members or is "public editable" or "auth editable"

Could we add the condition that at least one other user is currently connected? This would minimize occurrences of locking the document for users with no websocket.

@AntoLC
Copy link
Collaborator

AntoLC commented Apr 23, 2025

Could we add the condition that at least one other user is currently connected? This would minimize occurrences of locking the document for users with no websocket.

Yes we can know the connected users on the server, but we have a case where multiple users not connected on the server are editing at the same time to tackle as well so. It will require a mechanism to add and remove their presence manually to the collab server (http endpoint).

@jidhub
Copy link

jidhub commented Apr 23, 2025

"a mechanism to add and remove their presence manually to the collab server (http endpoint)": this seems a wise locking solution, for users short of websockets.

@AntoLC AntoLC moved this from To do to In Progress in Docs - La Suite May 6, 2025
@AntoLC AntoLC linked a pull request May 6, 2025 that will close this issue
3 tasks
@github-project-automation github-project-automation bot moved this from Backlog to Done in Docs - La Suite May 19, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Docs - La Suite May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
designed A UX/UI design has been proposed
Projects
Status: Done
5 participants