Skip to content

Commit

Permalink
Site Editor: Don't memoize the canvas container title (#59000)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
  • Loading branch information
3 people committed Feb 14, 2024
1 parent 857356c commit 21e0167
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { Children, cloneElement, useState, useMemo } from '@wordpress/element';
import { Children, cloneElement, useState } from '@wordpress/element';
import {
Button,
privateApis as componentsPrivateApis,
Expand Down Expand Up @@ -82,10 +82,6 @@ function EditorCanvasContainer( {

const focusOnMountRef = useFocusOnMount( 'firstElement' );
const sectionFocusReturnRef = useFocusReturn();
const title = useMemo(
() => getEditorCanvasContainerTitle( editorCanvasContainerView ),
[ editorCanvasContainerView ]
);

function onCloseContainer() {
setIsListViewOpened( showListViewByDefault );
Expand Down Expand Up @@ -119,6 +115,7 @@ function EditorCanvasContainer( {
return null;
}

const title = getEditorCanvasContainerTitle( editorCanvasContainerView );
const shouldShowCloseButton = onClose || closeButtonLabel;

return (
Expand Down

1 comment on commit 21e0167

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 21e0167.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7900762486
📝 Reported issues:

Please sign in to comment.