You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d8e7e92
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/caret-presence.test.ts
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/collaboration/caret-presence.ts
+35-5Lines changed: 35 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
import{Extension}from'@tiptap/core'
2
2
import{Plugin,PluginKey}from'@tiptap/pm/state'
3
3
importtype{Awareness}from'y-protocols/awareness'
4
+
import{USER_COLORS}from'@/lib/workspaces/colors'
4
5
5
6
/**
6
7
* Remote-collaborator caret presence for the file editor: the name label's
@@ -17,8 +18,38 @@ import type { Awareness } from 'y-protocols/awareness'
17
18
*/
18
19
exportconstCARET_LABEL_HOLD_MS=2000
19
20
20
-
/** Fallback caret color when a peer's awareness carries no `color`. */
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/editor-extensions.ts
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,12 @@ import CollaborationCaret from '@tiptap/extension-collaboration-caret'
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css
+38-4Lines changed: 38 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -469,14 +469,19 @@
469
469
470
470
/*
471
471
* Collaborative carets (TipTap CollaborationCaret). The caret bar and the name
472
-
* label's background are colored inline from each collaborator's identity color
472
+
* label's background use the collaborator's identity palette slot from CSS
473
473
* (the same `getUserColor` mechanism the canvas cursors use); the selection is a
474
-
* translucent tint of that color (set via selectionRender). The name label shows
474
+
* translucent tint of that color. The name label shows
475
475
* while the peer is active (JS toggles `--active` on each awareness change) or on
476
476
* hover, then fades after inactivity — matching Google Docs. `z-index` lifts the
477
477
* caret (and its label) above table cell backgrounds so a caret inside a table
0 commit comments