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

Hide user cursors #4126

Closed
juliushaertl opened this issue May 5, 2023 · 7 comments · Fixed by #4336
Closed

Hide user cursors #4126

juliushaertl opened this issue May 5, 2023 · 7 comments · Fixed by #4336
Assignees
Labels
26 feedback bug Something isn't working

Comments

@juliushaertl
Copy link
Member

User cursors might be in the way for reading text. Ideally we only show the names on hover or when people are editing. Other than that a checkbox to disable them in the collaborator menu might be worth as well.

What do you think @max-nextcloud @nimishavijay ?

@mejo-
Copy link
Member

mejo- commented May 5, 2023

I like the idea to always show the cursors but only display the names on hover and while they're typing (with a timeout, maybe something like 3-5 seconds).

@md-work
Copy link

md-work commented May 16, 2023

Please add an option to completely disable the user cursors.

I've just been in a meeting where a lot of people were annoyed by all the user cursors blinking around (optical noise).
And even if text was just overlapped for seconds many people were disturbed when reading text.

@max-nextcloud
Copy link
Collaborator

I agree it should be possible to hide them. I wonder if it would be a middle ground to only show them when people are actually typing - but that also seems harder to accomplish.

@nimishavijay
Copy link
Member

It would be ideal if they were only shown when typing, but as a quick fix we could have a checkbox for it in the top right active users menu called "Show collaborator cursors" (Show author cursors? Cc @jancborchardt for wording?) right below "Show author colors" :)

@jancborchardt
Copy link
Member

I would also say they should only show when typing, as @max-nextcloud proposed.

Adding an option is not really a quick fix, because:

  • Everyone will have to set it, and know it's there
  • It is always difficult to remove a setting and people will complain
  • Also it's then just a full on/off, which is not really useful. Then you are in a document where random elements change, which is more distracting than the cursors.

@nimishavijay
Copy link
Member

@jancborchardt Good point about removing the setting :)

for 1) it is enabled by default and people can switch it off from there, and for 3) it wouldn't be a per document setting, ideally? it would be a per user setting so once you unset it it would remain like that. What do you think? @max-nextcloud @mejo- would this work?

@kolAflash
Copy link

I agree it should be possible to hide them. I wonder if it would be a middle ground to only show them when people are actually typing - but that also seems harder to accomplish.

I think showing the user cursor labels when typing is NOT a good middle ground.

Maybe showing a pure colored cursor without label is OK.
But if there's a label it will always overlap other text. Doesn't matter if someone is typing or not.

If you really want to have some feature like this, do it like Etherpad Lite. Coloring the text background and provide some user list view at the side.
https://etherpad.org/img/etherpad_demo.gif

 

Please consider:
There's finite space. And it has to be decided how to use it.
You can't have everything without making compromises!
I'd say first priority has to display the text, because that's why users are here for.

And additionally:
Please carefully test before releasing.
The user cursors caused a mess of troubles in Nextcloud-26.0!
If the basics are not working stable, everything additional like users cursors becomes worthless!

mejo- added a commit that referenced this issue Jun 21, 2023
If we don't receive an update from a user within five seconds, hide the
label of their cursor.

Implementation details:
* Add CSS to fade out the cursor label after five seconds per default.
* Listen for Yjs updates. In case it's an awareness message, update the
  cursor of the author, remove the fade out CSS class and add it again
  after five seconds.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- self-assigned this Jun 21, 2023
mejo- added a commit that referenced this issue Jun 21, 2023
If we don't receive an update from a user within five seconds, hide the
label of their cursor.

Implementation details:
* Add CSS to fade out the cursor label after five seconds per default.
* Listen for Yjs updates. In case it's an awareness message, update the
  cursor of the author, remove the fade out CSS class and add it again
  after five seconds.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Jun 26, 2023
If we don't receive an update from a user within five seconds, hide the
label of their cursor.

Implementation details:
* Add CSS to fade out the cursor label after five seconds per default.
* Listen for Yjs updates. In case it's an awareness message, update the
  cursor of the author, remove the fade out CSS class and add it again
  after five seconds.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Jul 25, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
mejo- added a commit that referenced this issue Jul 26, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
max-nextcloud pushed a commit that referenced this issue Jul 27, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
max-nextcloud pushed a commit that referenced this issue Jul 28, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
backportbot-nextcloud bot pushed a commit that referenced this issue Jul 28, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
backportbot-nextcloud bot pushed a commit that referenced this issue Jul 28, 2023
Implementation details:
* Add a custom CollaborationCursor Tiptap extension
* Add CSS to fade out the cursor label after some time.
* Listen for Yjs updates.
  - If it's a doc change by ourself, update the timestamp of own user in
    awareness state.
  - If it's a remote awareness update, add back the CSS class to the
    corresponding cursor.
  - Wait 50ms before showing the cursor in the DOM to account for cases
    where the cursor gets re-rendered by y-prosemirror.

Fixes: #4126

Signed-off-by: Jonas <jonas@freesources.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
26 feedback bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants