Skip to content

[stable27] Fade out user cursor labels after five seconds of inactivity - #4591

Merged
mejo- merged 3 commits into
stable27from
backport/4336/stable27
Jul 28, 2023
Merged

[stable27] Fade out user cursor labels after five seconds of inactivity#4591
mejo- merged 3 commits into
stable27from
backport/4336/stable27

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

Backport of #4336

mejo-and others added 2 commits July 28, 2023 06:56
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>
Document changes trigger awareness updates.
Wait before sending them in a push request so they can be combined.
Also make use of prosemirrors transactions to detect own changes
instead of listening to yjs updates.
Signed-off-by: Max <max@nextcloud.com>
@backportbot-nextcloudbackportbot-nextcloudBot added the bug Something isn't working label Jul 28, 2023
@backportbot-nextcloudbackportbot-nextcloudBot added this to the Nextcloud 27.0.2 milestone Jul 28, 2023
@cypress

cypressBot commented Jul 28, 2023

Copy link
Copy Markdown

1 flaky tests on run #11356 ↗︎

014520Flakiness1

Details:

[stable27] Fade out user cursor labels after five seconds of inactivity
Project: TextCommit:6a244428c1
Status: PassedDuration: 08:10 💡
Started: Jul 28, 2023 10:36 AMEnded: Jul 28, 2023 10:45 AM
Flakiness cypress/e2e/sync.spec.js • 1 flaky test

ViewOutputVideo

Test Artifacts
Sync > passes the doc content from one session to the next OutputScreenshots

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@mejo-

Copy link
Copy Markdown
Member

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@mejo-
mejo- merged commit 9fd56e0 into stable27Jul 28, 2023
@mejo-
mejo- deleted the backport/4336/stable27 branch July 28, 2023 10:47
@blizzzblizzz mentioned this pull request Aug 2, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@mejo-@max-nextcloud@nextcloud-command