-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patterns: fix editor crashing on certain search filter combinations #52956
Conversation
Size Change: +2 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix for this issue @glendaviesnz 👍
The approach in guarding against a missing default view makes sense and fixes the issue for me. I couldn't get the searching or filtering of patterns to crash now.
Flaky tests detected in c660d66. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5662956722
|
I just cherry-picked this PR to the update/packages-wp-6-3-RC3 branch to get it included in the next release: 513443b |
…attempting to get styles (#52956)
* Patterns: Enable focus mode editing (#52427) * PreventDefault when isComposing is true. apply patch from t-hamano. (#52844) see: #52821 (comment) * List View: Ensure onDrop does not fire if there is no target (#52959) * I18N: Add missing Gettext wrapper on strings in Edit Post overview sidebar (#52971) * I18N: Add missing gettext wrapper * Add context to disambiguate 'Outline' that is commonly used on borders. * Footnotes: disable based on post type (#52934) * Footnotes: disable based on post type * Address feedback * Fix typo * Format: disable if block is not registered * Lock usesContext api * Use Symbol instead of Math.random * Patterns Browse Screen: Fix back button when switching between categories (#52964) * Patterns: Allow orphaned template parts to appear in general category (#52961) * Spacing presets: fix bug with select control adding undefined preset values (#53005) * Site Editor: Fix canvas mode sync with URL (#52996) * Check if spacing tool is defined before displaying controls. (#53008) * Check if spacing tool is defined before displaying controls. * Don't show sides if spacing type false * Improve consistency of the Post editor and Site editor Document actions (#52246) * Remove redundant shortcut button. * Fix focus and hover style and improve consistency. * Rename post document-title and improve CSS consistency. * Site Editor: Fix the typo in the title label map (#53071) * Fix patterns search crash: check for existence of defaultView before attempting to get styles (#52956) * backport paging bug fixes (#53091) --------- Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Hiroshi Urabe <[email protected]> Co-authored-by: Andrew Serong <[email protected]> Co-authored-by: Pedro Mendonça <[email protected]> Co-authored-by: Ella <[email protected]> Co-authored-by: Aaron Robertshaw <[email protected]> Co-authored-by: Glen Davies <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: Andrea Fercia <[email protected]>
What?
Fixes a bug where the editor crashes and gives a BSOD when a certain combination of search terms and filters are applied in the Patterns page
Why?
It is annoying to end up with nothing but a black screen to stare at.
How?
Check for the existence of
defaultView
before attempting to get computed styles or current selection.The issue seems to be one of timing between some hooks running and the editor preview windows being pulled out of the DOM as the filters are applied. I couldn't see any way of fixing this other than checking that
defaultView
is defined before using it, and this seems to resolve the crashing.Testing Instructions
Screenshots or screencast
Before:
pattern-crash-before.mp4
After:
pattern-crash.mp4