Opened 5 weeks ago
Last modified 13 hours ago
#64904 new task (blessed)
Real time collboration: determine approach for opt in setting for users in Settings > Writing
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Administration | Keywords: | needs-design has-patch |
| Focuses: | ui, accessibility | Cc: |
Description
With the change in approach for real time collaboration to be enabled first by hosts and then again enabled by end users, I wanted to open an issue asap to discuss design approach for the Settings > Writing screen. In particular:
- How best to present to users that it's an early version of this feature.
- Whether to show users whose hosts have disabled the feature a notice to explain why they don't have the option.
More context here: https://wordpress.slack.com/archives/C0A803Z8MA5/p1773929832262859?thread_ts=1773927105.693749&cid=C0A803Z8MA5
Attachments (13)
Change History (60)
#2
@
5 weeks ago
I kitbashed a couple of quick variants; first attachment shows a slight rephrasing of the text to soften it:
Collaboration Enable early access to real-time collaboration
(Realising just now a typo in the image I shared, it should be "real-time" with a dash, yes?)
And second attachment proposes showing an inline notice for the case where a host has chosen to disable the feature. Notice says:
Note: The real-time collaboration feature preview has been disabled by your host.
If we can't know whether it's disabled by the host, or just a plugin, we could be generic:
Note: The real-time collaboration feature preview has been disabled.
What's feasible/possible, I defer to you all. Hope this is helpful.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
5 weeks ago
#4
follow-up:
↓ 26
@
5 weeks ago
I think the option is going to have the following states that we can detect (after the config flag has been added):
- Off by default with no additional changes (This is what is planned to be shipped)
- On by default by using the
default_option_wp_collaboration_enabledfilter. - Off by choice
- On by choice
- Disabled by config flag (it isn't possible to know if the flag is set by the host or not)
- Enabled by config flag
@Joen Does this change your suggestions in any way (other than make it likely we should use your suggestion that doesn't mention hosts)
#5
@
5 weeks ago
Thanks for the clarification! If we're okay with the overall concept of an inline notice when disabled, I think we should be able to cover the bases with the ingredients we have here, give or take precise phrasings.
- As shared
- Same, but with the box checked already
- Same, unchecked
- Same, checked
- Same as the second sketch with the notice, but with the more generic phrasing.
6 is an open question to me, I'll have do defer even more to you all what's best there. Assuming in that enabled-by-config-flag state you can still uncheck/it—turn the feature off, my instinct would be to do the same for this one as 2, just have the box checked.
But just in case it's forced on, and not possible to turn off, I'd show a notice same as if it's disabled, but with different text, such as:
Note: The real-time collaboration feature preview is enabled.
All phrasings of course subject to feedback, e.g. do we need to include "... and cannot be disabled"?
This ticket was mentioned in PR #11310 on WordPress/wordpress-develop by @jorbin.
5 weeks ago
#6
- Keywords has-patch added
This is the start at adding a constant for forcing enable/disable for real time collab. Currently only includes UI changes
Trac ticket: https://core.trac.wordpress.org/ticket/64904
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): GPT-5.1
Used for: Initial code skeleton and test suggestions; final implementation and tests were reviewed and edited by me.
#7
@
5 weeks ago
I did a first pass on the UI. A few notes:
- It seems as though the css for
inlinenotices were removed at some point. Still investigating that. This is why they are full width. - In order to be more consistent beetween the three states, I changed
Enable early access to real-time collaborationtoEnable real-time collaboration feature preview. This way it is always "real-time collaboration feature preview`. @Joen - Are you good with this?
This also adds the constant FORCE_COLLABORATION_ENABLED. Very open to a different name.
This ticket was mentioned in Slack in #core by jorbin. View the logs.
5 weeks ago
#9
@
5 weeks ago
I'm not sure there ever was an .inline class used for styling; it's just a JS hook to prevent the notice from being moved to the top of the screen.
If there was an inline class in CSS, it hasn't been there for a very long time; I only went back as far as 5.0 to look.
#10
@
5 weeks ago
Thanks @joedolson! My git log search is also showing that my memory of this class is wrong.
I think it's ok for these to be full length but will defer to @joen on that.
Additionally, this design uses notice-warning. I wonder if the notice-info design would be more appropriate (screenshot incoming)
#11
@
5 weeks ago
I'm in favor of using notice-info styles.
We don't want to warn users about anything, we want to keep them informed about the implementation of this feature.
This ticket was mentioned in PR #11311 on WordPress/wordpress-develop by @alecgeatches.
5 weeks ago
#12
Add WP_DISABLE_COLLABORATION constant and wrapper wp_is_collaboration_enabled() function. Based on UI changes in https://github.com/WordPress/wordpress-develop/pull/11310.
Trac ticket: https://core.trac.wordpress.org/ticket/64904
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Opus 4.6
Used for: Implementation
@alecgeatches commented on PR #11310:
5 weeks ago
#13
I added a modified version of this using WP_DISABLE_COLLABORATION instead as a only-turn-off constant in https://github.com/WordPress/wordpress-develop/pull/11311.
@ingeniumed commented on PR #11311:
5 weeks ago
#14
I have a few of suggestions.
- Instead of a constant with a negative intent, it is clearer to use a positive intent. This avoids having code along the lines of
if ( CONSTANT === true ) then false;- It's more precise to describe the constant as whether or not RTC is permitted, than whether RTC is enabled or disabled. I think
WP_ALLOW_COLLABORATIONis a better match for that intent.- As a part of the consideration is to allow hosts to disallow the feature at an environment level, allowing an environment variable to be set will help meet their needs
- Instead of needing to repeat the
! defined() && ..., define the default value inwp_functionality_constants()My suggestion is to add the following to
wp_functionality_constants()and modify the PR for the various implications
/** * Whether real time collaboration is permitted to be enabled. * * @since 7.0.0 */ if ( ! defined( 'WP_ALLOW_COLLABORATION' ) ) { if ( false !== getenv( 'WP_ALLOW_COLLABORATION' ) ) { // Environment variable is defined. if ( 'true' === getenv( 'WP_ALLOW_COLLABORATION' ) ) { define( 'WP_ALLOW_COLLABORATION', true ); } else { define( 'WP_ALLOW_COLLABORATION', false ); } } else { // Environment variable is not defined, default to true. define( 'WP_ALLOW_COLLABORATION', true ); } }
Thanks for the feedback @peterwilsoncc. I've updated the code with that in mind.
I did have to leave the defined check in collaboration.php as it was erroring out without that.
Let me know what you think of the updated code 🙏🏾
@ingeniumed commented on PR #11311:
5 weeks ago
#15
Noting that it's now WP_ALLOW_COLLABORATION wherein:
true - this means collaboration can be turned on
false - this means collaboration cannot be turned on
not defined - this means collaboration can be turned on
It can be defined in a way to allow hosts to disallow the feature at an environment level.
#16
@
5 weeks ago
Thanks for working on this! For the notice when it's enabled, this shouldn't show a notice and that's not needed afaik. It should instead just show the checkbox checked. This leaves us with:
- Notice if it's disabled by host.
- Checkbox if you can enable it with the choice for the user to turn on/off depending.
@zieladam commented on PR #11311:
5 weeks ago
#17
wp_functionality_constants() doesn't seem to be called during SHORTINIT, so any code path that refers to WP_ALLOW_COLLABORATION will fail with:
Fatal error: Uncaught Error: Undefined constant "WP_ALLOW_COLLABORATION" in
What would be the best way to document that? While the same is true for AUTOSAVE_INTERVAL and other constants defined in wp_functionality_constants(), WP_ALLOW_COLLABORATION seems to have some potential to pop up in different places around the PHP codebase.
@ellatrix commented on PR #11311:
5 weeks ago
#19
Closing since it's been committed
#21
@
5 weeks ago
- Milestone changed from Awaiting Review to 7.0
If RTC is disallowed via the constant/environment variable, I think it would be best to suppress the setting without displaying a notice
The administrator can't take any actions based on the notice as the feature is off at the server level, it's effectively a permission check.
A similar example is that the CSS editing fields aren't displayed if current_user_can( 'edit_css' ) === false.
#23
@
5 weeks ago
Should we include specific language around what a user can expect when enabling the feature? Something like:
Collaboration Enable early access to real-time collaboration. Real-time collaboration may affect your website's performance.
It would seem performance is the chief concern of the current default-polling approach, and if we are explicit about it, we set better expectations.
We don't need to show this in any force-enabled states, only when it is the user's choice.
This ticket was mentioned in PR #11333 on WordPress/wordpress-develop by @zieladam.
4 weeks ago
#24
https://github.com/WordPress/wordpress-develop/pull/11311 introduced the WP_ALLOW_COLLABORATION constant to help hosts disable RTC at the platform level. The constant was defined in wp_functionality_constants(), which runs in wp-settings.php after collaboration.php is loaded. That created a boot-order edge case where wp_is_collaboration_enabled() could be called before the constant existed – for instance via SHORTINIT.
This PR moves the constant definition into a new wp_is_collaboration_allowed() function in collaboration.php. The function checks the constant, and if it's missing, defines it on the spot from the environment variable (defaulting to true). wp_is_collaboration_enabled() now delegates to wp_is_collaboration_allowed() for the constant check, and the admin UI calls wp_is_collaboration_allowed() directly to decide whether to show the checkbox or a "disabled" notice.
Trac ticket: core.trac.wordpress.org/ticket/64904
#26
in reply to:
↑ 4
@
4 weeks ago
Replying to jorbin:
I think the option is going to have the following states that we can detect (after the config flag has been added):
- Off by default with no additional changes (This is what is planned to be shipped)
- On by default by using the
default_option_wp_collaboration_enabledfilter.- On by default by using the default_option_wp_collaboration_enabled filter.
- Off by choice
- On by choice
- Disabled by config flag (it isn't possible to know if the flag is set by the host or not)
- Enabled by config flag
For clarity, here are the current possible states as coded now in trunk:
- Disabled by default (shipped state)
- Disabled in code by setting
WP_ALLOW_COLLABORATIONtofalse(supersedes all other controls) - Enabled or disabled in code using the
pre_option_wp_collaboration_enabledfilter - Enabled or disabled by admins using the Writing setting
Note 1: It is not possible to use the default_option_wp_collaboration_enabled filter, because the option is set to '0' on install and upgrade (via populate_options):
Note 2: Using the pre_option_wp_collaboration_enabled filter means that changes attempted via Writing settings will be ignored. (The same would be true of all settings included in populate_options.)
@zieladam commented on PR #11333:
4 weeks ago
#29
Committed in https://core.trac.wordpress.org/changeset/62100
This ticket was mentioned in Slack in #hosting by chaion07. View the logs.
4 weeks ago
This ticket was mentioned in Slack in #hosting by amykamala. View the logs.
4 weeks ago
#32
@
7 days ago
- Keywords commit removed
I'm not clear on what's left here. It looks like there are some suggestions above that are not yet integrated in the solution here. Mainly @jorbin's suggestion to include a way to force enable, not just force disable.
Removing the commit keyword because it seems that everything that is "ready" has already been committed.
It also seems that a number of people who participated on the Trac ticket did not receive props. Could we please make sure to props liberally, including anyone who attempts to positively contribute to the ticket's resolution.
#33
@
7 days ago
Great timing! We still have some work to do. Looping back here after a call this morning with @matt where he struggled to find this option to turn on and suggested making it more prominent/harder to miss. He suggested adding something like a small icon or emoji next to the setting to draw attention to it as a new feature, something that says "hey, look at this." His concern was that the setting was easy to miss while scrolling, and since it's a new thing in 7.0, he felt it deserved a bit of a highlight. This ties into prior feedback Matt has had for this release with shipping things but then getting the right amount of attention for users on the feature itself (see: WP AI Client + Connectors work and Command Palette in the admin bar). The one caveat raised was around emojis specifically, that they could have different meanings or contexts across languages and cultures, so that would need to be considered.
I'll flag this for a designer so an iteration can be quickly done.
#34
follow-up:
↓ 35
@
7 days ago
@jameskoster shared an idea that I'm attaching here.
It adds a "New" badge next to the field that lasts until the 7.1 or 7.2 release (depending on how we feel the cadency) or after X number of visits so users don't need to wait until the next release to not see it again. For the later, after 10 times visiting the page sounds a reasonable period to me.
What do you think?
#35
in reply to:
↑ 34
@
6 days ago
Replying to fcoveram:
@jameskoster shared an idea that I'm attaching here.
It adds a "New" badge next to the field that lasts until the 7.1 or 7.2 release (depending on how we feel the cadency) or after X number of visits so users don't need to wait until the next release to not see it again. For the later, after 10 times visiting the page sounds a reasonable period to me.
What do you think?
A simple new highlight was my first thought, the approach in the design looks nice.
For longevity of display, I think keep it until WP 7.1 is released rather than the number of times a user has seen it. It reduces database writes and the need to store meta data/options for our options.
@
6 days ago
current Writing Settings page layout in trunk, with Link Manager and Classic Editor plugins activated, initial_db_version manually set to 32100, and Twenty Thirteen as the theme
@
6 days ago
Dashicons option: adding 'groups' icon after the text, with the setting positioned at the top of the page
#36
@
6 days ago
Placement
I think Collaboration belongs at the top of the Writing Settings page. The new setting is more difficult to notice with additional settings such as the legacy Link Manager categories or Classic Editor plugin options. The Formatting options appear for sites created before WordPress 4.3 (#32298).
When setting is disabled
- The
notice-warningstyle seems inappropriate for a 'Note' message, especially when the user cannot override the setting within the admin area. - The notice could have the
notice-infoclass, with a blue border and white background, but I prefer removing thedivstyling entirely. - I would not want to give extra attention to the setting's label (
thheader) when the checkbox is unavailable.
Calling more attention to Collaboration
- Adding 'New' could help, and I agree that the special text or icon should not disappear before the next major release.
- The (site) editor had a 'beta' badge for multiple releases, and that could also fit Collaboration for any number of releases.
- Adding one of the Dashicons, such as 'groups', could fit indefinitely.
#37
@
5 days ago
More feedback from chatting with Matt today about the feature:
ideally under the checkbox it should say what mode it will be running in, and if it's unavailable be greyed out and indicate why vs just removing that row which could be confusing.
I explained the current greyed out approach. In this case though, we need to add in something indicating whether someone is using the default approach or an upgrade/premium approach, like web sockets. @fcoveram can you help with this once more, design wise?
#38
@
3 days ago
Here's an idea that includes the descriptive texts. I'm not sure about the term "connection," so feel free to suggest others more accurate. Regardless, the design approach should be the same.
The left version has a link to explain each feature connection. And the right one for the whole feature. I couldn't find any content in the WordPress Documentation for either of the approaches, but we could link the general connection type to this post.
What do you think?
#39
follow-up:
↓ 40
@
3 days ago
Thanks for sharing those. I don't think that's right. "Enhanced connection available" and making it a link makes it seem you can go configure this or change options rather than reflecting what's in use right now. There aren't ways to configure this. I also don't think we should link to a dev note. If needed, we can create a support doc for it and put the future URL. To be clear though, what we're trying to do is show what the current mode is: default vs enhanced (or whatever word design thinks will communicate this best). Can you come up with designs based on showing what current mode is in use?
#40
in reply to:
↑ 39
@
2 days ago
Replying to annezazu:
Thanks for sharing those. I don't think that's right. "Enhanced connection available" and making it a link makes it seem you can go configure this or change options rather than reflecting what's in use right now.
I agree, and different providers may use different technologies. WebSockets is the most likely, but other providers (WebRTC) are possible.
I agree we need a way to show what is in use, but we should make the text filterable. That way, providers can accurately describe their "mode".
#41
@
43 hours ago
If the dev note feels insufficient and there is no current documentation for this in wp.org/documentation, then let's not add it.
Regarding terminology, I tried a more explicit version that uses default or enhanced and shows the technology used.
I also moved the performance text to the descriptive area below the checkbox, as in other fields across Settings.
For the disabled message, I’m drawn to use the Notice info variant. We know the design is poor, but using the right component and then updating it to the new version sounds like the best move for consistent improvement.
#42
@
27 hours ago
@fcoveram If the host has disabled the feature, should we remove the new tag? There's not much point drawing attention to a new setting the site owner can not enable. As an alternative, we could fade it out.
#43
@
20 hours ago
If the host has disabled the feature, should we remove the new tag?
I don't think so. I approach this by thinking of users contacting their host or individuals for this. And given that we're removing it in 7.1, I'd say the fade-out variant is not needed.
But I'm open to change as I might not be considering other use cases.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
15 hours ago
#45
@
15 hours ago
- Focuses accessibility added
As per today's bug scrub:
The design shared right after comment:41 introduces some accessibility issues. The text is not enough contrasted. Adding accessibility focus so we can make sure to check the final implementation before committing it.
It is already possible to set the default to on with the following code: