From 0b1a6b6631ce033f0fa751c2238ba14bf9e3cfce Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 13 Dec 2024 14:43:22 +0100 Subject: [PATCH] Improve logic to show entities saved panel description. (#67971) * Improve logic to show entities saved panel description. * Apply CR suggestion --------- Co-authored-by: afercia Co-authored-by: Mamaduka Co-authored-by: t-hamano --- .../editor/src/components/entities-saved-states/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/entities-saved-states/index.js b/packages/editor/src/components/entities-saved-states/index.js index ad584b0df75574..200473cccff706 100644 --- a/packages/editor/src/components/entities-saved-states/index.js +++ b/packages/editor/src/components/entities-saved-states/index.js @@ -115,6 +115,10 @@ export function EntitiesSavedStatesExtensible( { 'description' ); + const selectItemsToSaveDescription = !! dirtyEntityRecords.length + ? __( 'Select the items you want to save.' ) + : undefined; + return (
} ) - : __( 'Select the items you want to save.' ) } + : selectItemsToSaveDescription }