The WordPress coreCoreCore is the set of software required to run WordPress. The Core Development Team builds WordPress. development team builds WordPress! Follow this site for general updates, status reports, and the occasional code debate. There’s lots of ways to contribute:
Found a bugbugA bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority.?Create a ticket in the bug tracker.
Notes are mainly powered by an AI note taker so please leave a comment if anything feels wildly off.
Overview
Kevin Jahns presented a demonstration on utilizing Yjs to enhance real-time editing capabilities in WordPress, addressing existing challenges such as content synchronization and potential conflicts during simultaneous edits. He introduced features like automatic conflictconflictA conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved. resolution and a heartbeat APIAPIAn API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. for near real-time updates, emphasizing that while the current implementation may not fully replicate the Google Docs experience, it significantly improves user trust and collaboration. Participants were encouraged to explore Yjs further and consider its applications in their projects.
Jahns discussed the technical obstacles in implementing collaborative editing, particularly the lack of WebSocket support across various PHPPHPThe web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher engines and the limitations of WebRTC, which requires multiple servers for reliable operation. He proposed using HTTPHTTPHTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. requests for syncing while allowing WebRTC as an optional enhancementenhancementEnhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature.. Additionally, he highlighted issues with blockBlockBlock is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. validation errors and synchronization challenges with custom block types in the GutenbergGutenbergThe Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ editor, suggesting the creation of a special editor binding for Yjs to improve synchronization. Security concerns regarding the WebRTC setup were also raised, with a focus on the need for role-based collaboration restrictions to prevent document manipulation.
The session also covered the storage and management of Yjs documents, with Jahns explaining that Yjs content is stored as comments in post content, facilitating straightforward revision creation. He acknowledged the challenges of managing real-time changes and the impact of Yjs documents on content size. Discussions included the limitations of WebRTC, particularly its reliance on costly TURN servers, and the need for ongoing testing to ensure the reliability of collaborative editing features. Jahns emphasized the importance of prioritizing collaborative editing to enhance the editor’s evolution and received appreciation for his transparency and commitment to the Gutenberg project.
Real-Time Editing Demo with Yjs Kevin Jahns presented a demo on real-time editing with Yjs, emphasizing its role in enhancing collaborative features in WordPress. He explained the limitations of the current WordPress editor regarding content synchronization and introduced new features like automatic conflict resolution and the heartbeat API for better real-time collaboration.
Collaborative Editing in WordPress Kevin Jahns addressed the difficulties of enabling collaborative editing in WordPress, noting that WebSockets are not universally supported across PHP engines. He explained that while WebRTC could be used as a fallback, it is not reliable enough for all users. Instead, he proposed using HTTP requests for syncing, with WebRTC as a progressive enhancement for those who can utilize it.
Block Synchronization and Customization Challenges Kevin Jahns addressed synchronization issues with block types (and ran into an error with block validation in the process!). He explained that while standard elements like text and images function properly, custom block types may encounter difficulties due to Gutenberg’s design, which does not fully accommodate changes from multiple peers. Jahns emphasized the need for a special editor binding for Yjs to enhance synchronization.
Discussion on Signaling Server and Security Concerns Kevin Jahns confirmed that Jorge’s signaling server implementation in WordPress remains unchanged. He raised security concerns regarding the WebRTC setup, highlighting that it permits document manipulation by anyone with read access. Jorge noted that to make the system production-ready, several security measures need to be implemented, particularly around user roles and collaboration.
Yjs Document Storage and Revision Management Kevin Jahns responded to Frank’s inquiry about the Yjs implementation and its impact on content revisionsRevisionsThe WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision.. He detailed that Yjs documents are stored as comments within the post content, which facilitates the creation of revisions upon saving. Additionally, he mentioned that future comparisons of revisions could be made using Yjs documents, similar to a git diff, and that attribution for content creation is also supported.
Discussion on Yjs Document Implementation and Security Concerns Kevin Jahns highlighted the downside of Yjs documents inflating content size but reassured that normal users wouldn’t see the comments. Aaron Jorbin pointed out the security implications of allowing users to input unfiltered HTMLHTMLHyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.. Kevin also mentioned the potential for filtering user visibility of Yjs comments and the need to track edits made by users, which currently lacks a backend solution.
WebRTC vs. WebSocket for Collaborative Editing in WordPress Kevin Jahns explained that WebRTC is not a reliable option for collaborative editing in WordPress due to its dependency on multiple servers and potential blocking by companies. He suggested using HTTP requests as a baseline for collaboration, which provides a satisfactory experience for most users. For those needing more reliability, he mentioned the possibility of implementing WebSocket servers, which could also enhance security and authentication.
Discussion on WebRTC and TURN Servers Kevin Jahns highlighted the overhead of WebRTC and the expense of hosting TURN servers, indicating that they are not a viable option for everyone. Jorge shared his thoughts about the reliability of TURN servers from providers like Google and Twilio. They noted that while STUN servers are affordable and public, TURN servers are costly and can lead to misuse.
Collaborative Editing and Yjs Integration Kevin Jahns highlighted the challenges faced with collaborative editing in the current editor setup, particularly issues with image handling and the undo-redo functionality. He stressed the necessity of prioritizing collaborative editing and proposed using Yjs as a solution to enhance these features. Kevin also mentioned that recent updates to Gutenberg have caused disruptions, indicating a need for better testing and support.
Yjs Integration and Block Syncing Challenges Kevin Jahns explained the process of syncing textual content through JSONJSONJSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML., noting that changes in one block can overwrite changes in another. He acknowledged existing issues with tables and galleries, indicating that these would be addressed in future pull requests. Kevin also highlighted the importance of creating a robust integration with Yjs for better collaboration.