diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/RunInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/RunInstructions.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/BrowserRunInstructions.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Help/InfoTooltipInline.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Help/InfoTooltipInline.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Help/InfoTooltipInline.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Help/InfoTooltipInline.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Help/InfoTooltipWrapper.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Help/InfoTooltipWrapper.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Help/InfoTooltipWrapper.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Help/InfoTooltipWrapper.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/CopyableCommand.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/CopyableCommand.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/InstructionStep.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/InstructionStep.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/InstructionStep.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/InstructionStep.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/InstructionSteps.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/InstructionSteps.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/InstructionSteps.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/InstructionSteps.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/PlatformInstructionSteps.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/PlatformInstructionSteps.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/LinuxInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/LinuxInstructions.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/MacOsInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/MacOsInstructions.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/WindowsInstructions.vue b/src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue similarity index 100% rename from src/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/WindowsInstructions.vue rename to src/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue diff --git a/src/presentation/components/Code/CodeButtons/Save/CodeSaveButton.vue b/src/presentation/components/Code/CodeButtons/Save/CodeSaveButton.vue index 405af315..e873e8af 100644 --- a/src/presentation/components/Code/CodeButtons/Save/CodeSaveButton.vue +++ b/src/presentation/components/Code/CodeButtons/Save/CodeSaveButton.vue @@ -6,7 +6,7 @@ @click="saveCode" /> - + @@ -18,17 +18,17 @@ import { import { injectKey } from '@/presentation/injectionSymbols'; import ModalDialog from '@/presentation/components/Shared/Modal/ModalDialog.vue'; import { ScriptingLanguage } from '@/domain/ScriptingLanguage'; -import { type IScriptingDefinition } from '@/domain/IScriptingDefinition'; +import { type IScriptingDefinition } from '@/domain/ScriptingDefinition'; import { ScriptFilename } from '@/application/CodeRunner/ScriptFilename'; import { FileType } from '@/presentation/common/Dialog'; import IconButton from '../IconButton.vue'; import { createScriptErrorDialog } from '../ScriptErrorDialog'; -import RunInstructions from './RunInstructions/RunInstructions.vue'; +import BrowserRunInstructions from './BrowserRunInstructions/BrowserRunInstructions.vue'; export default defineComponent({ components: { IconButton, - RunInstructions, + BrowserRunInstructions, ModalDialog, }, setup() { @@ -55,7 +55,12 @@ export default defineComponent({ }, scriptDiagnosticsCollector))); return; } - areInstructionsVisible.value = true; + if (!isRunningAsDesktopApplication) { + areInstructionsVisible.value = true; + } + // On desktop, it would be better to to prompt the user with a system + // dialog offering options after saving, such as: + // • Open Containing Folder • "Open File" in default text editor • Close } return { diff --git a/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.spec.ts b/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.spec.ts index 95255804..cc5350bc 100644 --- a/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.spec.ts +++ b/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.spec.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import { VueWrapper, shallowMount } from '@vue/test-utils'; -import CopyableCommand from '@/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/CopyableCommand.vue'; +import CopyableCommand from '@/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/CopyableCommand.vue'; import { expectThrowsAsync } from '@tests/shared/Assertions/ExpectThrowsAsync'; import { InjectionKeys } from '@/presentation/injectionSymbols'; import type { Clipboard } from '@/presentation/components/Shared/Hooks/Clipboard/Clipboard'; diff --git a/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.spec.ts b/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.spec.ts index aae1688b..7191e8a0 100644 --- a/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.spec.ts +++ b/tests/unit/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.spec.ts @@ -1,14 +1,14 @@ import { shallowMount } from '@vue/test-utils'; -import PlatformInstructionSteps from '@/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/PlatformInstructionSteps.vue'; +import PlatformInstructionSteps from '@/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/PlatformInstructionSteps.vue'; import { useCollectionState } from '@/presentation/components/Shared/Hooks/UseCollectionState'; import { InjectionKeys } from '@/presentation/injectionSymbols'; import { UseCollectionStateStub } from '@tests/unit/shared/Stubs/UseCollectionStateStub'; import { AllSupportedOperatingSystems, type SupportedOperatingSystem } from '@tests/shared/TestCases/SupportedOperatingSystems'; import { OperatingSystem } from '@/domain/OperatingSystem'; import { CategoryCollectionStateStub } from '@tests/unit/shared/Stubs/CategoryCollectionStateStub'; -import WindowsInstructions from '@/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/WindowsInstructions.vue'; -import MacOsInstructions from '@/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/MacOsInstructions.vue'; -import LinuxInstructions from '@/presentation/components/Code/CodeButtons/Save/RunInstructions/Steps/Platforms/LinuxInstructions.vue'; +import WindowsInstructions from '@/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/WindowsInstructions.vue'; +import MacOsInstructions from '@/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/MacOsInstructions.vue'; +import LinuxInstructions from '@/presentation/components/Code/CodeButtons/Save/BrowserRunInstructions/Steps/Platforms/LinuxInstructions.vue'; import type { Component } from 'vue'; describe('PlatformInstructionSteps', () => {