Repository navigation
Commit 21529a3
Editor: Show own presence in collaborative editing sessions (#76413)
* Editor: Align user block selection highlight with collaborator highlight
Add box-shadow to the selected-block-outline mixin to match the visual
treatment used for collaborator block highlights — white inner/outer
borders and a subtle elevation shadow. The user's selection retains the
theme color while gaining the same polished appearance.
Co-authored-by: Claude <noreply@anthropic.com>
https://claude.ai/code/session_012mkKooPds1bE1YkRWVF982
* Editor: Add current user to collaborators-presence list
When the showCollaborationCursor preference is enabled, the current
user now appears in the collaborators-presence avatar group and
popover list. The user's avatar is displayed first with the admin
theme color border, and their name shows as "You" in the popover.
Uses the Avatar component's name prop to preserve the full username
in the tooltip. Disconnected collaborators are indicated via the
dimmed prop.
Co-authored-by: Claude <noreply@anthropic.com>
https://claude.ai/code/session_012mkKooPds1bE1YkRWVF982
* Show own presence (as a preference)
* Editor: Use theme color for own cursor in collaborative sessions
When a user opts in to showing their own cursor, it was rendered
using their assigned collaborator color. The cursor now uses
`var(--wp-admin-theme-color)`, matching how the user's own presence
is shown in the collaborators list and block highlighting.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Editor: Suppress blinking cursor line for own cursor in collaborative sessions
When the user opts in to showing their own cursor, only the avatar
label is rendered — not the blinking cursor line. This avoids
conflicting with the browser's native caret.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Editor: Always show own avatar in toolbar and collaborators list
The showCollaborationCursor preference previously gated the current
user's avatar from appearing in the AvatarGroup and CollaboratorsList.
Own presence in those two surfaces is now always visible — the
preference only controls cursor visibility in the editor overlay.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Editor: Use theme color for own block highlight in collaborative sessions
Applies the same isMe → theme color pattern already used for the
cursor and presence list, so the current user's block highlight
outline and avatar badge consistently reflect the admin theme color.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Editor: Remove own block highlight from collaborative sessions
The block highlight overlay was applying to the current user's own
selection when the showCollaborationCursor preference was enabled.
Own block highlighting is now fully suppressed — the block editor's
built-in selection UI handles it. The preference only controls
whether the user's avatar label appears over their text cursor.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Editor: Fix avatar contrast ring using pseudo-element instead of inset box-shadow
The inset box-shadow on .editor-avatar__image was unreliable because
CSS paint order renders inset shadows below content — the absolutely-
positioned <img> element covers it when the image loads. Replace with
a ::after pseudo-element (z-index: 1) that always paints above the
image. The initials fallback sets content: none since it doesn't need
a contrast ring.
Mirrored in avatar-iframe-styles.ts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update editor CHANGELOG for avatar contrast ring fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Editor: Suppress selection rects for own cursor in collaborative sessions
The browser already renders the user's native selection highlight, so
the overlay selection rects would double up. Skip them for the current
user, same as we do for the cursor line.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Editor: Fix self-presence e2e test selectors to match component implementation
The test used a non-existent `.list-item-you` class and `(you)` text,
but the component renders all users with `.list-item` and displays `You`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Editor: Update self-presence preference copy and fix e2e tests
Rename preference label to "Show avatar in blocks" with clearer help
text. Fix e2e tests to reflect that the "You" entry in the collaborators
list is always visible regardless of the preference — the preference
only controls the cursor/highlight overlay, not list membership.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Editor: Show "You" label on own cursor badge in collaborative overlay
Pass `label="You"` to the Avatar badge for the current user's cursor,
so the badge displays "You" instead of the username. The Avatar
component automatically shows the real username in a tooltip when a
custom label is set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Editor: Remove unused list-item-you CSS rule from collaborators list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: dabowman <davidabowman@git.wordpress.org>
Co-authored-by: chriszarate <czarate@git.wordpress.org>
Co-authored-by: maxschmeling <maxschmeling@git.wordpress.org>
Co-authored-by: pbearne <pbearne@git.wordpress.org>
Co-authored-by: smithjw1 <smithjw1@git.wordpress.org>1 parent a23999b commit 21529a3
13 files changed
Lines changed: 228 additions & 57 deletions
File tree
- packages
- base-styles
- edit-post/src
- edit-site/src
- editor
- src/components
- collaborators-overlay
- collaborators-presence
- avatar
- preferences-modal
- test/e2e/specs/editor/collaboration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| 675 | + | |
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | 54 | | |
58 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| |||
75 | 81 | | |
76 | 82 | | |
77 | 83 | | |
78 | | - | |
79 | 84 | | |
80 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 85 | + | |
| 86 | + | |
88 | 87 | | |
89 | | - | |
90 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
| 6 | + | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
81 | | - | |
82 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
| |||
122 | 136 | | |
123 | 137 | | |
124 | 138 | | |
125 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
126 | 142 | | |
127 | 143 | | |
128 | 144 | | |
| |||
138 | 154 | | |
139 | 155 | | |
140 | 156 | | |
| 157 | + | |
141 | 158 | | |
142 | 159 | | |
143 | 160 | | |
| |||
155 | 172 | | |
156 | 173 | | |
157 | 174 | | |
| 175 | + | |
158 | 176 | | |
159 | 177 | | |
160 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
13 | | - | |
14 | | - | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| |||
66 | 79 | | |
67 | 80 | | |
68 | 81 | | |
69 | | - | |
70 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | | - | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| |||
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| 72 | + | |
| 73 | + | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
| |||
69 | 83 | | |
70 | 84 | | |
71 | 85 | | |
72 | | - | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
76 | 101 | | |
77 | 102 | | |
78 | 103 | | |
| |||
95 | 120 | | |
96 | 121 | | |
97 | 122 | | |
98 | | - | |
| 123 | + | |
99 | 124 | | |
100 | 125 | | |
101 | 126 | | |
| |||
0 commit comments