From 8af930b19db8319e651aa0779adff999c36b39d1 Mon Sep 17 00:00:00 2001 From: AlexandreSi <32449369+AlexandreSi@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:22:51 +0100 Subject: [PATCH 1/2] Check inherited variables container when suggesting variables are missing --- newIDE/app/src/VariablesList/VariablesList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/newIDE/app/src/VariablesList/VariablesList.js b/newIDE/app/src/VariablesList/VariablesList.js index 9fb8c1313c99..59f073f9e0db 100644 --- a/newIDE/app/src/VariablesList/VariablesList.js +++ b/newIDE/app/src/VariablesList/VariablesList.js @@ -597,7 +597,11 @@ const VariablesList = (props: Props) => { const undefinedVariableNames = allVariablesNames ? allVariablesNames.filter(variableName => { - return !props.variablesContainer.has(variableName); + return ( + !props.variablesContainer.has(variableName) && + (!props.inheritedVariablesContainer || + !props.inheritedVariablesContainer.has(variableName)) + ); }) : []; From bef08619a012704bf4c36a01cbe6c111f7e3e219 Mon Sep 17 00:00:00 2001 From: AlexandreSi <32449369+AlexandreSi@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:28:32 +0100 Subject: [PATCH 2/2] Improve display of message --- newIDE/app/src/VariablesList/VariablesList.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/newIDE/app/src/VariablesList/VariablesList.js b/newIDE/app/src/VariablesList/VariablesList.js index 59f073f9e0db..58c61b2ff00f 100644 --- a/newIDE/app/src/VariablesList/VariablesList.js +++ b/newIDE/app/src/VariablesList/VariablesList.js @@ -76,6 +76,7 @@ import ErrorBoundary from '../UI/ErrorBoundary'; import Text from '../UI/Text'; import { MultilineVariableEditorDialog } from './MultilineVariableEditorDialog'; import { MarkdownText } from '../UI/MarkdownText'; +import Paper from '../UI/Paper'; const gd: libGDevelop = global.gd; const DragSourceAndDropTarget = makeDragSourceAndDropTarget('variable-editor'); @@ -1709,13 +1710,17 @@ const VariablesList = (props: Props) => { : null} {renderTree(i18n)} {!!undefinedVariableNames.length && ( - - - + + + + + + + )} )}