Skip to content

Conversation

@maxschmeling
Copy link

What?

Provide slot fills for RTC presence and awareness UI. The <BlockCanvasCover> SlotFill is used to render cursors above the block canvas. The <EditorsPresence> SlotFill is used to render the avatars list.

Why?

Real-time collaboration code needs a way to render presence and awareness UI. These UI components are only necessary when RTC is enabled, and thus the slot fills provide a way to conditionally render them from the RTC code into the correct locations.

How?

Creates two new slot fill components:

  1. <EditorsPresence> is rendered in the header and is intended for the avatars
  2. <BlockCanvasCover> is rendered over the entire block canvas and is intended for drawing live cursors and selections

Testing Instructions

  1. Check out this PR.
  2. Render the <EditorsPresence> and <BlockCanvasCover> components and pass children that you can very are inserted into the header and block canvas respectively.

Testing Instructions for Keyboard

No interactive UI elements changed as part of this PR.

…asCover> slot fills

---------

Co-authored-by: Chris Zarate <[email protected]>
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: chriszarate <[email protected]>
Co-authored-by: maxschmeling <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: youknowriad <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @maxschmeling! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 3, 2025
@t-hamano t-hamano added [Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration [Type] Experimental Experimental feature or API. labels Dec 3, 2025
@Mamaduka
Copy link
Member

Mamaduka commented Dec 3, 2025

Should these start as private SlotFills? SlotFills are public by their nature, and anyone can render anything there.

cc @WordPress/gutenberg-core

@maxschmeling
Copy link
Author

Should these start as private SlotFills? SlotFills are public by their nature, and anyone can render anything there.

I pushed 6ff5c93 to move <BlockCanvasCover> to the private API and 83df206 to use Symbol to make the names internal.

Starting private for both is probably the better path.

// @ts-ignore
BlockPreview,
// @ts-ignore
privateApis as blockEditorPrivateApis,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover? 🤔

@ntsekouras
Copy link
Contributor

It feels like we should have some code using this before adding the slots (even if private). Mainly because this PR aims to add the slot in the editor's header, which is already crowded and it will definitely need design feedback.

@youknowriad
Copy link
Contributor

Why have slot/fills in the first place instead of just actually adding the needed components that we want to render directly in the editor package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Real-time Collaboration Phase 3 of the Gutenberg roadmap around real-time collaboration First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Experimental Experimental feature or API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants