fix: Replace unsupported editor architecture#50
Merged
Conversation
ececf57 to
4bc5a4a
Compare
This largely reverts #24, which resulted in several regressions. Namely, oddities in the block toolbar emptying and empty Patterns/Media tabs in the block inserter. The previous changes was implemented to workaround an experimental API that is no longer exported after WordPress/gutenberg#64892. That remains an issue, but the new workaround is to patch Gutenberg itself to export this necessary API with `patch-package`.
4bc5a4a to
e02f4e6
Compare
While the reason for why the `blob:` requests trigger is unknown, they originate when utilizing the block inserter's Patterns tab. The requests seemingly originate from the embedded editor previews rendered for each pattern.
31428a9 to
a7db21b
Compare
Contributor
kean
approved these changes
Dec 18, 2024
Contributor
Never mind – it does. I have no memory of adding this code 😅 |
Member
Author
Thanks, I plan to address this in https://github.com/Automattic/dotcom-forge/issues/8678.
😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What?
Replace our current editor architecture with the approach recommended in the Gutenberg Framework documentation.
Why?
Fixes https://github.com/Automattic/dotcom-forge/issues/10026.
After merging #24, several regressions were introduced. Namely, the block toolbar would unexpectedly empty when moving the mouse cursor after typing into a rich text field.
Additionally, the Patterns and Media tabs in the block inserter have not worked since the previous change, as it no longer had access to private APIs enabling their operation.
How?
Replace our usage of
EditorProviderwithBlockEditorprovider, as well as reintroduce the necessary supporting code for managing the post content state.Testing Instructions
1 - Formatting options remain present within the block toolbar
options—e.g., bold, italic, etc.
2 - The Patterns/Media tab populate with content from the current site
Accessibility Testing Instructions
N/A, no user-facing changes.
Screenshots or screencast
N/A, no user-facing changes.