diff --git a/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp b/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp index 7a7b190b08a9..7e896dc9cc3f 100644 --- a/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/AdvancedExtension.cpp @@ -33,7 +33,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/expression_black.svg", "res/functions/expression_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("events/functions/#return-a-value-from-a-function") .AddParameter("expression", _("The number to be returned")) .SetRelevantForFunctionEventsOnly() .MarkAsAdvanced(); @@ -48,7 +48,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/expression_black.svg", "res/functions/expression_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("string", _("The text to be returned")) .SetRelevantForFunctionEventsOnly() .MarkAsAdvanced(); @@ -62,7 +62,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/condition_black.svg", "res/functions/condition_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("trueorfalse", _("Should the condition be true or false?")) .SetRelevantForFunctionEventsOnly() .MarkAsAdvanced(); @@ -77,7 +77,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/extension_black.svg", "res/functions/extension_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("functionParameterName", _("Parameter name"), "variable") .AddParameter("scenevar", _("Scene variable")) .SetHidden() @@ -92,7 +92,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/extension_black.svg", "res/functions/extension_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("functionParameterName", _("Parameter name"), "variable") .AddParameter("variable", _("Variable")) .SetRelevantForFunctionEventsOnly() @@ -108,7 +108,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/extension_black.svg", "res/functions/extension_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("functionParameterName", _("Parameter name"), "variable") .AddParameter("scenevar", _("Scene variable")) .SetHidden() @@ -123,7 +123,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsAdvancedExtension( "", "res/functions/extension_black.svg", "res/functions/extension_black.svg") - .SetHelpPath("/events/functions/return") + .SetHelpPath("/all-features/advanced/reference/#actions") .AddParameter("functionParameterName", _("Parameter name"), "variable") .AddParameter("variable", _("Variable")) .SetRelevantForFunctionEventsOnly() diff --git a/Core/GDCore/Extensions/Builtin/MathematicalToolsExtension.cpp b/Core/GDCore/Extensions/Builtin/MathematicalToolsExtension.cpp index 1e7b593b8757..18b0979bd328 100644 --- a/Core/GDCore/Extensions/Builtin/MathematicalToolsExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/MathematicalToolsExtension.cpp @@ -28,7 +28,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("Random integer"), "", "res/dice-6.svg") - .SetHelpPath("/all-features/expressions") + .SetHelpPath("/events/expressions/#expressions") .AddParameter("expression", _("Maximum value")); extension @@ -37,7 +37,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("Random integer in range"), "", "res/dice-6.svg") - .SetHelpPath("/all-features/expressions") + .SetHelpPath("/events/expressions/#expressions") .AddParameter("expression", _("Minimum value")) .AddParameter("expression", _("Maximum value")); @@ -47,7 +47,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("Random float"), "", "res/dice-6.svg") - .SetHelpPath("/all-features/expressions") + .SetHelpPath("/events/expressions/#expressions") .AddParameter("expression", _("Maximum value")); extension @@ -56,7 +56,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("Random float in range"), "", "res/dice-6.svg") - .SetHelpPath("/all-features/expressions") + .SetHelpPath("/events/expressions/#expressions") .AddParameter("expression", _("Minimum value")) .AddParameter("expression", _("Maximum value")); @@ -66,7 +66,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("Random value in steps"), "", "res/dice-6.svg") - .SetHelpPath("/all-features/expressions") + .SetHelpPath("/events/expressions/#expressions") .AddParameter("expression", _("Minimum value")) .AddParameter("expression", _("Maximum value")) .AddParameter("expression", _("Step")); @@ -476,7 +476,7 @@ BuiltinExtensionsImplementer::ImplementsMathematicalToolsExtension( _("The number Pi (3.1415...)"), "", "res/mathfunction.png") - .SetHelpPath("/all-features/expressions"); + .SetHelpPath("/events/expressions/#expressions"); extension .AddExpression("lerpAngle", diff --git a/Core/GDCore/Extensions/Builtin/SceneExtension.cpp b/Core/GDCore/Extensions/Builtin/SceneExtension.cpp index 411b4d7d1739..d543d77de7ee 100644 --- a/Core/GDCore/Extensions/Builtin/SceneExtension.cpp +++ b/Core/GDCore/Extensions/Builtin/SceneExtension.cpp @@ -44,7 +44,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/conditions/depart24.png", "res/conditions/depart.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .MarkAsSimple(); @@ -60,7 +60,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/conditions/depart24.png", "res/conditions/depart.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .MarkAsSimple(); @@ -72,7 +72,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/texte.png", "res/actions/texte.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .AddParameter("sceneName", _("Name of the scene to check")) .MarkAsSimple(); @@ -85,7 +85,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/replaceScene24.png", "res/actions/replaceScene.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .AddParameter("sceneName", _("Name of the new scene")) .AddParameter("yesorno", _("Stop any other paused scenes?")) @@ -102,7 +102,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/pushScene24.png", "res/actions/pushScene.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .AddParameter("sceneName", _("Name of the new scene")) .MarkAsAdvanced(); @@ -117,7 +117,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/popScene24.png", "res/actions/popScene.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .MarkAsAdvanced(); @@ -129,7 +129,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/quit24.png", "res/actions/quit.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .MarkAsAdvanced(); @@ -141,7 +141,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/background24.png", "res/actions/background.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .AddParameter("color", _("Color")) .MarkAsAdvanced(); @@ -155,7 +155,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/window24.png", "res/actions/window.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", "") .AddParameter("yesorno", _("Deactivate input when focus is lost")) .MarkAsAdvanced(); @@ -171,7 +171,7 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsSceneExtension( "", "res/actions/window24.png", "res/actions/window.png") - .SetHelpPath("/interface/scene-editor/events") + .SetHelpPath("/interface/events-editor/") .AddCodeOnlyParameter("currentScene", ""); extension diff --git a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionDetailPanel.js b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionDetailPanel.js index 38df6616b672..a35dcbd85899 100644 --- a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionDetailPanel.js +++ b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionDetailPanel.js @@ -400,6 +400,7 @@ const ExtensionDetailPanel = ({ )} {shouldDisplayButtons && isAlreadyInstalled && ( diff --git a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionInstallDialog.js b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionInstallDialog.js index 72ac6420f47b..7aad271c4345 100644 --- a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionInstallDialog.js +++ b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionInstallDialog.js @@ -111,6 +111,7 @@ const ExtensionInstallDialog = ({ ) : ( undefined diff --git a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js index ecaa6b11b29a..6d91005736aa 100644 --- a/newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js +++ b/newIDE/app/src/AssetStore/ExtensionStore/ExtensionsSearchDialog.js @@ -172,7 +172,11 @@ const ExtensionsSearchDialog = ({ />, ]} secondaryActions={[ - , + , eventsFunctionsExtensionOpener ? ( } diff --git a/newIDE/app/src/AssetStore/NewObjectDialog.js b/newIDE/app/src/AssetStore/NewObjectDialog.js index 6618973809e5..f89f2ec75454 100644 --- a/newIDE/app/src/AssetStore/NewObjectDialog.js +++ b/newIDE/app/src/AssetStore/NewObjectDialog.js @@ -544,7 +544,11 @@ function NewObjectDialog({ New object} secondaryActions={[ - , + , ]} actions={[ , ]} secondaryActions={[ - , + , ]} open onRequestClose={onClose} diff --git a/newIDE/app/src/Debugger/DebuggerContent.js b/newIDE/app/src/Debugger/DebuggerContent.js index 500c58b2bd0b..4fff739acfec 100644 --- a/newIDE/app/src/Debugger/DebuggerContent.js +++ b/newIDE/app/src/Debugger/DebuggerContent.js @@ -205,7 +205,10 @@ export default class DebuggerContent extends React.Component { - +
} diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/BehaviorMethodSelectorDialog.js b/newIDE/app/src/EventsFunctionsExtensionEditor/BehaviorMethodSelectorDialog.js index 86025108e000..a039bc30022d 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/BehaviorMethodSelectorDialog.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/BehaviorMethodSelectorDialog.js @@ -36,6 +36,7 @@ export default function BehaviorMethodSelectorDialog({ , ]} actions={[ diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedBehaviorEditor.js b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedBehaviorEditor.js index 122659c0df32..78131d6375b0 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedBehaviorEditor.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedBehaviorEditor.js @@ -230,6 +230,7 @@ export default function EventsBasedBehaviorEditor({ diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedObjectEditor.js b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedObjectEditor.js index a769b1080811..b16f8e3b8d01 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedObjectEditor.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedBehaviorOrObjectEditor/EventsBasedObjectEditor.js @@ -241,6 +241,7 @@ export default function EventsBasedObjectEditor({ diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedObjectSelectorDialog.js b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedObjectSelectorDialog.js index e3d023239a4b..495b755cd43a 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedObjectSelectorDialog.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/EventsBasedObjectSelectorDialog.js @@ -66,6 +66,7 @@ export default function EventsBasedObjectSelectorDialog({ , ]} open diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/ExtensionFunctionSelectorDialog.js b/newIDE/app/src/EventsFunctionsExtensionEditor/ExtensionFunctionSelectorDialog.js index 770bc6fec6ad..f64d0fa03090 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/ExtensionFunctionSelectorDialog.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/ExtensionFunctionSelectorDialog.js @@ -87,7 +87,11 @@ export default function ExtensionFunctionSelectorDialog({ />, ]} secondaryActions={[ - , + , ]} open onRequestClose={onCancel} diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/ObjectMethodSelectorDialog.js b/newIDE/app/src/EventsFunctionsExtensionEditor/ObjectMethodSelectorDialog.js index 5eaa33c3d47c..37e5b7804f91 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/ObjectMethodSelectorDialog.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/ObjectMethodSelectorDialog.js @@ -35,8 +35,8 @@ export default function ObjectMethodSelectorDialog({ secondaryActions={[ , ]} actions={[ diff --git a/newIDE/app/src/EventsFunctionsExtensionEditor/OptionsEditorDialog/ExtensionExporterDialog.js b/newIDE/app/src/EventsFunctionsExtensionEditor/OptionsEditorDialog/ExtensionExporterDialog.js index 944e077f099c..d680e5b70e3f 100644 --- a/newIDE/app/src/EventsFunctionsExtensionEditor/OptionsEditorDialog/ExtensionExporterDialog.js +++ b/newIDE/app/src/EventsFunctionsExtensionEditor/OptionsEditorDialog/ExtensionExporterDialog.js @@ -102,7 +102,11 @@ const ExtensionExporterDialog = (props: Props): React.Node => { Export extension} secondaryActions={[ - , + , {eventsFunctionsExtension.getName()} options} secondaryActions={[ - , + , eventsFunctionsExtensionWriter ? ( } diff --git a/newIDE/app/src/EventsSheet/EventsFunctionExtractor/EventsFunctionExtractorDialog.js b/newIDE/app/src/EventsSheet/EventsFunctionExtractor/EventsFunctionExtractorDialog.js index 7e26a7a09999..312c38e03824 100644 --- a/newIDE/app/src/EventsSheet/EventsFunctionExtractor/EventsFunctionExtractorDialog.js +++ b/newIDE/app/src/EventsSheet/EventsFunctionExtractor/EventsFunctionExtractorDialog.js @@ -156,6 +156,7 @@ export default class EventsFunctionExtractorDialog extends React.Component< , ]} actions={[ diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionEditorDialog.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionEditorDialog.js index 99c1cb9e2ed9..7a89b138ab11 100644 --- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionEditorDialog.js +++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionEditorDialog.js @@ -16,7 +16,6 @@ import InstructionOrObjectSelector, { } from './InstructionOrObjectSelector'; import InstructionOrExpressionSelector from './InstructionOrExpressionSelector'; import HelpButton from '../../UI/HelpButton'; -import { isRelativePathToDocumentationRoot } from '../../Utils/HelpLink'; import { type EventsScope } from '../../InstructionOrExpression/EventsScope'; import { SelectColumns } from '../../UI/Responsive/SelectColumns'; import { useResponsiveWindowSize } from '../../UI/Responsive/ResponsiveWindowMeasurer'; @@ -157,6 +156,16 @@ const InstructionEditorDialog = ({ const { isMobile, windowSize, isMediumScreen } = useResponsiveWindowSize(); const isLargeScreen = windowSize === 'large' || windowSize === 'xlarge'; const instructionType: string = instruction.getType(); + const instructionMetadata = getInstructionMetadata({ + instructionType, + isCondition, + project, + }); + const rawHelpPath = instructionMetadata + ? instructionMetadata.getHelpPath() + : null; + const validHelpPath = + rawHelpPath && rawHelpPath !== 'MISSING' ? rawHelpPath : null; const [ newBehaviorDialogOpen, setNewBehaviorDialogOpen, @@ -222,15 +231,6 @@ const InstructionEditorDialog = ({ [step, shouldAutofocusInput] ); - const instructionMetadata = getInstructionMetadata({ - instructionType, - isCondition, - project, - }); - const instructionHelpPage = instructionMetadata - ? instructionMetadata.getHelpPath() - : undefined; - const renderInstructionOrObjectSelector = () => ( {({ i18n }) => ( @@ -339,23 +339,19 @@ const InstructionEditorDialog = ({ ) : null, Help - ) : isCondition ? ( - Help for this condition + validHelpPath ? ( + isCondition ? ( + About this condition + ) : ( + About this action + ) ) : ( - Help for this action + undefined ) } + scopeName={validHelpPath ? undefined : 'Events'} />, ]} open={open} diff --git a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js index 842361ae0c81..b86295849487 100644 --- a/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js +++ b/newIDE/app/src/EventsSheet/InstructionEditor/InstructionParametersEditor.js @@ -10,10 +10,7 @@ import EmptyMessage from '../../UI/EmptyMessage'; import ParameterRenderingService from '../ParameterRenderingService'; import HelpButton from '../../UI/HelpButton'; import HelpIcon from '../../UI/HelpIcon'; -import { - isRelativePathToDocumentationRoot, - isDocumentationAbsoluteUrl, -} from '../../Utils/HelpLink'; +import { isDocumentationAbsoluteUrl } from '../../Utils/HelpLink'; import { type ResourceManagementProps } from '../../ResourcesList/ResourceSource'; import { Column, Line, Spacer } from '../../UI/Grid'; import AlertMessage from '../../UI/AlertMessage'; @@ -495,20 +492,9 @@ const InstructionParametersEditor: React.ComponentType<{ )}
- {!noHelpButton && - helpPage && - isRelativePathToDocumentationRoot(helpPage) && ( - Help for this condition - ) : ( - Help for this action - ) - } - /> - )} + {!noHelpButton && ( + + )} diff --git a/newIDE/app/src/EventsSheet/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js b/newIDE/app/src/EventsSheet/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js index 6b7ae8551352..a9d162c914b3 100644 --- a/newIDE/app/src/EventsSheet/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js +++ b/newIDE/app/src/EventsSheet/ParameterFields/GenericExpressionField/ExpressionParametersEditorDialog.js @@ -71,6 +71,7 @@ const ExpressionParametersEditorDialog = ({ , ] : [] diff --git a/newIDE/app/src/ExportAndShare/Builds/BuildsDialog.js b/newIDE/app/src/ExportAndShare/Builds/BuildsDialog.js index 65aff241d221..06f9c0b772cf 100644 --- a/newIDE/app/src/ExportAndShare/Builds/BuildsDialog.js +++ b/newIDE/app/src/ExportAndShare/Builds/BuildsDialog.js @@ -40,7 +40,11 @@ const BuildsDialog = ({ />, ]} secondaryActions={[ - , + , ]} onRequestClose={onClose} open={open} diff --git a/newIDE/app/src/ExportAndShare/GenericExporters/OnlineCordovaExport.js b/newIDE/app/src/ExportAndShare/GenericExporters/OnlineCordovaExport.js index 824c151fcae6..babd0f2a0b21 100644 --- a/newIDE/app/src/ExportAndShare/GenericExporters/OnlineCordovaExport.js +++ b/newIDE/app/src/ExportAndShare/GenericExporters/OnlineCordovaExport.js @@ -105,6 +105,7 @@ export const SetupExportHeader = ({ , ]} open diff --git a/newIDE/app/src/ExportAndShare/ShareDialog/index.js b/newIDE/app/src/ExportAndShare/ShareDialog/index.js index d630c4d29add..b18547840635 100644 --- a/newIDE/app/src/ExportAndShare/ShareDialog/index.js +++ b/newIDE/app/src/ExportAndShare/ShareDialog/index.js @@ -235,6 +235,7 @@ const ShareDialog = ({ , ]; diff --git a/newIDE/app/src/ExportAndShare/SigningCredentials/SigningCredentialsDialog/index.js b/newIDE/app/src/ExportAndShare/SigningCredentials/SigningCredentialsDialog/index.js index 0a74c739aa42..bd30bc109abb 100644 --- a/newIDE/app/src/ExportAndShare/SigningCredentials/SigningCredentialsDialog/index.js +++ b/newIDE/app/src/ExportAndShare/SigningCredentials/SigningCredentialsDialog/index.js @@ -105,7 +105,11 @@ export const SigningCredentialsDialog = ({ />, ]} secondaryActions={[ - , + , signingCredentials && signingCredentials.length > 0 ? ( , ]} actions={[ diff --git a/newIDE/app/src/GameDashboard/LeaderboardAdmin/LeaderboardOptionsDialog.js b/newIDE/app/src/GameDashboard/LeaderboardAdmin/LeaderboardOptionsDialog.js index 2271ce0ab331..c22c34c2376c 100644 --- a/newIDE/app/src/GameDashboard/LeaderboardAdmin/LeaderboardOptionsDialog.js +++ b/newIDE/app/src/GameDashboard/LeaderboardAdmin/LeaderboardOptionsDialog.js @@ -138,6 +138,7 @@ function LeaderboardOptionsDialog({ key="help" helpPagePath="/interface/games-dashboard/leaderboard-administration" anchor="change_the_appearance_of_a_leaderboard" + scopeName="Leaderboard options" />, ]} actions={[ diff --git a/newIDE/app/src/HotReload/HotReloadLogsDialog.js b/newIDE/app/src/HotReload/HotReloadLogsDialog.js index 45bca59d2392..904ca87ada0b 100644 --- a/newIDE/app/src/HotReload/HotReloadLogsDialog.js +++ b/newIDE/app/src/HotReload/HotReloadLogsDialog.js @@ -61,7 +61,11 @@ export default function HotReloadLogsDialog({ />, ]} secondaryActions={[ - , + , ]} onRequestClose={onClose} open diff --git a/newIDE/app/src/LayersList/LayerEditorDialog.js b/newIDE/app/src/LayersList/LayerEditorDialog.js index 8f109bcca6b1..49c429ee59ca 100644 --- a/newIDE/app/src/LayersList/LayerEditorDialog.js +++ b/newIDE/app/src/LayersList/LayerEditorDialog.js @@ -216,7 +216,8 @@ const LayerEditorDialog = ({ secondaryActions={[ , , ]} open={open} diff --git a/newIDE/app/src/MainFrame/EditorContainers/ExternalEventsEditorContainer.js b/newIDE/app/src/MainFrame/EditorContainers/ExternalEventsEditorContainer.js index d546ca253bce..2f45373da7f4 100644 --- a/newIDE/app/src/MainFrame/EditorContainers/ExternalEventsEditorContainer.js +++ b/newIDE/app/src/MainFrame/EditorContainers/ExternalEventsEditorContainer.js @@ -300,7 +300,10 @@ export class ExternalEventsEditorContainer extends React.Component< tutorialId="Intermediate-externals" label={Watch tutorial} renderIfNotFound={ - + } />
diff --git a/newIDE/app/src/MainFrame/EditorContainers/ExternalLayoutEditorContainer.js b/newIDE/app/src/MainFrame/EditorContainers/ExternalLayoutEditorContainer.js index ea21c2dcf074..7071c6fc91c7 100644 --- a/newIDE/app/src/MainFrame/EditorContainers/ExternalLayoutEditorContainer.js +++ b/newIDE/app/src/MainFrame/EditorContainers/ExternalLayoutEditorContainer.js @@ -428,7 +428,10 @@ export class ExternalLayoutEditorContainer extends React.Component< tutorialId="Intermediate-externals" label={Watch tutorial} renderIfNotFound={ - + } /> diff --git a/newIDE/app/src/ObjectEditor/Editors/CustomObjectPropertiesEditor/NewVariantDialog.js b/newIDE/app/src/ObjectEditor/Editors/CustomObjectPropertiesEditor/NewVariantDialog.js index ffa29c4559b8..5cfad14c8399 100644 --- a/newIDE/app/src/ObjectEditor/Editors/CustomObjectPropertiesEditor/NewVariantDialog.js +++ b/newIDE/app/src/ObjectEditor/Editors/CustomObjectPropertiesEditor/NewVariantDialog.js @@ -51,6 +51,7 @@ const NewVariantDialog = ({ , ]} onRequestClose={onCancel} diff --git a/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js b/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js index b806c0041286..f3f4566d158e 100644 --- a/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js +++ b/newIDE/app/src/ObjectEditor/ObjectEditorDialog.js @@ -175,6 +175,40 @@ const InnerDialog = (props: InnerDialogProps) => { project.getCurrentPlatform(), object.getType() ); + const objectDisplayName = objectMetadata + ? objectMetadata.getFullName() + : null; + + const isSpriteObject = object.getType() === 'Sprite'; + const spriteHasAnimations = + isSpriteObject && + gd.asSpriteConfiguration(object.getConfiguration()).getAnimationsCount() > + 0; + + const contextualHelpPagePath = (() => { + if (currentTab === 'behaviors') return '/behaviors'; + if (currentTab === 'variables') + return '/all-features/variables/object-variables'; + if (currentTab === 'effects') return '/objects/effects'; + if (isSpriteObject) return '/objects/sprite'; + return helpPagePath || '/objects'; + })(); + + const contextualHelpAnchor = (() => { + if (isSpriteObject && spriteHasAnimations) return 'adding-an-animation'; + return undefined; + })(); + + const contextualLabel = (() => { + if (currentTab === 'behaviors') return About Behaviors; + if (currentTab === 'variables') + return About Object Variables; + if (currentTab === 'effects') return About Effects; + if (isSpriteObject && spriteHasAnimations) + return About Animations; + if (objectDisplayName) return About {objectDisplayName}; + return undefined; + })(); const EditorComponent: ?React.ComponentType = props.editorComponent; @@ -273,7 +307,13 @@ const InnerDialog = (props: InnerDialogProps) => { />, ]} secondaryActions={[ - , + , , ]} secondaryActions={[ - , + , ]} onRequestClose={onCancelChanges} onApply={apply} diff --git a/newIDE/app/src/ObjectGroupEditor/NewObjectGroupEditorDialog.js b/newIDE/app/src/ObjectGroupEditor/NewObjectGroupEditorDialog.js index a0c731c0435a..07485099e18e 100644 --- a/newIDE/app/src/ObjectGroupEditor/NewObjectGroupEditorDialog.js +++ b/newIDE/app/src/ObjectGroupEditor/NewObjectGroupEditorDialog.js @@ -97,7 +97,11 @@ const NewObjectGroupEditorDialog = ({ />, ]} secondaryActions={[ - , + , ]} onRequestClose={onCancel} onApply={apply} diff --git a/newIDE/app/src/Profile/CreateAccountDialog.js b/newIDE/app/src/Profile/CreateAccountDialog.js index f4907c3ba861..cf705df741dc 100644 --- a/newIDE/app/src/Profile/CreateAccountDialog.js +++ b/newIDE/app/src/Profile/CreateAccountDialog.js @@ -173,7 +173,11 @@ const CreateAccountDialog = ({ , ]} secondaryActions={[ - , + , ]} cannotBeDismissed={createAccountInProgress} onApply={createAccount} diff --git a/newIDE/app/src/Profile/CreateAccountWithPurchaseClaimDialog.js b/newIDE/app/src/Profile/CreateAccountWithPurchaseClaimDialog.js index 5ea224b64d34..f3e13c10b7b6 100644 --- a/newIDE/app/src/Profile/CreateAccountWithPurchaseClaimDialog.js +++ b/newIDE/app/src/Profile/CreateAccountWithPurchaseClaimDialog.js @@ -126,7 +126,11 @@ const CreateAccountWithPurchaseClaimDialog = ({ , ]} secondaryActions={[ - , + , ]} cannotBeDismissed={createAccountInProgress} onApply={createAccount} diff --git a/newIDE/app/src/Profile/LoginDialog.js b/newIDE/app/src/Profile/LoginDialog.js index 018599c2e4f9..9b80b13e30fa 100644 --- a/newIDE/app/src/Profile/LoginDialog.js +++ b/newIDE/app/src/Profile/LoginDialog.js @@ -82,7 +82,11 @@ const LoginDialog = ({ ]; const secondaryActions = [ - , + , ]; const dialogContent = ( diff --git a/newIDE/app/src/Profile/LoginWithPurchaseClaimDialog.js b/newIDE/app/src/Profile/LoginWithPurchaseClaimDialog.js index fd9c79ed5116..265924e9addc 100644 --- a/newIDE/app/src/Profile/LoginWithPurchaseClaimDialog.js +++ b/newIDE/app/src/Profile/LoginWithPurchaseClaimDialog.js @@ -101,7 +101,11 @@ const LoginWithPurchaseClaimDialog = ({ ]; const secondaryActions = [ - , + , ]; const dialogContent = ( diff --git a/newIDE/app/src/Profile/ProfileDialog.js b/newIDE/app/src/Profile/ProfileDialog.js index 212746b0f430..6178780b60e1 100644 --- a/newIDE/app/src/Profile/ProfileDialog.js +++ b/newIDE/app/src/Profile/ProfileDialog.js @@ -151,7 +151,11 @@ const ProfileDialog = ({ onClose }: Props) => { />, ]} secondaryActions={[ - , + , isConnected && ( Logout} diff --git a/newIDE/app/src/ProjectManager/ProjectPropertiesDialog.js b/newIDE/app/src/ProjectManager/ProjectPropertiesDialog.js index 5b29ba28ec08..96d40285fdc4 100644 --- a/newIDE/app/src/ProjectManager/ProjectPropertiesDialog.js +++ b/newIDE/app/src/ProjectManager/ProjectPropertiesDialog.js @@ -416,6 +416,7 @@ const ProjectPropertiesDialog = (props: Props) => { , hotReloadPreviewButtonProps ? ( , ]} onRequestClose={onCancel} diff --git a/newIDE/app/src/SceneEditor/ExtractAsExternalLayoutDialog.js b/newIDE/app/src/SceneEditor/ExtractAsExternalLayoutDialog.js index 1e896ddfe075..0884f0d7c336 100644 --- a/newIDE/app/src/SceneEditor/ExtractAsExternalLayoutDialog.js +++ b/newIDE/app/src/SceneEditor/ExtractAsExternalLayoutDialog.js @@ -47,6 +47,7 @@ export default function ExtractAsExternalLayoutDialog({ , ]} onRequestClose={onCancel} diff --git a/newIDE/app/src/UI/HelpButton/index.js b/newIDE/app/src/UI/HelpButton/index.js index e65133000dc7..50c78b4dad59 100644 --- a/newIDE/app/src/UI/HelpButton/index.js +++ b/newIDE/app/src/UI/HelpButton/index.js @@ -12,6 +12,7 @@ type PropsType = { helpPagePath: ?string, label?: React.Node, anchor?: string, + scopeName?: string, }; /** @@ -33,7 +34,14 @@ const HelpButton = (props: PropsType): null | React.Node => { Help} + label={ + props.label || + (props.scopeName ? ( + About {props.scopeName} + ) : ( + Help + )) + } icon={} /> ) : ( diff --git a/newIDE/app/src/VariablesList/GlobalAndSceneVariablesDialog.js b/newIDE/app/src/VariablesList/GlobalAndSceneVariablesDialog.js index a65dd8451357..4460fa0394ae 100644 --- a/newIDE/app/src/VariablesList/GlobalAndSceneVariablesDialog.js +++ b/newIDE/app/src/VariablesList/GlobalAndSceneVariablesDialog.js @@ -128,6 +128,7 @@ const GlobalAndSceneVariablesDialog = ({ shouldCreateInitiallySelectedVariable } helpPagePath={'/all-features/variables/scene-variables'} + scopeName="Variables" hotReloadPreviewButtonProps={hotReloadPreviewButtonProps} id="global-and-scene-variables-dialog" isListLocked={isListLocked} diff --git a/newIDE/app/src/VariablesList/GlobalVariablesDialog.js b/newIDE/app/src/VariablesList/GlobalVariablesDialog.js index 98312bc7451d..61389519dccd 100644 --- a/newIDE/app/src/VariablesList/GlobalVariablesDialog.js +++ b/newIDE/app/src/VariablesList/GlobalVariablesDialog.js @@ -77,6 +77,7 @@ const GlobalVariablesDialog = ({ shouldCreateInitiallySelectedVariable } helpPagePath={'/all-features/variables/global-variables'} + scopeName="Global variables" hotReloadPreviewButtonProps={hotReloadPreviewButtonProps} id="global-variables-dialog" isListLocked={isListLocked} diff --git a/newIDE/app/src/VariablesList/LocalVariablesDialog.js b/newIDE/app/src/VariablesList/LocalVariablesDialog.js index 709b9b311337..f2bf8f4dc328 100644 --- a/newIDE/app/src/VariablesList/LocalVariablesDialog.js +++ b/newIDE/app/src/VariablesList/LocalVariablesDialog.js @@ -65,6 +65,7 @@ const LocalVariablesDialog = ({ // $FlowFixMe[incompatible-type] tabs={tabs} helpPagePath={'/all-features/variables/local-variables'} + scopeName="Local variables" id="local-variables-dialog" initiallySelectedVariableName={initiallySelectedVariableName} shouldCreateInitiallySelectedVariable={ diff --git a/newIDE/app/src/VariablesList/ObjectGroupVariablesDialog.js b/newIDE/app/src/VariablesList/ObjectGroupVariablesDialog.js index 3212decea102..2b73c323d75b 100644 --- a/newIDE/app/src/VariablesList/ObjectGroupVariablesDialog.js +++ b/newIDE/app/src/VariablesList/ObjectGroupVariablesDialog.js @@ -175,6 +175,7 @@ const ObjectGroupVariablesDialog = ({ , ]} onRequestClose={onCancel} diff --git a/newIDE/app/src/VariablesList/ObjectInstanceVariablesDialog.js b/newIDE/app/src/VariablesList/ObjectInstanceVariablesDialog.js index 809578b2382a..8309cf609d4e 100644 --- a/newIDE/app/src/VariablesList/ObjectInstanceVariablesDialog.js +++ b/newIDE/app/src/VariablesList/ObjectInstanceVariablesDialog.js @@ -92,6 +92,7 @@ const ObjectInstanceVariablesDialog = ({ tabs={tabs} initiallySelectedVariableName={initiallySelectedVariableName} helpPagePath={'/all-features/variables/instance-variables'} + scopeName="Instance variables" hotReloadPreviewButtonProps={hotReloadPreviewButtonProps} id="instance-variables-dialog" onEditObjectVariables={onEditObjectVariables} diff --git a/newIDE/app/src/VariablesList/ObjectVariablesDialog.js b/newIDE/app/src/VariablesList/ObjectVariablesDialog.js index 2ec8d17ffc4d..fe142edd04ec 100644 --- a/newIDE/app/src/VariablesList/ObjectVariablesDialog.js +++ b/newIDE/app/src/VariablesList/ObjectVariablesDialog.js @@ -71,6 +71,7 @@ const ObjectVariablesDialog = ({ shouldCreateInitiallySelectedVariable } helpPagePath={'/all-features/variables/object-variables'} + scopeName="Object variables" hotReloadPreviewButtonProps={hotReloadPreviewButtonProps} id="object-variables-dialog" isListLocked={isListLocked} diff --git a/newIDE/app/src/VariablesList/SceneVariablesDialog.js b/newIDE/app/src/VariablesList/SceneVariablesDialog.js index 51df4ef5a162..002044c3dde0 100644 --- a/newIDE/app/src/VariablesList/SceneVariablesDialog.js +++ b/newIDE/app/src/VariablesList/SceneVariablesDialog.js @@ -79,6 +79,7 @@ const SceneVariablesDialog = ({ shouldCreateInitiallySelectedVariable } helpPagePath={'/all-features/variables/scene-variables'} + scopeName="Scene variables" hotReloadPreviewButtonProps={hotReloadPreviewButtonProps} id="scene-variables-dialog" isListLocked={isListLocked} diff --git a/newIDE/app/src/VariablesList/VariablesEditorDialog.js b/newIDE/app/src/VariablesList/VariablesEditorDialog.js index c8a0d8d9f40f..6f413d92cb5d 100644 --- a/newIDE/app/src/VariablesList/VariablesEditorDialog.js +++ b/newIDE/app/src/VariablesList/VariablesEditorDialog.js @@ -57,6 +57,7 @@ type Props = {| hotReloadPreviewButtonProps: HotReloadPreviewButtonProps | null, helpPagePath: ?string, + scopeName?: string, id?: string, |}; @@ -69,6 +70,7 @@ const VariablesEditorDialog = ({ project, hotReloadPreviewButtonProps, helpPagePath, + scopeName, id, tabs, initiallyOpenTabId, @@ -242,7 +244,11 @@ const VariablesEditorDialog = ({ /> ) : null, helpPagePath ? ( - + ) : null, ]} onRequestClose={onCancelChanges}