Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the Posts block editor implementation by moving the Preview component to module scope so its reference is stable across Edit re-renders, and updates Preview to receive isLoading explicitly rather than via closure. This aligns with the goal of reducing editor oddities (like animation behavior) caused by component identity changes.
Changes:
- Hoisted
Previewout ofEditto keep a stable component reference across renders. - Passed
isLoadingas an explicit prop toPreview. - Kept existing loading/empty-state handling and preview rendering structure intact.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Bundle Size Diff
|
Contributor
|
Plugin build for bc72dc2 is ready 🛎️!
|
Contributor
E2E TestsPlaywright Test Status: Performance ResultsserverResponse: {"q25":362,"q50":366.2,"q75":397.2,"cnt":10}, firstPaint: {"q25":370.4,"q50":387.3,"q75":515.6,"cnt":10}, domContentLoaded: {"q25":1586.3,"q50":1600.5,"q75":1610.7,"cnt":10}, loaded: {"q25":1586.6,"q50":1600.9,"q75":1611,"cnt":10}, firstContentfulPaint: {"q25":3208.6,"q50":3228.4,"q75":3240.8,"cnt":10}, firstBlock: {"q25":6565.7,"q50":6576.2,"q75":6622.8,"cnt":10}, type: {"q25":12.5,"q50":12.53,"q75":13.91,"cnt":10}, typeWithoutInspector: {"q25":11.18,"q50":11.69,"q75":12.21,"cnt":10}, typeWithTopToolbar: {"q25":14.06,"q50":14.74,"q75":16.35,"cnt":10}, typeContainer: {"q25":6.96,"q50":7.4,"q75":7.81,"cnt":10}, focus: {"q25":49.65,"q50":50.91,"q75":53.98,"cnt":10}, inserterOpen: {"q25":16.31,"q50":17.28,"q75":18.24,"cnt":10}, inserterSearch: {"q25":5.64,"q50":5.76,"q75":6.21,"cnt":10}, inserterHover: {"q25":2.5,"q50":2.59,"q75":2.71,"cnt":20}, loadPatterns: {"q25":1015.46,"q50":1054.19,"q75":1085.03,"cnt":10}, listViewOpen: {"q25":77.52,"q50":79.82,"q75":91.1,"cnt":10} |
Soare-Robert-Daniel
approved these changes
Apr 7, 2026
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.
Closes #2615
Summary
Previewwas moved to module scope (outsideEdit), making its reference stable across renders. SinceisLoadingwas previously captured via closure, it is now passed as an explicit prop.Checklist before the final review